diff options
author | ngie <ngie@FreeBSD.org> | 2014-10-24 03:42:37 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2014-10-24 03:42:37 +0000 |
commit | 043b7b066a4a6d413f2064709a0619adbf30caf6 (patch) | |
tree | ba65699276655d0e5d864b5a9d1535d3793a0a23 /contrib/netbsd-tests | |
parent | a2a568a9e6a53abb22572b7cec54f138718c434d (diff) | |
download | FreeBSD-src-043b7b066a4a6d413f2064709a0619adbf30caf6.zip FreeBSD-src-043b7b066a4a6d413f2064709a0619adbf30caf6.tar.gz |
- Ignore EINVAL check with mknod(path, S_IFCHR, -1) as the testcase is always
executed on a non-devfs filesystem
- Expect mknod(path, S_IFREG, 0) to fail on FreeBSD
Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'contrib/netbsd-tests')
-rw-r--r-- | contrib/netbsd-tests/lib/libc/sys/t_mknod.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_mknod.c b/contrib/netbsd-tests/lib/libc/sys/t_mknod.c index b394b31..1c5cd9b 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_mknod.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_mknod.c @@ -58,8 +58,15 @@ ATF_TC_BODY(mknod_err, tc) (void)memset(buf, 'x', sizeof(buf)); +#ifndef __FreeBSD__ + /* + * As of FreeBSD 6.0 device nodes may be created in regular file systems but + * such nodes cannot be used to access devices. As a result an invalid dev + * argument is unchecked. + */ errno = 0; ATF_REQUIRE_ERRNO(EINVAL, mknod(path, S_IFCHR, -1) == -1); +#endif errno = 0; ATF_REQUIRE_ERRNO(ENAMETOOLONG, mknod(buf, S_IFCHR, 0) == -1); @@ -166,6 +173,9 @@ ATF_TC_BODY(mknod_stat, tc) (void)memset(&st, 0, sizeof(struct stat)); +#ifdef __FreeBSD__ + atf_tc_expect_fail("mknod does not allow S_IFREG"); +#endif ATF_REQUIRE(mknod(path, S_IFREG, 0) == 0); ATF_REQUIRE(stat(path, &st) == 0); |