aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_user/misc/zfs_allow_001_neg.ksh
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_user/misc/zfs_allow_001_neg.ksh')
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_user/misc/zfs_allow_001_neg.ksh11
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_user/misc/zfs_allow_001_neg.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_user/misc/zfs_allow_001_neg.ksh
index 56a74e4ae427..ce474657b42c 100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_user/misc/zfs_allow_001_neg.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_user/misc/zfs_allow_001_neg.ksh
@@ -44,22 +44,15 @@
#
#
-# check to see if we have zfs allow
-zfs 2>&1 | grep "allow" > /dev/null
-if (($? != 0)) then
- log_unsupported "ZFS allow not supported on this machine."
-fi
-
log_assert "zfs allow returns an error when run as a user"
log_must zfs allow $TESTPOOL/$TESTFS
-log_mustnot zfs allow $(logname) create $TESTPOOL/$TESTFS
+log_mustnot zfs allow $(id -un) create $TESTPOOL/$TESTFS
# now verify that the above command actually did nothing by
# checking for any allow output. ( if no allows are granted,
# nothing should be output )
-OUTPUT=$(zfs allow $TESTPOOL/$TESTFS | grep "Local+Descendent" )
-if [ -n "$OUTPUT" ]
+if zfs allow $TESTPOOL/$TESTFS | grep -q "Local+Descendent"
then
log_fail "zfs allow permissions were granted on $TESTPOOL/$TESTFS"
fi