From owner-svn-src-head@FreeBSD.ORG Tue Oct 21 18:06:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5D6A1C3; Tue, 21 Oct 2014 18:06:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1A51CB; Tue, 21 Oct 2014 18:06:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9LI64OO003434; Tue, 21 Oct 2014 18:06:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9LI64hf003433; Tue, 21 Oct 2014 18:06:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410211806.s9LI64hf003433@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 21 Oct 2014 18:06:04 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2014 18:06:05 -0000 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);