Skip to content

🧪 test: fix descriptor discovery and Windows coverage - #935

Open
hector2394 wants to merge 1 commit into
tox-dev:mainfrom
hector2394:fix/934-static-descriptor-directories
Open

hector2394 wants to merge 1 commit into
tox-dev:mainfrom
hector2394:fix/934-static-descriptor-directories

Conversation

@hector2394

Copy link
Copy Markdown

On NetBSD, static /dev/fd nodes can make the capability probe accept an incomplete descriptor listing. The inode-reuse fixture then treats a live descriptor above that listing's range as closed, causing the successor-preservation test in #934 to remove the successor's marker.

The probe now requires its descriptor node to disappear after close. Static nodes select the existing descriptor-number scan. A regression opens real handles above the directory's initial range and checks their counts as they close, without calling the private probe or mocking filesystem paths. Library locking behavior and the original failing test are unchanged.

The Windows junction-replacement test also uses the normal heartbeat defaults when staging the replacement tree. This keeps its setup independent of the fast heartbeat fixture while preserving the refusal and empty-target assertions. Symlink coverage now follows the existing capability guards, and the polling-policy test uses a controlled clock so it checks the requested sleep even on a loaded runner.

Fixes #934.

Validation:

  • NetBSD 11.99.10, Python 3.14.7: the new regression fails before the fix and passes after it. The unchanged 4.2.10: new test failure in test_failed_acquire_spares_a_successor_on_the_freed_inode_number #934 test also passes under controlled descriptor pressure without overriding the capability. Affected modules: 142 passed, 133 skipped.
  • Full Windows Python 3.14.2 tox run: 2,449 passed, 592 skipped, 100.00% coverage and 100% diff coverage. The local run used a fresh wheel-installed environment, isolated Windows temporary storage and AboveNormal test-process priority under host load.
  • Ruff, formatting, types, all seven applicable hooks, wheel and source builds pass.

Static device nodes can hide live handles from the inode-reuse fixture.
Windows checks need isolated heartbeat timing and capability-aligned coverage.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4.2.10: new test failure in test_failed_acquire_spares_a_successor_on_the_freed_inode_number

1 participant