aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohn Gallagher <[email protected]>2018-06-12 10:42:26 -0700
committerBrian Behlendorf <[email protected]>2018-06-12 10:42:26 -0700
commitab24877bd3459c84a9220a06acbbbfbb337e59a9 (patch)
treefb91210ee4ef9e70e98cd708cb83f2ee542b95ec /tests
parent527757126088aed28a92399f6b5c1a2647f7e176 (diff)
ZTS: deletes home directories in /export/home
In the cleanup for the privilege tests, an empty variable, empty because the corresponding setup is skipped on Linux, results in /export/home being deleted. This patch adds an assertion that the variable is not empty, and causes the cleanup to be skipped on Linux as well. Reviewed by: John Wren Kennedy <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Paul Dagnelie <[email protected]> Signed-off-by: John Gallagher <[email protected]> External-issue: LX-1099 Closes #7615
Diffstat (limited to 'tests')
-rwxr-xr-xtests/zfs-tests/tests/functional/privilege/cleanup.ksh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/zfs-tests/tests/functional/privilege/cleanup.ksh b/tests/zfs-tests/tests/functional/privilege/cleanup.ksh
index b7a1e419f..5d3ec7b85 100755
--- a/tests/zfs-tests/tests/functional/privilege/cleanup.ksh
+++ b/tests/zfs-tests/tests/functional/privilege/cleanup.ksh
@@ -31,9 +31,15 @@
. $STF_SUITE/include/libtest.shlib
+if is_linux; then
+ log_unsupported "Privilege tests require pfexec command"
+fi
+
verify_runnable "global"
ZFS_USER=$(cat /tmp/zfs-privs-test-user.txt)
+[[ -z $ZFS_USER ]] && log_fail "no ZFS_USER found"
+
USES_NIS=$(cat /tmp/zfs-privs-test-nis.txt)
if [ "${USES_NIS}" == "true" ]