Repository navigation
test: Drop the wall-clock bound from test_v4l2_udev_poll_error - #2199
Merged
Merged
Conversation
The test already proves the udev loop stops instead of spinning: it must return on its own within the 500 x 1 ms wait, after at most two polls. The extra elapsed < 50 ms check added no coverage and failed on a loaded CI runner (run 40119239268) even though the loop had returned. Fixes obs-rust#2198
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.
Fixes #2198
What and why
test_v4l2_udev_poll_error(monitor_fd_hangup_ends_loop) failed on Linux Tier 2 in run 40119239268 for #2194, which doesn't touch v4l2. The failure waselapsed < 50 is not true, even though the loop had returned and logged the expected "stopping hot-plug updates" warning. On a loaded runner the round trip took 50 ms or more of wall clock.run_with_fd()already proves that the loop stops instead of spinning:returnedis true only if the loop exits on its own within the 500 × 1 ms wait;run.iterations <= 2bounds the number of polls.This drops the wall-clock assert and the unused
now_ms()helper, and adds a comment saying why. It changes the test only. A udev loop that spins on a poll error (#1280) still fails the test, throughreturnedand the iteration bound.RED → GREEN
3d3593d32. The test source compiles withgcc -std=gnu11 -Wall -Wextra -Werror, andclang-format --dry-run --Werroris clean. PR CI runs it on Linux.Checklist
master(or the description starts with a Stacked: note)docs/features.mdis added or updated (not applicable: no user-visible change)-W..., ratchets): built with scripting ON (PR CI builds no OBS app: rungh workflow run ci.yml --ref <branch>for the full builds) and cross-checked with clang and MSVC