diff options
author | bunder2015 <[email protected]> | 2018-08-19 00:17:22 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-08-18 21:17:22 -0700 |
commit | 5468ee7a2f659cd33b3652cefff6ce4aa987e574 (patch) | |
tree | b218d79eccbf87f2aec2abd29a81882cc571adb5 | |
parent | 089b16f48da2255b2c47cbab9dfbac3dcfe43ae8 (diff) |
ZTS: privilege group path cleanup
Removing hardcoded paths in privilege group tests
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: bunder2015 <[email protected]>
Closes #7803
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 |