From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Check compilation result in gdb.base/call-sc.exp
Date: Thu, 30 Sep 2021 19:09:06 +0200 [thread overview]
Message-ID: <20210930170904.GA25013@delia> (raw)
Hi,
When running test-case gdb.base/call-sc.exp with target board unix/-bad, I
get:
...
gdb compile failed, gcc: error: unrecognized command line option '-bad'
UNTESTED: gdb.base/call-sc.exp: failed to prepare
ERROR: tcl error sourcing src/gdb/testsuite/gdb.base/call-sc.exp.
ERROR: can't read "use_gdb_stub": no such variable
...
Fix this by checking the compilation result.
Fix the resulting DUPLICATE:
...
DUPLICATE: gdb.base/call-sc.exp: failed to prepare
...
using with_test_prefix.
Tested on x86_64-linux.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Check compilation result in gdb.base/call-sc.exp
---
gdb/testsuite/gdb.base/call-sc.exp | 45 +++++++++++++++-----------------------
1 file changed, 18 insertions(+), 27 deletions(-)
diff --git a/gdb/testsuite/gdb.base/call-sc.exp b/gdb/testsuite/gdb.base/call-sc.exp
index 6b712a39ac6..5ba72a54a1f 100644
--- a/gdb/testsuite/gdb.base/call-sc.exp
+++ b/gdb/testsuite/gdb.base/call-sc.exp
@@ -393,10 +393,17 @@ proc test_scalar_returns { } {
# Test every single char struct from 1..17 in size. This is what the
# original "scalars" test was doing.
-start_scalars_test tc
-test_scalar_calls
-test_scalar_returns
+proc test { type } {
+ with_test_prefix $type {
+ if { [start_scalars_test $type] == -1 } {
+ return
+ }
+ test_scalar_calls
+ test_scalar_returns
+ }
+}
+test tc
# Let the fun begin.
@@ -413,45 +420,29 @@ test_scalar_returns
# naturally aligned. Padding being added where needed.
# Approx size: 2, 4, ...
-start_scalars_test ts
-test_scalar_calls
-test_scalar_returns
+test ts
# Approx size: 4, 8, ...
-start_scalars_test ti
-test_scalar_calls
-test_scalar_returns
+test ti
# Approx size: 4, 8, ...
-start_scalars_test tl
-test_scalar_calls
-test_scalar_returns
+test tl
# Approx size: 8, 16, ...
-start_scalars_test tll
-test_scalar_calls
-test_scalar_returns
+test tll
if {!$skip_float_test} {
# Approx size: 4, 8, ...
- start_scalars_test tf
- test_scalar_calls
- test_scalar_returns
+ test tf
# Approx size: 8, 16, ...
- start_scalars_test td
- test_scalar_calls
- test_scalar_returns
+ test td
# Approx size: 16, 32, ...
- start_scalars_test tld
- test_scalar_calls
- test_scalar_returns
+ test tld
}
# Approx size: 4, 8, ...
-start_scalars_test te
-test_scalar_calls
-test_scalar_returns
+test te
return 0
reply other threads:[~2021-09-30 17:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210930170904.GA25013@delia \
--to=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox