Commit 570c8bb4 authored by Michal Berger's avatar Michal Berger Committed by Jim Harris
Browse files

autotest: Purge tmp test dirs during the final cleanup



Fixes #2006

Signed-off-by: default avatarMichal Berger <michalx.berger@intel.com>
Change-Id: I3dbc0cb1177f3611b6d5684ddac7d26c64cc0479
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8476


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
parent 242a99ba
Loading
Loading
Loading
Loading
+10 −11
Original line number Diff line number Diff line
@@ -291,17 +291,6 @@ function set_test_storage() {
	local source fs size avail mount use

	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_candidates=(
@@ -1245,6 +1234,16 @@ function autotest_cleanup() {
		kill "$udevadm_pid" || :
	fi
	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() {