diff options
| author | Nick Banks <nickbanks@netflix.com> | 2026-09-24 15:49:09 +0000 |
|---|---|---|
| committer | Olivier Cochard <olivier@FreeBSD.org> | 2026-09-24 16:00:44 +0000 |
| commit | c14281f6bb462ca03383d92a0d88228e9426268e (patch) | |
| tree | d79061243c97b635764a229893c98f53cf2af074 | |
| parent | 884b961c74bdadb7d8c97a7763e3110e803c69be (diff) | |
tests/sys/kern: skip unix_connectat fdescfs cases when fdescfs is missing
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.
Approved by: ngie, asomers
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D59227
| -rw-r--r-- | tests/sys/kern/unix_connectat.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/sys/kern/unix_connectat.c b/tests/sys/kern/unix_connectat.c index 04885ee464ee..12832b30c76b 100644 --- a/tests/sys/kern/unix_connectat.c +++ b/tests/sys/kern/unix_connectat.c @@ -128,7 +128,6 @@ pathconnect(int fd, int s, const char *path) * rather than relying on the host's /dev/fd keeps the fdescfs cases * self-contained: they exercise real fdescfs lookups regardless of how the * host is set up, and the mode-specific behaviour below is then well defined. - * Skips if the kernel has no fdescfs. */ static void mount_fdescfs(const char * const *opts) @@ -154,8 +153,6 @@ mount_fdescfs(const char * const *opts) errmsg[0] = '\0'; error = nmount(iov, iovlen, 0); - if (error != 0 && errno == ENODEV) - atf_tc_skip("no fdescfs support in the kernel"); ATF_REQUIRE_MSG(error == 0, "mount fdescfs on %s: %s", FDDIR, errmsg[0] != '\0' ? errmsg : strerror(errno)); @@ -183,6 +180,7 @@ fdpath(char *buf, size_t len, int fd) ATF_TC_HEAD(name, tc) \ { \ atf_tc_set_md_var(tc, "require.user", "root"); \ + atf_tc_set_md_var(tc, "require.kmods", "fdescfs"); \ } \ ATF_TC_CLEANUP(name, tc) \ { \ |
