Repository navigation
Speed up the update-lock test from 7s to 4s - #15419
Merged
Merged
Conversation
Two stub update steps slept 2s and 3s only to still be running while the test poked at the lock and the inhibitor's descriptors; the test waits for the whole update afterwards, so those sleeps were paid in full. They only need to outlast a marker poll and an fd scan: 0.8s and 1s keep a wide margin over both.
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.
Per-file speedup from section 4 of the overnight quality plan.
update-lock-test.sh: 6.8s → 3.7s, test-only, no coverage change.Two stub update steps slept 2s (snapshot) and 3s (keyring) purely to still be running while the test poked at the held lock and the sleep inhibitor's file descriptors — and the test then waits for the whole update, paying both sleeps in full. They only need to outlast a 0.05s marker poll and a quick
/proc/pid/fdscan; 0.8s and 1s keep a wide margin over both.Verified: three consecutive runs pass at 3.7s. Codex review found no regressions (its sandbox could not run the test due to a read-only
/run/user, failing identically on base — the local runs are the runtime evidence).