Repository navigation
utmpx: preserve the selected source across iterators - #16284
mattsu2020 wants to merge 3 commits into
Conversation
Merging this PR will improve performance by 3.34%2 warnings, 1 note
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y libsystemd-dev | ||
| cargo test -p uucore --lib --locked --features systemd_logind traditional_paths_persist_across_iterators |
There was a problem hiding this comment.
could you drop the test name filter? the other systemd_logind tests in uucore would run too
e7ec946 to
5a1daa5
Compare
Open and validate a nonblocking descriptor, then select it for libc via /proc/self/fd. Keep getutxent for record reads and locking. Cover FIFO rejection, path replacement, invalid inputs and cleanup.
Use one test-only helper for the uucore unit tests and who FIFO test. Keep the helper inside uucore so it is included in the crate package.
5a1daa5 to
dad413a
Compare
With systemd_logind enabled, iter_all_records() switches back to systemd after reading a custom file. Keep using the selected file until DEFAULT_FILE is explicitly selected, and add a regression test for repeated iterators.
Depends on #16233; related to #8376.