Skip to content

Commit

Permalink
ZTS: deletes home directories in /export/home
Browse files Browse the repository at this point in the history
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 openzfs#7615
  • Loading branch information
John Gallagher authored and behlendorf committed Jun 12, 2018
1 parent 5277571 commit ab24877
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/zfs-tests/tests/functional/privilege/cleanup.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down

0 comments on commit ab24877

Please sign in to comment.