Page MenuHomeFreeBSD

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

Authored by nickbanks_netflix.com on Thu, Aug 27, 6:43 PM.
Tags
None
Referenced Files
F170942176: D59227.id185816.diff
Mon, Sep 7, 6:30 PM
F170848293: D59227.diff
Mon, Sep 7, 12:44 AM
F170824398: D59227.id185816.diff
Sun, Sep 6, 8:52 PM
Unknown Object (File)
Sun, Sep 6, 2:39 PM
Unknown Object (File)
Sun, Sep 6, 1:20 PM
Unknown Object (File)
Sun, Sep 6, 1:57 AM
Unknown Object (File)
Sun, Sep 6, 12:57 AM
Unknown Object (File)
Sat, Sep 5, 8:52 PM
Subscribers

Details

Reviewers
olivier
asomers
ngie
Group Reviewers
tests
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 76224
Build 73107: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Tue, Sep 1, 7:44 PM
ngie requested changes to this revision.Wed, Sep 2, 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
187

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.Wed, Sep 2, 1:56 AM
tests/sys/kern/unix_connectat.c
187

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.Fri, Sep 4, 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!")