From 5468ee7a2f659cd33b3652cefff6ce4aa987e574 Mon Sep 17 00:00:00 2001 From: bunder2015 Date: Sun, 19 Aug 2018 00:17:22 -0400 Subject: [PATCH] ZTS: privilege group path cleanup Removing hardcoded paths in privilege group tests Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Signed-off-by: bunder2015 Closes #7803 --- tests/zfs-tests/tests/functional/privilege/cleanup.ksh | 8 ++++---- .../tests/functional/privilege/privilege_001_pos.ksh | 2 +- .../tests/functional/privilege/privilege_002_pos.ksh | 2 +- tests/zfs-tests/tests/functional/privilege/setup.ksh | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/zfs-tests/tests/functional/privilege/cleanup.ksh b/tests/zfs-tests/tests/functional/privilege/cleanup.ksh index 5d3ec7b85..0ef274604 100755 --- a/tests/zfs-tests/tests/functional/privilege/cleanup.ksh +++ b/tests/zfs-tests/tests/functional/privilege/cleanup.ksh @@ -37,10 +37,10 @@ fi verify_runnable "global" -ZFS_USER=$(cat /tmp/zfs-privs-test-user.txt) +ZFS_USER=$(cat $TEST_BASE_DIR/zfs-privs-test-user.txt) [[ -z $ZFS_USER ]] && log_fail "no ZFS_USER found" -USES_NIS=$(cat /tmp/zfs-privs-test-nis.txt) +USES_NIS=$(cat $TEST_BASE_DIR/zfs-privs-test-nis.txt) if [ "${USES_NIS}" == "true" ] then @@ -49,7 +49,7 @@ fi userdel $ZFS_USER [[ -d /export/home/$ZFS_USER ]] && rm -rf /export/home/$ZFS_USER -rm /tmp/zfs-privs-test-nis.txt -rm /tmp/zfs-privs-test-user.txt +rm $TEST_BASE_DIR/zfs-privs-test-nis.txt +rm $TEST_BASE_DIR/zfs-privs-test-user.txt default_cleanup diff --git a/tests/zfs-tests/tests/functional/privilege/privilege_001_pos.ksh b/tests/zfs-tests/tests/functional/privilege/privilege_001_pos.ksh index 0f8fda394..672bb8848 100755 --- a/tests/zfs-tests/tests/functional/privilege/privilege_001_pos.ksh +++ b/tests/zfs-tests/tests/functional/privilege/privilege_001_pos.ksh @@ -63,7 +63,7 @@ fi log_assert "The RBAC profile \"ZFS Storage Management\" works" -ZFS_USER=$(cat /tmp/zfs-privs-test-user.txt) +ZFS_USER=$(cat $TEST_BASE_DIR/zfs-privs-test-user.txt) # the user shouldn't be able to do anything initially log_mustnot user_run $ZFS_USER "zpool create $TESTPOOL $DISKS" diff --git a/tests/zfs-tests/tests/functional/privilege/privilege_002_pos.ksh b/tests/zfs-tests/tests/functional/privilege/privilege_002_pos.ksh index 7a369817a..da8e33ce7 100755 --- a/tests/zfs-tests/tests/functional/privilege/privilege_002_pos.ksh +++ b/tests/zfs-tests/tests/functional/privilege/privilege_002_pos.ksh @@ -66,7 +66,7 @@ fi log_assert "The RBAC profile \"ZFS File System Management\" works" -ZFS_USER=$(cat /tmp/zfs-privs-test-user.txt) +ZFS_USER=$(cat $TEST_BASE_DIR/zfs-privs-test-user.txt) # Set a $DATASET where we can create child files systems if is_global_zone; then diff --git a/tests/zfs-tests/tests/functional/privilege/setup.ksh b/tests/zfs-tests/tests/functional/privilege/setup.ksh index badd83bed..94576d835 100755 --- a/tests/zfs-tests/tests/functional/privilege/setup.ksh +++ b/tests/zfs-tests/tests/functional/privilege/setup.ksh @@ -65,7 +65,7 @@ done log_must mkdir -p /export/home/$ZFS_USER log_must useradd -c "ZFS Privileges Test User" -d /export/home/$ZFS_USER $ZFS_USER -echo $ZFS_USER > /tmp/zfs-privs-test-user.txt -echo $USES_NIS > /tmp/zfs-privs-test-nis.txt +echo $ZFS_USER > $TEST_BASE_DIR/zfs-privs-test-user.txt +echo $USES_NIS > $TEST_BASE_DIR/zfs-privs-test-nis.txt log_pass -- 2.40.0