Repository navigation
test(proc): pace the groupAlive test's signals and count them - #17
Merged
Merged
Conversation
The helper thread sent SIGUSR1 back to back, so a signal was always pending and the scan took one after every system call: the test took 40 to 80 s on eight CPUs and 4 to 8 minutes for aarch64 under QEMU, where pinned to one CPU it took 20 ms. It now pauses 1 ms per signal, as the state.lockExclusive test does, and takes 16 ms, 0.1 s under QEMU. The handler counts the signals it catches. The test still makes its 50 checks, every one expected true, and goes on until 10 of them have caught a signal mid-scan, so it fails, after 10 s, rather than passes when none lands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test that groupAlive stays true while signals arrive sent SIGUSR1 from its helper thread in a tight loop. A signal was always pending, so every system call in the /proc scan was followed by a signal delivery, and the test took 40 to 83 s natively and 4 to 8 minutes for aarch64 under QEMU, against 20 ms pinned to one CPU.
The helper now pauses 1 ms per signal, as the state.lockExclusive test does, and the handler counts the signals it catches. The test still makes its 50 checks, each expecting true, and goes on until ten of them have caught a signal mid-scan. It fails after 10 s if signals stop landing, so it cannot pass without having been interrupted.
It now takes about 16 ms natively and 0.1 s under QEMU. The suite drops from 67 to 115 s to 37 s natively, and from 311 s to 48 s under QEMU.