Thread (30 messages) 30 messages, 5 authors, 2018-06-27
STALE2947d

[PATCH blktests 12/15] check: Make TMPDIR absolute

From: Bart Van Assche <hidden>
Date: 2018-06-22 22:19:53
Subsystem: the rest · Maintainer: Linus Torvalds

This avoids that ${TMPDIR} gets misinterpreted if a test script
modifies the working directory.

Signed-off-by: Bart Van Assche <redacted>
---
 check | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/check b/check
index cf2090f546a5..a7dd825ad03a 100755
--- a/check
+++ b/check
@@ -323,7 +323,7 @@ _call_test() {
 	fi
 
 	trap _cleanup EXIT
-	if ! TMPDIR="$(mktemp --tmpdir -p results -d "tmpdir.${TEST_NAME//\//.}.XXX")"; then
+	if ! TMPDIR="$(mktemp --tmpdir -p "$PWD/results" -d "tmpdir.${TEST_NAME//\//.}.XXX")"; then
 		return
 	fi
 
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help