Skip to content

🐛 fix(test): reject static /dev/fd listings - #938

Merged
gaborbernat merged 1 commit into
mainfrom
fix/fd-listing-probe
Nov 16, 2026
Merged

gaborbernat merged 1 commit into
mainfrom
fix/fd-listing-probe

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Packagers who run the test suite on NetBSD without fdescfs saw a new failure in release 4.2.10 (#934). Without fdescfs, NetBSD keeps static /dev/fd/0 to /dev/fd/63 device nodes (MAKEDEV, mount_fdesc(8)), which the suite took for a complete view of open descriptors, so it miscounted descriptors and simulated an inode reuse while a descriptor was still open.

The check that decides whether the suite can see every open descriptor now also requires a closed descriptor to vanish from the listing, so a static view no longer passes. A static node stays listed after its descriptor closes, which is why the closed-probe test rejects it. 🧪 Library behavior does not change, because only the test suite and that check are touched.

Fixes #934

NetBSD without fdescfs keeps static /dev/fd/0..63 nodes, so the
complete-fd-directory probe saw its own descriptor listed and trusted
the view. descriptors_on then missed every descriptor numbered 64 and
up, and the inode-reuse stand-in faked a reuse while a descriptor was
still open.

The probe now also requires its entry to disappear once the descriptor
is closed. Tests cover a static view, a missing view, and a descriptor
duplicated above 63.

Fixes #934
Fixes #917
@gaborbernat gaborbernat added the skip news Internal change; exempt from the news fragment check label Nov 16, 2026
@gaborbernat
gaborbernat merged commit 5657296 into main Nov 16, 2026
50 checks passed
@gaborbernat
gaborbernat deleted the fix/fd-listing-probe branch November 16, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug skip news Internal change; exempt from the news fragment check

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