Skip to contentSkip to conversation

master - tests: aux extra protection for rm -rf

PATCH Zdenek Kabelac 1 participant 1 message May 12, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a7a23e7dd2f7fde59760a3d3f7c980d7a8f657a7
Commit:        a7a23e7dd2f7fde59760a3d3f7c980d7a8f657a7
Parent:        38b4354494d3e6742d082c82ae7fc957be44e7e1
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Sat May 12 00:05:27 2018 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Sat May 12 18:05:50 2018 +0200

tests: aux extra protection for rm -rf

---
 test/lib/aux.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
test/lib/aux.sh +1 -1
index 877934c..c56767e 100644
@@ -633,7 +633,7 @@ teardown() {
 	test -n "$TESTDIR" && {
 		cd "$TESTOLDPWD" || die "Failed to enter $TESTOLDPWD"
 		# after this delete no further write is possible
-		rm -rf "$TESTDIR" || echo BLA
+		rm -rf "${TESTDIR:?}" || echo BLA
 	}
 
 	echo "ok"