Page MenuHomeFreeBSD

tests/sys/kern: skip unix_connectat fdescfs cases when fdescfs is missing
ClosedPublic

Authored by nickbanks_netflix.com on Aug 27 2026, 6:43 PM.
Tags
None
Referenced Files
F175678605: D59227.id185232.diff
Mon, Oct 12, 11:29 AM
Unknown Object (File)
Thu, Oct 8, 7:14 PM
Unknown Object (File)
Wed, Oct 7, 5:45 AM
Unknown Object (File)
Mon, Oct 5, 1:05 AM
Unknown Object (File)
Sun, Oct 4, 2:38 PM
Unknown Object (File)
Sun, Oct 4, 2:34 PM
Unknown Object (File)
Sun, Oct 4, 2:33 PM
Unknown Object (File)
Sun, Oct 4, 7:30 AM
Subscribers

Details

Summary

unix_connectat's fdescfs cases call mount_fdescfs(), which skipped on
ENODEV. nmount(2) never returns ENODEV: vfs_donmount() remaps the
ENODEV from a failed fdescfs module load to EINVAL with errmsg
"Invalid fstype", so the skip never fired and the cases failed on
kernels without fdescfs.

Use ATF_REQUIRE_KERNEL_MODULE("fdescfs") instead, and drop the dead
ENODEV branch. modfind(2) sees loaded and static modules, not
unloaded .ko files, so a host with fdescfs.ko on disk but not loaded
will now skip rather than having nmount(2) implicitly kldload it.
Upstream CI keeps fdescfs mounted via tests/ci/tools/ci.conf, so it
still runs them.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Sep 1 2026, 7:44 PM
ngie requested changes to this revision.Sep 2 2026, 1:56 AM
ngie added subscribers: des, ngie.

Please use require.kmods instead of the macro as I recommend in the differential.

tests/sys/kern/unix_connectat.c
182–183

I really need to get rid of that macro since the ATF metadata added by @des makes a ton more sense.

This revision now requires changes to proceed.Sep 2 2026, 1:56 AM
tests/sys/kern/unix_connectat.c
182–183

I really need to get rid of that macro since the ATF metadata added by @des makes a ton more sense.

It looks like it nerfed the trailing newline. Please add it to the suggested change.

Use require.kmods ATF metadata instead of ATF_REQUIRE_KERNEL_MODULE(), per review. Macro include and its -I${SRCTOP}/tests CFLAGS dropped; macro line continuations and trailing newline verified intact.

Please doublecheck that the new support also meets your needs before committing.

This revision is now accepted and ready to land.Sep 4 2026, 6:08 PM

Please doublecheck that the new support also meets your needs before committing.

I confirmed that all our internal tests here at Netflix were passing still with the updated commit.

Please doublecheck that the new support also meets your needs before committing.

I confirmed that all our internal tests here at Netflix were passing still with the updated commit.

Macro goatforit:

("Goat for it!")