More grub shell debugging
cover More grub shell debugging
These are fairly trivial patches making it easier to turn on debugging when running tests.
Glenn
Glenn Washburn (4):
grub-shell: Add --verbose to mkrescue when $debug is greater than 2
grub-shell: Allow setting default timeout via
GRUB_SHELL_DEFAULT_TIMEOUT envvar
grub-shell: Allow setting the value of debug regardless of its
previous state
tests/util/grub-shell-luks-tester: Allow GRUB_SHELL_LUKS_DEFAULT_DEBUG
and GRUB_TEST_DEFAULT_DEBUG to specify the debug level to grub-shell
tests/util/grub-shell-luks-tester.in | 4 +++- tests/util/grub-shell.in | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/4 grub-shell: Add --verbose to mkrescue when $debug is greater than 2
Since this is fairly verbose output, do not enable first level of debug is turned on.
--- tests/util/grub-shell.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tests/util/grub-shell.in +3 -1
@@ -422,7 +422,9 @@ fi if [ x$boot != xnet ] && [ x$boot != xemu ]; then pkgdatadir="${builddir}" \ - exec_show_error "${builddir}/grub-mkrescue" "--output=${isofile}" \ + exec_show_error "${builddir}/grub-mkrescue" \ + ${debug:+$([ "$debug" -gt 2 ] && echo -n "--verbose")} \ + "--output=${isofile}" \ "--override-directory=${builddir}/grub-core" \ --rom-directory="${rom_directory}" \ --locale-directory="${srcdir}/po" \
Signature · 1 line
2.34.1
PATCH 2/4 grub-shell: Allow setting default timeout via GRUB_SHELL_DEFAULT_TIMEOUT envvar
In reply to Glenn Washburn--- tests/util/grub-shell.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/util/grub-shell.in +1 -1
@@ -225,7 +225,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in console=console;; esac -timeout=60 +timeout=${GRUB_SHELL_DEFAULT_TIMEOUT:-60} mkimage_extra_arg= debug=${GRUB_SHELL_DEFAULT_DEBUG:-$GRUB_TEST_DEFAULT_DEBUG}
Signature · 1 line
2.34.1
PATCH 3/4 grub-shell: Allow setting the value of debug regardless of its previous state
In reply to Glenn WashburnThis allows an invocation of grub-shell to set the value of debug regardless of the global default environment variable GRUB_SHELL_DEFAULT_DEBUG.
--- tests/util/grub-shell.in | 2 ++ 1 file changed, 2 insertions(+)
tests/util/grub-shell.in +2 -0
@@ -248,6 +248,8 @@ for option in "$@"; do trim=0 ;; --debug) debug=$((debug+1)) ;; + --debug=*) + debug=$((`echo "$option" | sed -e 's/--debug=//'`)) ;; --modules=*) ms=`echo "$option" | sed -e 's/--modules=//' -e 's/,/ /g'` modules="$modules $ms" ;;
Signature · 1 line
2.34.1
PATCH 4/4 tests/util/grub-shell-luks-tester: Allow GRUB_SHELL_LUKS_DEFAULT_DEBUG and GRUB_TEST_DEFAULT_DEBUG to specify the debug level to grub-shell
In reply to Glenn Washburn--- tests/util/grub-shell-luks-tester.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tests/util/grub-shell-luks-tester.in +3 -1
@@ -37,6 +37,8 @@ keyfile_offset= keyfile_size= KEYFILE_SIZE_MAX=4096 +debug="${GRUB_SHELL_LUKS_DEFAULT_DEBUG:-$GRUB_TEST_DEFAULT_DEBUG}" + # Usage: usage # Print the usage. usage () {
@@ -350,7 +352,7 @@ if [ -n "$detached_header" ]; then fi # Run the test in grub-shell -@builddir@/grub-shell ${debug:+--debug} $grub_shell_opts \ +@builddir@/grub-shell ${debug:+--debug=$debug} $grub_shell_opts \ --modules="$modules" --qemu-opts="$qemuopts" \ --files="${grub_testvars}=${testvars}" "$testcase" \ >$testoutput
Signature · 1 line
2.34.1
Quoted 5 lines · Glenn Washburn
These are fairly trivial patches making it easier to turn on debugging when running tests.
Glenn
Quoted 8 lines
Glenn Washburn (4):
grub-shell: Add --verbose to mkrescue when $debug is greater than 2
grub-shell: Allow setting default timeout via
GRUB_SHELL_DEFAULT_TIMEOUTenvvar
grub-shell: Allow setting the value of debug regardless of its
previous state
tests/util/grub-shell-luks-tester: AllowGRUB_SHELL_LUKS_DEFAULT_DEBUG
andGRUB_TEST_DEFAULT_DEBUGto specify the debug level to grub-shell
For all patches Reviewed-by: Daniel Kiper <[email protected]>...
Daniel