autotest: Purge tmp test dirs during the final cleanup
Fixes #2006 Signed-off-by: Michal Berger <michalx.berger@intel.com> Change-Id: I3dbc0cb1177f3611b6d5684ddac7d26c64cc0479 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8476 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
parent
242a99babf
commit
570c8bb483
@ -291,17 +291,6 @@ function set_test_storage() {
|
|||||||
local source fs size avail mount use
|
local source fs size avail mount use
|
||||||
|
|
||||||
local storage_fallback storage_candidates
|
local storage_fallback storage_candidates
|
||||||
local storage_fallback_purge
|
|
||||||
|
|
||||||
shopt -s nullglob
|
|
||||||
storage_fallback_purge=("${TMPDIR:-/tmp}/spdk."??????)
|
|
||||||
shopt -u nullglob
|
|
||||||
|
|
||||||
if ((${#storage_fallback_purge[@]} > 0)); then
|
|
||||||
printf '* Purging old temporary test storage (%s)\n' \
|
|
||||||
"${storage_fallback_purge[*]}" >&2
|
|
||||||
sudo rm -rf "${storage_fallback_purge[@]}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
storage_fallback=$(mktemp -udt spdk.XXXXXX)
|
storage_fallback=$(mktemp -udt spdk.XXXXXX)
|
||||||
storage_candidates=(
|
storage_candidates=(
|
||||||
@ -1245,6 +1234,16 @@ function autotest_cleanup() {
|
|||||||
kill "$udevadm_pid" || :
|
kill "$udevadm_pid" || :
|
||||||
fi
|
fi
|
||||||
revert_soft_roce
|
revert_soft_roce
|
||||||
|
|
||||||
|
shopt -s nullglob
|
||||||
|
local storage_fallback_purge=("${TMPDIR:-/tmp}/spdk."??????)
|
||||||
|
shopt -u nullglob
|
||||||
|
|
||||||
|
if ((${#storage_fallback_purge[@]} > 0)); then
|
||||||
|
printf '* Purging old temporary test storage (%s)\n' \
|
||||||
|
"${storage_fallback_purge[*]}" >&2
|
||||||
|
rm -rf "${storage_fallback_purge[@]}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function freebsd_update_contigmem_mod() {
|
function freebsd_update_contigmem_mod() {
|
||||||
|
Loading…
Reference in New Issue
Block a user