diff options
author | Brian Behlendorf <[email protected]> | 2019-12-27 16:41:16 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-27 16:41:16 -0800 |
commit | edb24bec3b90fb47d82254ecffc250d346ee77f9 (patch) | |
tree | 011da811607211fb89521ee18616f8eb5067de75 | |
parent | a6f6ef8bda9d012f3217acd2e94cf0dd445ae5c1 (diff) |
ZTS: Replace /var/tmp with $TEST_BASE_DIR
Remove a few hardcoded instances of /var/tmp. This should use
the $TEST_BASE_DIR in order to allow the ZTS to be optionally
run in an alternate directory using `zfs-tests.sh -d <path>`.
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Reviewed-by: Igor Kozhukhov <[email protected]>
Reviewed-by: Kjeld Schouten <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #9775
4 files changed, 11 insertions, 12 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_dev_removal.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_dev_removal.ksh index 784bd328e..107c13319 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_dev_removal.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_dev_removal.ksh @@ -37,10 +37,10 @@ function cleanup log_onexit cleanup -VIRTUAL_DISK1=/var/tmp/disk1 -VIRTUAL_DISK2=/var/tmp/disk2 -log_must mkfile $(($MINVDEVSIZE * 8)) $VIRTUAL_DISK1 -log_must mkfile $(($MINVDEVSIZE * 16)) $VIRTUAL_DISK2 +VIRTUAL_DISK1=$TEST_BASE_DIR/disk1 +VIRTUAL_DISK2=$TEST_BASE_DIR/disk2 +log_must truncate -s $(($MINVDEVSIZE * 8)) $VIRTUAL_DISK1 +log_must truncate -s $(($MINVDEVSIZE * 16)) $VIRTUAL_DISK2 log_must zpool create $TESTPOOL2 $VIRTUAL_DISK1 log_must poolexists $TESTPOOL2 diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_dev_removal_condense.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_dev_removal_condense.ksh index 22a942d15..677dcf511 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_dev_removal_condense.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_dev_removal_condense.ksh @@ -48,10 +48,10 @@ log_onexit cleanup ORIGINAL_MAX=$(get_tunable $LIVELIST_MAX_ENTRIES) set_tunable64 $LIVELIST_MAX_ENTRIES 20 -VIRTUAL_DISK1=/var/tmp/disk1 -VIRTUAL_DISK2=/var/tmp/disk2 -log_must mkfile $(($MINVDEVSIZE * 8)) $VIRTUAL_DISK1 -log_must mkfile $(($MINVDEVSIZE * 16)) $VIRTUAL_DISK2 +VIRTUAL_DISK1=$TEST_BASE_DIR/disk1 +VIRTUAL_DISK2=$TEST_BASE_DIR/disk2 +log_must truncate -s $(($MINVDEVSIZE * 8)) $VIRTUAL_DISK1 +log_must truncate -s $(($MINVDEVSIZE * 16)) $VIRTUAL_DISK2 log_must zpool create $TESTPOOL2 $VIRTUAL_DISK1 log_must poolexists $TESTPOOL2 diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_001_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_001_pos.ksh index b0a319d41..2c6e3fdd6 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_001_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_001_pos.ksh @@ -75,7 +75,7 @@ log_onexit cleanup init_snap=$TESTPOOL/$TESTFS@init_snap inc_snap=$TESTPOOL/$TESTFS@inc_snap full_bkup=$TEST_BASE_DIR/fullbkup.$$ -inc_bkup=/var/tmp/incbkup.$$ +inc_bkup=$TEST_BASE_DIR/incbkup.$$ init_data=$TESTDIR/$TESTFILE1 inc_data=$TESTDIR/$TESTFILE2 orig_sum="" diff --git a/tests/zfs-tests/tests/functional/cli_user/zfs_list/zfs_list_007_pos.ksh b/tests/zfs-tests/tests/functional/cli_user/zfs_list/zfs_list_007_pos.ksh index d881b831f..8e9009bd5 100755 --- a/tests/zfs-tests/tests/functional/cli_user/zfs_list/zfs_list_007_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_user/zfs_list/zfs_list_007_pos.ksh @@ -57,9 +57,8 @@ function cleanup log_onexit cleanup log_assert "'zfs list -d <n>' should get expected output." -mntpnt=/var/tmp -DEPTH_OUTPUT="$mntpnt/depth_output" -EXPECT_OUTPUT="$mntpnt/expect_output" +DEPTH_OUTPUT="$TEST_BASE_DIR/depth_output" +EXPECT_OUTPUT="$TEST_BASE_DIR/expect_output" typeset -i old_val=0 typeset -i j=0 typeset -i fs=0 |