summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunder2015 <[email protected]>2018-06-06 13:00:22 -0400
committerBrian Behlendorf <[email protected]>2018-06-06 10:00:22 -0700
commit62841115bc77fbd8b55d89f07cbe1cc4fb3bc520 (patch)
treeca32805a44306f2328076ea333f0fe4f2ff441fc
parent37fb3e431845b934df9771d7bcca5fbef79f4c1e (diff)
ZTS: history path cleanup
History tests were hard coded to use /tmp and didn't clean up properly after testing. Reviewed by: John Wren Kennedy <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: bunder2015 <[email protected]> Issue #7507 Closes #7600
-rwxr-xr-xtests/zfs-tests/tests/functional/history/cleanup.ksh4
-rw-r--r--tests/zfs-tests/tests/functional/history/history.cfg6
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/zfs-tests/tests/functional/history/cleanup.ksh b/tests/zfs-tests/tests/functional/history/cleanup.ksh
index 688174188..32ed921ff 100755
--- a/tests/zfs-tests/tests/functional/history/cleanup.ksh
+++ b/tests/zfs-tests/tests/functional/history/cleanup.ksh
@@ -31,8 +31,6 @@
. $STF_SUITE/include/libtest.shlib
-[[ -f $OLD_HISTORY ]] && rm -f $OLD_HISTORY
-[[ -f $TMP_HISTORY ]] && rm -f $TMP_HISTORY
-[[ -f $NEW_HISTORY ]] && rm -f $NEW_HISTORY
+rm -f $TEST_BASE_DIR/{old,tmp,new}_history.*
default_cleanup
diff --git a/tests/zfs-tests/tests/functional/history/history.cfg b/tests/zfs-tests/tests/functional/history/history.cfg
index e1ed76e1a..bbbd612a6 100644
--- a/tests/zfs-tests/tests/functional/history/history.cfg
+++ b/tests/zfs-tests/tests/functional/history/history.cfg
@@ -32,9 +32,9 @@ export ZFSROOT=
export MPOOL=mpool.$$
-export OLD_HISTORY=/tmp/old_history.$$
-export TMP_HISTORY=/tmp/tmp_history.$$
-export NEW_HISTORY=/tmp/new_history.$$
+export OLD_HISTORY=$TEST_BASE_DIR/old_history.$$
+export TMP_HISTORY=$TEST_BASE_DIR/tmp_history.$$
+export NEW_HISTORY=$TEST_BASE_DIR/new_history.$$
export MIGRATEDPOOLNAME=${MIGRATEDPOOLNAME:-history_pool}
export TIMEZONE=${TIMEZONE:-US/Mountain}