Linux block layer
 help / color / mirror / Atom feed
* [PATCH blktests V2] check: define TMPDIR earlier in _run_group
@ 2023-10-11  7:25 Yi Zhang
  2023-10-11  7:58 ` Daniel Wagner
  0 siblings, 1 reply; 4+ messages in thread
From: Yi Zhang @ 2023-10-11  7:25 UTC (permalink / raw)
  To: linux-block; +Cc: shinichiro.kawasaki, dwagner

The TMPDIR was defined in _call_test before running test_func, but it
was used in nvme/rc which has not yet defined, so move the definiation
before calling tests/${group}/rc in _run_group.

Fixes: b6356f6 ("nvme/rc: Add common file_path name define")
Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
---
 check | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/check b/check
index 55871b0..99d8a69 100755
--- a/check
+++ b/check
@@ -364,9 +364,6 @@ _call_test() {
 
 		unset TEST_CLEANUP
 		trap _cleanup EXIT
-		if ! TMPDIR="$(mktemp --tmpdir -p "$OUTPUT" -d "tmpdir.${TEST_NAME//\//.}.XXX")"; then
-			return
-		fi
 
 		TIMEFORMAT="%Rs"
 		pushd . >/dev/null || return
@@ -559,6 +556,10 @@ _run_group() {
 	local tests=("$@")
 	local group="${tests["0"]%/*}"
 
+	if ! TMPDIR="$(mktemp --tmpdir -p "$OUTPUT" -d "tmpdir.${TEST_NAME//\//.}.XXX")"; then
+		return
+	fi
+
 	# shellcheck disable=SC1090
 	. "tests/${group}/rc"
 
-- 
2.34.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-12  2:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-11  7:25 [PATCH blktests V2] check: define TMPDIR earlier in _run_group Yi Zhang
2023-10-11  7:58 ` Daniel Wagner
2023-10-11 12:15   ` Shinichiro Kawasaki
2023-10-12  2:16     ` Shinichiro Kawasaki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox