]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
tests/util/grub-shell-luks-tester: Allow setting timeout
authorGlenn Washburn <development@efficientek.com>
Sat, 19 Aug 2023 06:59:17 +0000 (01:59 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 31 Aug 2023 15:09:04 +0000 (17:09 +0200)
Allow using the envvar GRUB_SHELL_LUKS_TIMEOUT to change the default
timeout. If not specified, use value of GRUB_SHELL_DEFAULT_TIMEOUT. And
if that is not specified, fallback to original 600s timeout.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
tests/util/grub-shell-luks-tester.in

index 3f9d1be1764473798957dd46935d893f4a45c88f..8926cbc96efaab9c3fb677b4f23512a837b52970 100644 (file)
@@ -38,6 +38,7 @@ keyfile_size=
 KEYFILE_SIZE_MAX=4096
 
 debug="${GRUB_SHELL_LUKS_DEFAULT_DEBUG:-$GRUB_TEST_DEFAULT_DEBUG}"
+GRUB_SHELL_LUKS_TIMEOUT=${GRUB_SHELL_LUKS_TIMEOUT:-${GRUB_SHELL_DEFAULT_TIMEOUT:-600s}}
 
 # Usage: usage
 # Print the usage.
@@ -134,7 +135,7 @@ done
 
 [ "${debug:-0}" -gt 1 ] && set -x
 
-grub_shell_opts="$grub_shell_opts --timeout=600s"
+grub_shell_opts="$grub_shell_opts --timeout=${GRUB_SHELL_LUKS_TIMEOUT}"
 
 if [ "${debug:-0}" -gt 2 ]; then
     grub_shell_opts="$grub_shell_opts --qemu-opts=-nographic"