Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Oct 2014 03:42:37 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273572 - head/contrib/netbsd-tests/lib/libc/sys
Message-ID:  <201410240342.s9O3gbQ1050614@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410240342.s9O3gbQ1050614>