Skip to content

test: module_paths_parity find_matches_c_for_any_path can list the system temp dir and flake #1917

Closed

Description

@rdoupe

Location

rust/obs-core/tests/obs_core/module_paths_parity.rs, find_matches_c_for_any_path (Tier 3, added by #1894).

Class

Flaky test.

How it is reached

The proptest builds random module search paths under a temp tree. Some generated paths contain .. segments, which can climb out of the tree into the system temp directory itself. The Rust shim and the C oracle then each list that directory at slightly different moments. Any other process creating or removing an entry in between makes the two results differ, and the test fails although both sides are correct. It passes reliably with a private, quiet TMPDIR.

Proposed fix and failing test

Keep every generated path inside the test's own tree: generate .. only where it cannot climb above the tree root, or resolve against a private root. The test's coverage of .. handling stays. The failure needs another process writing to the temp directory; the fix is shown by a constrained generator plus a check that no generated path resolves outside the tree.

Activity

  1. rdoupe commented on Oct 23, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: #1917 (our test from #1894).

  2. added
    claimed
    on Oct 23, 2026
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