Skip to content

test: test_v4l2_udev_poll_error flakes on its 50 ms wall-clock bound #2198

Closed

Description

@rdoupe

Flake

test_v4l2_udev_poll_error (monitor_fd_hangup_ends_loop) fails under CI load:

warning: v4l2: udev monitor fd reported revents 0x10, stopping hot-plug updates
[  ERROR   ] --- elapsed < 50 is not true
test_v4l2_udev_poll_error.c:73: error: Failure!

This happened in run 40119239268, on Linux Tier 2 with tests on, for #2194, which doesn't touch v4l2. The loop did return and logged the expected warning. It just took 50 ms or more of wall clock on a loaded runner.

run_with_fd() already proves that the loop stops instead of spinning:

  • returned is true only if the loop exited by itself within the 500 × 1 ms wait;
  • run.iterations <= 2 bounds how many polls it made.

So elapsed < 50 adds no coverage. It only fails when the runner is slow.

Fix

Drop the wall-clock assert and keep returned and iterations <= 2. That is test-only. The test still fails if the udev loop spins on a poll error (#1280).

Activity

  1. rdoupe commented on Oct 24, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: #2198.

  2. added
    claimed
    on Oct 24, 2026
  3. added a commit that references this issue on Oct 24, 2026
    cf16fd3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions