mirror of
https://git.proxmox.com/git/mirror_zfs
synced 2025-04-28 11:40:17 +00:00
ZTS: zfs-tests: use configured FILEDIR for all temp paths
The default file vdevs, constrained binpath and temporary runfiles were all explicitly places in /var/tmp. Instead, put them under FILEDIR, which is set from -d and defaults to /var/tmp. TEST_BASE_DIR is also initialised from FILEDIR, which means all data for the run will now end up under the operator-specified data dir. Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Reviewed-by: Igor Kozhukhov <igor@dilos.org>
This commit is contained in:
parent
4afec534cc
commit
cc9180d338
@ -152,7 +152,7 @@ cleanup_all() {
|
||||
else
|
||||
TEST_LOOPBACKS=$("${LOSETUP}" -a | awk -F: '/file-vdev/ {print $1}')
|
||||
fi
|
||||
TEST_FILES=$(ls "${FILEDIR}"/file-vdev* /var/tmp/file-vdev* 2>/dev/null)
|
||||
TEST_FILES=$(ls "${FILEDIR}"/file-vdev* 2>/dev/null)
|
||||
|
||||
msg
|
||||
msg "--- Cleanup ---"
|
||||
@ -308,8 +308,8 @@ constrain_path() {
|
||||
# Special case links for zfs test suite utilities
|
||||
create_links "$CMD_DIR/tests/zfs-tests/cmd" "$ZFSTEST_FILES"
|
||||
else
|
||||
# Constrained path set to /var/tmp/constrained_path.*
|
||||
SYSTEMDIR=${SYSTEMDIR:-/var/tmp/constrained_path.XXXXXX}
|
||||
# Constrained path set to $FILEDIR/constrained_path.*
|
||||
SYSTEMDIR=${SYSTEMDIR:-$FILEDIR/constrained_path.XXXXXX}
|
||||
STF_PATH=$(mktemp -d "$SYSTEMDIR")
|
||||
STF_PATH_REMOVE="yes"
|
||||
STF_MISSING_BIN=""
|
||||
@ -492,7 +492,7 @@ if [ -n "$SINGLETEST" ]; then
|
||||
if [ -n "$TAGS" ]; then
|
||||
fail "-t and -T are mutually exclusive."
|
||||
fi
|
||||
RUNFILE_DIR="/var/tmp"
|
||||
RUNFILE_DIR="$FILEDIR"
|
||||
RUNFILES="zfs-tests.$$.run"
|
||||
[ -n "$QUIET" ] && SINGLEQUIET="True" || SINGLEQUIET="False"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user