From owner-svn-src-stable@freebsd.org Fri Feb 10 02:51:55 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53847CD8EBF; Fri, 10 Feb 2017 02:51:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 25D6B1270; Fri, 10 Feb 2017 02:51:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A2psSe006970; Fri, 10 Feb 2017 02:51:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A2prXG006967; Fri, 10 Feb 2017 02:51:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100251.v1A2prXG006967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 02:51:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313514 - stable/10/contrib/netbsd-tests/fs/tmpfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2017 02:51:55 -0000 Author: ngie Date: Fri Feb 10 02:51:53 2017 New Revision: 313514 URL: https://svnweb.freebsd.org/changeset/base/313514 Log: MFC r307190,r307196,r307204,r307205: r307190: Skip :uchg on FreeBSD Unfortunately removing files with uchg set always succeeds with root on FreeBSD. Unfortunately running the test as an unprivileged user isn't doable because mounting tmpfs requires root PR: 212861 r307196: Port contrib/netbsd-tests/fs/tmpfs/h_tools.c to FreeBSD - Add inttypes.h #include for PRId64 macro - Use FreeBSD's copy of getfh(2), which doesn't include a `fh_size` parameter. Use sizeof(fhandle_t) instead as the size of fhp is always fixed as fhandle_t, unlike NetBSD's copy of fhp, which is void*. r307204: Expect :large to fail on FreeBSD FreeBSD doesn't appear to validate large -o size values like NetBSD does PR: 212862 r307205: Change atf_skip call to atf_expect_fail to make it clear that a failure is expected PR: 212861 Suggested by: jmmv Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/h_tools.c stable/10/contrib/netbsd-tests/fs/tmpfs/t_mount.sh stable/10/contrib/netbsd-tests/fs/tmpfs/t_remove.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/h_tools.c ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/h_tools.c Fri Feb 10 02:48:24 2017 (r313513) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/h_tools.c Fri Feb 10 02:51:53 2017 (r313514) @@ -50,6 +50,10 @@ #include #include +#ifdef __FreeBSD__ +#include +#endif + /* --------------------------------------------------------------------- */ static int getfh_main(int, char **); @@ -70,7 +74,12 @@ getfh_main(int argc, char **argv) if (argc < 2) return EXIT_FAILURE; +#ifdef __FreeBSD__ + fh_size = sizeof(fhandle_t); +#else fh_size = 0; +#endif + fh = NULL; for (;;) { if (fh_size) { @@ -85,7 +94,11 @@ getfh_main(int argc, char **argv) * but it may change if someone moves things around, * so retry untill we have enough memory. */ +#ifdef __FreeBSD__ + error = getfh(argv[1], fh); +#else error = getfh(argv[1], fh, &fh_size); +#endif if (error == 0) { break; } else { Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_mount.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_mount.sh Fri Feb 10 02:48:24 2017 (r313513) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_mount.sh Fri Feb 10 02:51:53 2017 (r313514) @@ -93,7 +93,18 @@ negative_body() { test_unmount } +# Begin FreeBSD +if true; then +atf_test_case large cleanup +large_cleanup() { + umount -f tmp 2>/dev/null +} +else +# End FreeBSD atf_test_case large +# Begin FreeBSD +fi +# End FreeBSD large_head() { atf_set "descr" "Tests that extremely long values passed to -s" \ "are handled correctly" @@ -103,6 +114,10 @@ large_body() { test_mount -o -s9223372036854775807 test_unmount + # Begin FreeBSD + atf_expect_fail "-o -s succeeds unexpectedly on FreeBSD - bug 212862" + # End FreeBSD + mkdir tmp atf_check -s eq:1 -o empty -e ignore \ mount -t tmpfs -o -s9223372036854775808 tmpfs tmp Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_remove.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_remove.sh Fri Feb 10 02:48:24 2017 (r313513) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_remove.sh Fri Feb 10 02:51:53 2017 (r313514) @@ -46,13 +46,28 @@ single_body() { test_unmount } +# Begin FreeBSD +if true; then +atf_test_case uchg cleanup +uchg_cleanup() { + Mount_Point=$(pwd)/mntpt test_unmount || : +} +else +# End FreeBSD atf_test_case uchg +# Begin FreeBSD +fi +# End FreeBSD uchg_head() { atf_set "descr" "Checks that files with the uchg flag set cannot" \ "be removed" atf_set "require.user" "root" } uchg_body() { + # Begin FreeBSD + atf_expect_fail "this fails on FreeBSD with root - bug 212861" + # End FreeBSD + test_mount atf_check -s eq:0 -o empty -e empty touch a