From owner-svn-src-stable@freebsd.org Sat Aug 19 01:21:47 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 DAC59DE6880; Sat, 19 Aug 2017 01:21:47 +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 919708210A; Sat, 19 Aug 2017 01:21:47 +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 v7J1Lk2K037459; Sat, 19 Aug 2017 01:21:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7J1Lklt037458; Sat, 19 Aug 2017 01:21:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708190121.v7J1Lklt037458@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 19 Aug 2017 01:21:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r322685 - stable/11/bin/chmod/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/bin/chmod/tests X-SVN-Commit-Revision: 322685 X-SVN-Commit-Repository: base 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: Sat, 19 Aug 2017 01:21:48 -0000 Author: ngie Date: Sat Aug 19 01:21:46 2017 New Revision: 322685 URL: https://svnweb.freebsd.org/changeset/base/322685 Log: MFC r321949,r321950,r322101: r321949: Add expected failures for ZFS - :f_flag fails on ZFS because UF_IMMUTABLE isn't supported [1]. - :v_flag fails on ZFS because the mode for foo is [always] updated unnecessarily. get_filesystem(..) (supporting function that was added to the test script) is based on equivalent logic in usr.bin/extattr/tests/extattr_test.sh . PR: 221189 [1], 221188 [2] r321950: Always use first parameter passed to get_filesystem(..) instead of discarding it and using `.` instead. MFC with: r321949 PR: 221189 [1], 221188 [2] r322101: Don't check result of chflags in f_flag_cleanup() This will prevent false positives from occurring if the test is run on ZFS since ZFS doesn't support fflags throbbing like UFS. PR: 221189 MFC with: r321949 Modified: stable/11/bin/chmod/tests/chmod_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/chmod/tests/chmod_test.sh ============================================================================== --- stable/11/bin/chmod/tests/chmod_test.sh Sat Aug 19 01:12:05 2017 (r322684) +++ stable/11/bin/chmod/tests/chmod_test.sh Sat Aug 19 01:21:46 2017 (r322685) @@ -25,6 +25,13 @@ # # $FreeBSD$ +get_filesystem() +{ + local mountpoint=$1 + + df -T $mountpoint | tail -n 1 | cut -wf 2 +} + atf_test_case RH_flag RH_flag_head() { @@ -94,6 +101,11 @@ f_flag_body() { atf_check truncate -s 0 foo bar atf_check chmod 0750 foo bar + case "$(get_filesystem .)" in + zfs) + atf_expect_fail "ZFS doesn't support UF_IMMUTABLE; returns EPERM - bug 221189" + ;; + esac atf_check chflags uchg foo atf_check -e not-empty -s not-exit:0 chmod 0700 foo bar atf_check -o inline:'100750\n100700\n' stat -f '%p' foo bar @@ -103,7 +115,7 @@ f_flag_body() f_flag_cleanup() { - atf_check chflags 0 foo + chflags 0 foo || : } atf_test_case h_flag @@ -140,6 +152,11 @@ v_flag_body() atf_check truncate -s 0 foo bar atf_check chmod 0600 foo atf_check chmod 0750 bar + case "$(get_filesystem .)" in + zfs) + atf_expect_fail "ZFS updates mode for foo unnecessarily - bug 221188" + ;; + esac atf_check -o 'inline:bar\n' chmod -v 0600 foo bar atf_check chmod -v 0600 foo bar for f in foo bar; do