From owner-svn-src-head@FreeBSD.ORG Tue Oct 21 18:10:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6C4E4A7; Tue, 21 Oct 2014 18:10:05 +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 C2C4110A; Tue, 21 Oct 2014 18:10:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9LIA516004253; Tue, 21 Oct 2014 18:10:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9LIA5Mb004252; Tue, 21 Oct 2014 18:10:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410211810.s9LIA5Mb004252@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:10:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273397 - 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:10:05 -0000 Author: ngie Date: Tue Oct 21 18:10:05 2014 New Revision: 273397 URL: https://svnweb.freebsd.org/changeset/base/273397 Log: Port t_chroot to FreeBSD - Add missing #include sys/stat.h for mkdir(2) - Omit the fchroot(2) tests because the support is not present on FreeBSD Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/sys/t_chroot.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_chroot.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_chroot.c Tue Oct 21 18:06:04 2014 (r273396) +++ head/contrib/netbsd-tests/lib/libc/sys/t_chroot.c Tue Oct 21 18:10:05 2014 (r273397) @@ -42,6 +42,10 @@ __RCSID("$NetBSD: t_chroot.c,v 1.1 2011/ #include #include +#ifdef __FreeBSD__ +#include +#endif + ATF_TC(chroot_basic); ATF_TC_HEAD(chroot_basic, tc) { @@ -167,6 +171,7 @@ ATF_TC_BODY(chroot_perm, tc) atf_tc_fail("chroot(2) succeeded as unprivileged user"); } +#ifdef __NetBSD__ ATF_TC(fchroot_basic); ATF_TC_HEAD(fchroot_basic, tc) { @@ -298,6 +303,7 @@ ATF_TC_BODY(fchroot_perm, tc) if (WIFEXITED(sta) == 0 || WEXITSTATUS(sta) != EXIT_SUCCESS) atf_tc_fail("fchroot(2) succeeded as unprivileged user"); } +#endif ATF_TP_ADD_TCS(tp) { @@ -305,9 +311,11 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, chroot_basic); ATF_TP_ADD_TC(tp, chroot_err); ATF_TP_ADD_TC(tp, chroot_perm); +#ifdef __NetBSD__ ATF_TP_ADD_TC(tp, fchroot_basic); ATF_TP_ADD_TC(tp, fchroot_err); ATF_TP_ADD_TC(tp, fchroot_perm); +#endif return atf_no_error(); }