svn commit: r273572 - head/contrib/netbsd-tests/lib/libc/sys

Garrett Cooper ngie at FreeBSD.org
Fri Oct 24 03:42:38 UTC 2014


Author: ngie
Date: Fri Oct 24 03:42:37 2014
New Revision: 273572
URL: https://svnweb.freebsd.org/changeset/base/273572

Log:
  - 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

Modified:
  head/contrib/netbsd-tests/lib/libc/sys/t_mknod.c

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_mknod.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_mknod.c	Fri Oct 24 03:34:21 2014	(r273571)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_mknod.c	Fri Oct 24 03:42:37 2014	(r273572)
@@ -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);
 


More information about the svn-src-all mailing list