* [PATCH 1/4] grub-shell: Add --verbose to mkrescue when $debug is greater than 2
2023-07-11 3:01 [PATCH 0/4] More grub shell debugging Glenn Washburn
@ 2023-07-11 3:01 ` Glenn Washburn
2023-07-11 3:01 ` [PATCH 2/4] grub-shell: Allow setting default timeout via GRUB_SHELL_DEFAULT_TIMEOUT envvar Glenn Washburn
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Glenn Washburn @ 2023-07-11 3:01 UTC (permalink / raw)
To: grub-devel, Daniel Kiper; +Cc: Glenn Washburn
Since this is fairly verbose output, do not enable first level of debug
is turned on.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
tests/util/grub-shell.in | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in
index a0ca18e41c3f..5cbe79447e99 100644
--- a/tests/util/grub-shell.in
+++ b/tests/util/grub-shell.in
@@ -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" \
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/4] grub-shell: Allow setting default timeout via GRUB_SHELL_DEFAULT_TIMEOUT envvar
2023-07-11 3:01 [PATCH 0/4] More grub shell debugging Glenn Washburn
2023-07-11 3:01 ` [PATCH 1/4] grub-shell: Add --verbose to mkrescue when $debug is greater than 2 Glenn Washburn
@ 2023-07-11 3:01 ` Glenn Washburn
2023-07-11 3:01 ` [PATCH 3/4] grub-shell: Allow setting the value of debug regardless of its previous state Glenn Washburn
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Glenn Washburn @ 2023-07-11 3:01 UTC (permalink / raw)
To: grub-devel, Daniel Kiper; +Cc: Glenn Washburn
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
tests/util/grub-shell.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in
index 5cbe79447e99..9669b7227c10 100644
--- a/tests/util/grub-shell.in
+++ b/tests/util/grub-shell.in
@@ -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}
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/4] grub-shell: Allow setting the value of debug regardless of its previous state
2023-07-11 3:01 [PATCH 0/4] More grub shell debugging Glenn Washburn
2023-07-11 3:01 ` [PATCH 1/4] grub-shell: Add --verbose to mkrescue when $debug is greater than 2 Glenn Washburn
2023-07-11 3:01 ` [PATCH 2/4] grub-shell: Allow setting default timeout via GRUB_SHELL_DEFAULT_TIMEOUT envvar Glenn Washburn
@ 2023-07-11 3:01 ` Glenn Washburn
2023-07-11 3:01 ` [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 Glenn Washburn
2023-07-13 18:20 ` [PATCH 0/4] More grub shell debugging Daniel Kiper
4 siblings, 0 replies; 6+ messages in thread
From: Glenn Washburn @ 2023-07-11 3:01 UTC (permalink / raw)
To: grub-devel, Daniel Kiper; +Cc: Glenn Washburn
This allows an invocation of grub-shell to set the value of debug regardless
of the global default environment variable GRUB_SHELL_DEFAULT_DEBUG.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
tests/util/grub-shell.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in
index 9669b7227c10..e066105de917 100644
--- a/tests/util/grub-shell.in
+++ b/tests/util/grub-shell.in
@@ -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" ;;
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [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
2023-07-11 3:01 [PATCH 0/4] More grub shell debugging Glenn Washburn
` (2 preceding siblings ...)
2023-07-11 3:01 ` [PATCH 3/4] grub-shell: Allow setting the value of debug regardless of its previous state Glenn Washburn
@ 2023-07-11 3:01 ` Glenn Washburn
2023-07-13 18:20 ` [PATCH 0/4] More grub shell debugging Daniel Kiper
4 siblings, 0 replies; 6+ messages in thread
From: Glenn Washburn @ 2023-07-11 3:01 UTC (permalink / raw)
To: grub-devel, Daniel Kiper; +Cc: Glenn Washburn
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 18920619a10a..850a20d6a7a8 100644
--- a/tests/util/grub-shell-luks-tester.in
+++ b/tests/util/grub-shell-luks-tester.in
@@ -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
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 0/4] More grub shell debugging
2023-07-11 3:01 [PATCH 0/4] More grub shell debugging Glenn Washburn
` (3 preceding siblings ...)
2023-07-11 3:01 ` [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 Glenn Washburn
@ 2023-07-13 18:20 ` Daniel Kiper
4 siblings, 0 replies; 6+ messages in thread
From: Daniel Kiper @ 2023-07-13 18:20 UTC (permalink / raw)
To: Glenn Washburn; +Cc: grub-devel
On Mon, Jul 10, 2023 at 10:01:15PM -0500, Glenn Washburn wrote:
> 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
For all patches Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>...
Daniel
^ permalink raw reply [flat|nested] 6+ messages in thread