From: Glenn Washburn Date: Mon, 3 Mar 2025 08:12:03 +0000 (-0600) Subject: tests/grub_cmd_cryptomount: Cleanup the cryptsetup script unless debug is enabled X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32b02bb92eb12be8391c7269346692119cb4c441;p=thirdparty%2Fgrub.git tests/grub_cmd_cryptomount: Cleanup the cryptsetup script unless debug is enabled This fixes an issue where the grub_cmd_cryptomount test leaves a file with an ambiguous name in the / directory when TMPDIR is not set. Reported-by: Thomas Schmitt Signed-off-by: Glenn Washburn Tested-by: Thomas Schmitt Reviewed-by: Daniel Kiper --- diff --git a/tests/grub_cmd_cryptomount.in b/tests/grub_cmd_cryptomount.in index 63ed8e51b..2fba8a8e0 100644 --- a/tests/grub_cmd_cryptomount.in +++ b/tests/grub_cmd_cryptomount.in @@ -37,6 +37,8 @@ fi COMMON_OPTS='${V:+--debug=$V} --cs-opts="--pbkdf-force-iterations 1000"' +debug=${GRUB_SHELL_DEFAULT_DEBUG:-$GRUB_TEST_DEFAULT_DEBUG} + _testcase() { local EXPECTEDRES=$1 local LOGPREFIX=$2 @@ -183,4 +185,5 @@ eval testcase "'LUKS2 test with second key slot and first slot using different p @builddir@/grub-shell-luks-tester $LUKS2_COMMON_OPTS $COMMON_OPTS \ "--cs-script='$csscript'" +test -n "$debug" || rm "$csscript" exit 0