]> granicus.if.org Git - zfs/commitdiff
ZTS: privilege group path cleanup
authorbunder2015 <omfgbunder@gmail.com>
Sun, 19 Aug 2018 04:17:22 +0000 (00:17 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sun, 19 Aug 2018 04:17:22 +0000 (21:17 -0700)
Removing hardcoded paths in privilege group tests

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: bunder2015 <omfgbunder@gmail.com>
Closes #7803

tests/zfs-tests/tests/functional/privilege/cleanup.ksh
tests/zfs-tests/tests/functional/privilege/privilege_001_pos.ksh
tests/zfs-tests/tests/functional/privilege/privilege_002_pos.ksh
tests/zfs-tests/tests/functional/privilege/setup.ksh

index 5d3ec7b853c9cb16943bbc8aa4433dbc6b98b277..0ef27460454c7ccfa5268685469334c988012474 100755 (executable)
@@ -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
index 0f8fda394f826914a4ea12ec1cb0f669a5f18c46..672bb8848633115016216b7478481ac63d2c0f53 100755 (executable)
@@ -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"
index 7a369817a5db10155449a74bcf313e10d0729826..da8e33ce7e804b45e58d7b81b6f2ee3e42014add 100755 (executable)
@@ -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
index badd83bed45c9bb223e51b4ec836824a2238610c..94576d835e7d8457f8a89b91c9a037645414f72f 100755 (executable)
@@ -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