]> granicus.if.org Git - zfs/commitdiff
ZTS: deletes home directories in /export/home
authorJohn Gallagher <jgallag88@gmail.com>
Tue, 12 Jun 2018 17:42:26 +0000 (10:42 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 12 Jun 2018 17:42:26 +0000 (10:42 -0700)
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 <jwk404@gmail.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Signed-off-by: John Gallagher <john.gallagher@delphix.com>
External-issue: LX-1099
Closes #7615

tests/zfs-tests/tests/functional/privilege/cleanup.ksh

index b7a1e419fa5d005e75858bf594728c0c658b064a..5d3ec7b853c9cb16943bbc8aa4433dbc6b98b277 100755 (executable)
 
 . $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" ]