grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tests/util/grub-shell-luks-tester: Do not remove generated files


From: Glenn Washburn
Subject: [PATCH] tests/util/grub-shell-luks-tester: Do not remove generated files when test fails to allow debugging
Date: Mon, 14 Aug 2023 15:00:10 -0500

Signed-off-by: Glenn Washburn <development@efficientek.com>
---
 tests/util/grub-shell-luks-tester.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/util/grub-shell-luks-tester.in 
b/tests/util/grub-shell-luks-tester.in
index 850a20d6a7a8..3f9d1be17644 100644
--- a/tests/util/grub-shell-luks-tester.in
+++ b/tests/util/grub-shell-luks-tester.in
@@ -145,7 +145,9 @@ cleanup() {
     if [ -e "$luksdev" ]; then
         cryptsetup close "$luksdev"
     fi
-    [ -z "$debug" ] && rm -rf "$lukstestdir" || :
+    if [ -z "$debug" ] && [ "${RET:-1}" -eq 0 ]; then
+        rm -rf "$lukstestdir" || :
+    fi
 }
 trap cleanup EXIT INT TERM KILL QUIT
 
-- 
2.34.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]