Skip to contentSkip to conversation

tests/util/grub-shell-luks-tester: Do not remove generated files when test fails to allow debugging

PATCH In review Glenn Washburn 2 participants 2 messages Aug 14, 2023 – Aug 17, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/util/grub-shell-luks-tester: Do not remove generated files when test fails to allow debugging

---
 tests/util/grub-shell-luks-tester.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/util/grub-shell-luks-tester.in +3 -1
index 850a20d6a7a8..3f9d1be17644 100644
@@ -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
 
Signature · 7 lines
2.34.1


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel