* [PATCH 0/3] Improvements to make-check-all.sh and check-all-boards
@ 2026-07-18 11:27 Andrew Burgess
2026-07-18 11:27 ` [PATCH 1/3] gdb/testsuite: missing ';' in check-all-boards rule Andrew Burgess
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Andrew Burgess @ 2026-07-18 11:27 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Burgess
Some minor improvements to the 'make check-all-boards' rule and the
underlying make-check-all.sh script.
Thanks,
Andrew
---
Andrew Burgess (3):
gdb/testsuite: missing ';' in check-all-boards rule
gdb/testsuite: fix shellcheck issues in make-check-all.sh
gdb/testsuite: improve rerun scripts generated by make-check-all.sh
gdb/testsuite/Makefile.in | 2 +-
gdb/testsuite/make-check-all.sh | 22 ++++++++++++++--------
2 files changed, 15 insertions(+), 9 deletions(-)
base-commit: 2e2f760e5765fbc923aac825ea3118c06ff5d827
--
2.25.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] gdb/testsuite: missing ';' in check-all-boards rule
2026-07-18 11:27 [PATCH 0/3] Improvements to make-check-all.sh and check-all-boards Andrew Burgess
@ 2026-07-18 11:27 ` Andrew Burgess
2026-07-18 11:27 ` [PATCH 2/3] gdb/testsuite: fix shellcheck issues in make-check-all.sh Andrew Burgess
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Andrew Burgess @ 2026-07-18 11:27 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Burgess
The check-all-boards makefile rule was missing a semicolon. As a
result we would pass "result=0" through to the make-check-all.sh
script.
This 'result=0' would end up inside the TESTS="..." string which was
passed to the 'make check-...' command. As 'result=0' doesn't match
any of GDB's .exp files the 'result=0' would then be ignored.
Back in the Makefile, due to the missing semicolon, as the
'result=...' line had become an extra argument to make-check-all.sh,
we were no longer capturing the exit status of the make-check-all.sh
script. This means that when the 'check-all-boards' rule completed we
actually exited with the exit status of the last command rather than
with the exit status of the make-check-all.sh script.
Fix this by adding in the missing semicolon.
There should be no changes in what is tested after this commit.
---
gdb/testsuite/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
index f103d7ddd65..44c710f8de9 100644
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -386,7 +386,7 @@ check-all-boards: all $(abs_builddir)/site.exp
${abs_srcdir}/make-check-all.sh --keep-results \
--host-user "$(GDB_HOST_USERNAME)" \
--target-user "$(GDB_TARGET_USERNAME)" \
- "$(TESTS)" \
+ "$(TESTS)"; \
result=$$?; \
if test -d check-all; then \
$(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh \
--
2.25.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/3] gdb/testsuite: fix shellcheck issues in make-check-all.sh
2026-07-18 11:27 [PATCH 0/3] Improvements to make-check-all.sh and check-all-boards Andrew Burgess
2026-07-18 11:27 ` [PATCH 1/3] gdb/testsuite: missing ';' in check-all-boards rule Andrew Burgess
@ 2026-07-18 11:27 ` Andrew Burgess
2026-07-18 11:27 ` [PATCH 3/3] gdb/testsuite: improve rerun scripts generated by make-check-all.sh Andrew Burgess
2026-07-21 16:48 ` [PATCH 0/3] Improvements to make-check-all.sh and check-all-boards Tom Tromey
3 siblings, 0 replies; 6+ messages in thread
From: Andrew Burgess @ 2026-07-18 11:27 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Burgess
Fix shellcheck issues in the make-check-all.sh script. These are just
quoting issues, and should have no functional impact.
There should be no changes in what is tested after this commit.
---
gdb/testsuite/make-check-all.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gdb/testsuite/make-check-all.sh b/gdb/testsuite/make-check-all.sh
index c46cd8de4ed..3cf6b46cdb0 100755
--- a/gdb/testsuite/make-check-all.sh
+++ b/gdb/testsuite/make-check-all.sh
@@ -320,7 +320,7 @@ main ()
for b in "${target_boards[@]}"; do
echo "TARGET BOARD: $b"
rtf=(
- --target_board="$b"
+ "--target_board=$b"
)
rtf_for_board "$b"
maketarget_for_board "$b"
@@ -332,7 +332,7 @@ main ()
for b in "${gdbserver_boards[@]}" "${remote_gdbserver_boards[@]}"; do
echo "TARGET BOARD: $b"
rtf=(
- --target_board="$b"
+ "--target_board=$b"
)
rtf_for_board "$b"
maketarget_for_board "$b"
@@ -345,8 +345,8 @@ main ()
for b in "${remote_gdbserver_boards[@]}"; do
echo "HOST BOARD: $h, TARGET BOARD: $b"
rtf=(
- --host_board="$h"
- --target_board="$b"
+ "--host_board=$h"
+ "--target_board=$b"
)
rtf_for_board "$h"
rtf_for_board "$b"
@@ -360,8 +360,8 @@ main ()
for b in "${host_target_boards[@]}"; do
echo "HOST/TARGET BOARD: $b"
rtf=(
- --host_board="$b"
- --target_board="$b"
+ "--host_board=$b"
+ "--target_board=$b"
)
rtf_for_board "$b"
maketarget_for_board "$b"
--
2.25.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/3] gdb/testsuite: improve rerun scripts generated by make-check-all.sh
2026-07-18 11:27 [PATCH 0/3] Improvements to make-check-all.sh and check-all-boards Andrew Burgess
2026-07-18 11:27 ` [PATCH 1/3] gdb/testsuite: missing ';' in check-all-boards rule Andrew Burgess
2026-07-18 11:27 ` [PATCH 2/3] gdb/testsuite: fix shellcheck issues in make-check-all.sh Andrew Burgess
@ 2026-07-18 11:27 ` Andrew Burgess
2026-07-21 16:48 ` [PATCH 0/3] Improvements to make-check-all.sh and check-all-boards Tom Tromey
3 siblings, 0 replies; 6+ messages in thread
From: Andrew Burgess @ 2026-07-18 11:27 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Burgess
The make-check-all.sh script creates little scripts that allow each
board to easily be rerun, useful if a particular test fails and you
want to check a possible fix.
The scripts as currently generated only include the 'make check-...'
line, and are not executable, which means you need to first change to
the correct directory, and invoke the script with 'sh'.
This commit extends the script to include a '#! /bin/sh' line as well
as a 'cd ....' line to switch to the correct directory to run the
test. The script is then made executable.
It should now be easier to rerun tests. There is no change to how
tests are run, or what tests are run with this commit.
---
gdb/testsuite/make-check-all.sh | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/make-check-all.sh b/gdb/testsuite/make-check-all.sh
index 3cf6b46cdb0..8708ecec1cc 100755
--- a/gdb/testsuite/make-check-all.sh
+++ b/gdb/testsuite/make-check-all.sh
@@ -215,8 +215,14 @@ do_tests ()
cp gdb.sum gdb.log "$dir"
# Record the 'make check' command to enable easy re-running.
- echo "make $maketarget RUNTESTFLAGS=\"${rtf[*]}\" TESTS=\"${tests[*]}\"" \
- > "$dir/make-check.sh"
+ make_check_script="$dir/make-check.sh"
+ cat <<-EOF > "$make_check_script"
+ #!/bin/sh
+
+ cd "$PWD" && \\
+ make $maketarget RUNTESTFLAGS="${rtf[*]}" TESTS="${tests[*]}"
+ EOF
+ chmod +x "$make_check_script"
fi
}
--
2.25.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] Improvements to make-check-all.sh and check-all-boards
2026-07-18 11:27 [PATCH 0/3] Improvements to make-check-all.sh and check-all-boards Andrew Burgess
` (2 preceding siblings ...)
2026-07-18 11:27 ` [PATCH 3/3] gdb/testsuite: improve rerun scripts generated by make-check-all.sh Andrew Burgess
@ 2026-07-21 16:48 ` Tom Tromey
2026-07-23 16:42 ` Andrew Burgess
3 siblings, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2026-07-21 16:48 UTC (permalink / raw)
To: Andrew Burgess; +Cc: gdb-patches
>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
Andrew> Some minor improvements to the 'make check-all-boards' rule and the
Andrew> underlying make-check-all.sh script.
These all seem fine to me, thank you.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] Improvements to make-check-all.sh and check-all-boards
2026-07-21 16:48 ` [PATCH 0/3] Improvements to make-check-all.sh and check-all-boards Tom Tromey
@ 2026-07-23 16:42 ` Andrew Burgess
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Burgess @ 2026-07-23 16:42 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
Tom Tromey <tom@tromey.com> writes:
>>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
>
> Andrew> Some minor improvements to the 'make check-all-boards' rule and the
> Andrew> underlying make-check-all.sh script.
>
> These all seem fine to me, thank you.
> Approved-By: Tom Tromey <tom@tromey.com>
Pushed.
Thanks,
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-07-23 16:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-18 11:27 [PATCH 0/3] Improvements to make-check-all.sh and check-all-boards Andrew Burgess
2026-07-18 11:27 ` [PATCH 1/3] gdb/testsuite: missing ';' in check-all-boards rule Andrew Burgess
2026-07-18 11:27 ` [PATCH 2/3] gdb/testsuite: fix shellcheck issues in make-check-all.sh Andrew Burgess
2026-07-18 11:27 ` [PATCH 3/3] gdb/testsuite: improve rerun scripts generated by make-check-all.sh Andrew Burgess
2026-07-21 16:48 ` [PATCH 0/3] Improvements to make-check-all.sh and check-all-boards Tom Tromey
2026-07-23 16:42 ` Andrew Burgess
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox