aboutsummaryrefslogtreecommitdiff
path: root/bin/chmod
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2017-08-02 21:18:54 +0000
committerEnji Cooper <ngie@FreeBSD.org>2017-08-02 21:18:54 +0000
commit2d3e9c25f1e19ae02ceb06c7ce3740bf8e31e6f5 (patch)
treea07be4bcdb55dc5cb793adcba5dcf50c06b322b2 /bin/chmod
parentcd85acba1a5b30c3fd1b8647a53bf3d62b9b3e93 (diff)
downloadsrc-2d3e9c25f1e19ae02ceb06c7ce3740bf8e31e6f5.tar.gz
src-2d3e9c25f1e19ae02ceb06c7ce3740bf8e31e6f5.zip
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 . MFC after: 1 week PR: 221189 [1], 221188 [2]
Notes
Notes: svn path=/head/; revision=321949
Diffstat (limited to 'bin/chmod')
-rwxr-xr-xbin/chmod/tests/chmod_test.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/chmod/tests/chmod_test.sh b/bin/chmod/tests/chmod_test.sh
index 4a6a6a3d21ef..33b28d3ace92 100755
--- a/bin/chmod/tests/chmod_test.sh
+++ b/bin/chmod/tests/chmod_test.sh
@@ -25,6 +25,11 @@
#
# $FreeBSD$
+get_filesystem()
+{
+ df -T . | tail -n 1 | cut -wf 2
+}
+
atf_test_case RH_flag
RH_flag_head()
{
@@ -94,6 +99,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
@@ -140,6 +150,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