Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 2014 18:06:04 +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: r273396 - head/contrib/netbsd-tests/lib/libc/sys
Message-ID:  <201410211806.s9LI64hf003433@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Tue Oct 21 18:06:04 2014
New Revision: 273396
URL: https://svnweb.freebsd.org/changeset/base/273396

Log:
  unlink("/") fails with EISDIR instead of EBUSY on FreeBSD; test for that
  instead
  
  Sponsored by: EMC / Isilon Storage Division

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

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c	Tue Oct 21 18:01:37 2014	(r273395)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_unlink.c	Tue Oct 21 18:06:04 2014	(r273396)
@@ -85,7 +85,11 @@ ATF_TC_BODY(unlink_err, tc)
 	(void)memset(buf, 'x', sizeof(buf));
 
 	errno = 0;
+#if defined(__FreeBSD__)
+	ATF_REQUIRE_ERRNO(EISDIR, unlink("/") == -1);
+#else
 	ATF_REQUIRE_ERRNO(EBUSY, unlink("/") == -1);
+#endif
 
 	errno = 0;
 	ATF_REQUIRE_ERRNO(ENAMETOOLONG, unlink(buf) == -1);



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