Commit 6127b1a3 authored by Karol Latecki's avatar Karol Latecki Committed by Tomasz Zawadzki
Browse files

test/common: use sudo to remove old temp files



Most common scenario is to run SPDK tests using "autorun.sh",
which calls autotest.sh with "sudo" and permissions are not
an issue then.
However we have a number of tests which are run independently
(e.g. test/fuzz/autofuzz.sh) and try to remove old temp files
before sudo is used to elevate privileges. This causes tests
to fail early.
Using "sudo" explicitly in autotest_common.sh to remove old
files will fix the problem.

Signed-off-by: default avatarKarol Latecki <karol.latecki@intel.com>
Change-Id: I84f75c189bb04d0e3208dfc4f221d07d17db5ee5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3819


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarMichal Berger <michalx.berger@intel.com>
parent fa729fd3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ function set_test_storage() {
	if ((${#storage_fallback_purge[@]} > 0)); then
		printf '* Purging old temporary test storage (%s)\n' \
			"${storage_fallback_purge[*]}" >&2
		rm -rf "${storage_fallback_purge[@]}"
		sudo rm -rf "${storage_fallback_purge[@]}"
	fi

	storage_fallback=$(mktemp -udt spdk.XXXXXX)