From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Fix gdb.mi/gdb2549.exp with check-read1
Date: Fri, 8 Oct 2021 13:08:30 +0200 [thread overview]
Message-ID: <20211008110829.GA27337@delia.home> (raw)
Hi,
When running test-case gdb.mi/gdb2549.exp with check-read1, I run into:
...
FAIL: gdb.mi/gdb2549.exp: register values x (timeout)
...
Fix this by applying the same fix as for "register values t" in commit
478e490a4df "[gdb/testsuite] Fix gdb.mi/gdb2549.exp with check-read1".
Tested on x86_64-linux.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Fix gdb.mi/gdb2549.exp with check-read1
---
gdb/testsuite/gdb.mi/gdb2549.exp | 46 ++++++++++++++++++----------------------
1 file changed, 21 insertions(+), 25 deletions(-)
diff --git a/gdb/testsuite/gdb.mi/gdb2549.exp b/gdb/testsuite/gdb.mi/gdb2549.exp
index aebf9c904d9..9cdc31e532c 100644
--- a/gdb/testsuite/gdb.mi/gdb2549.exp
+++ b/gdb/testsuite/gdb.mi/gdb2549.exp
@@ -43,42 +43,23 @@ proc register_tests_no_exec { } {
"no executable"
}
-proc register_tests { } {
- global hex
- global decimal
+proc register_test { n arg format } {
global mi_gdb_prompt
- set octal "\[0-7\]+"
- set binary "\[0-1\]+"
- set float "\\-?((\[0-9\]+(\\.\[0-9\]+)?(e\[-+\]\[0-9\]+)?)|(nan\\($hex\\)))"
-
- mi_gdb_test "222-data-list-register-values x" \
- "222\\^done,register-values=\\\[\{number=\"$decimal\",value=\"$hex\"\}.*\\\]" \
- "register values x"
-
- mi_gdb_test "333-data-list-register-values f" \
- "333\\^done,register-values=\\\[\{number=\"$decimal\",value=\"$float\"\}.*\\\]" \
- "register values f"
-
- mi_gdb_test "444-data-list-register-values d" \
- "444\\^done,register-values=\\\[\{number=\"$decimal\",value=\"-?$decimal\"\}.*\\\]" \
- "register values d"
+ global decimal
- mi_gdb_test "555-data-list-register-values o" \
- "555\\^done,register-values=\\\[\{number=\"$decimal\",value=\"$octal\"\}.*\\\]" \
- "register values o"
+ set cmd "$n-data-list-register-values $arg"
+ set test "register values $arg"
- set cmd "666-data-list-register-values t"
- set test "register values t"
set state 0
gdb_test_multiple $cmd $test -prompt "$mi_gdb_prompt$" {
- -re "666\\^done,register-values=\\\[" {
+ -re "$n\\^done,register-values=\\\[" {
if { $state == 0 } {
set state 1
exp_continue
}
fail $gdb_test_name
}
- -re "\{number=\"$decimal\",value=\"$binary\"\}" {
+ -re "\{number=\"$decimal\",value=\"$format\"\}" {
if { $state != 0 } {
set state 2
exp_continue
@@ -98,6 +79,21 @@ proc register_tests { } {
}
}
+proc register_tests { } {
+ global hex
+ global decimal
+ set octal "\[0-7\]+"
+ set binary "\[0-1\]+"
+ set float \
+ "\\-?((\[0-9\]+(\\.\[0-9\]+)?(e\[-+\]\[0-9\]+)?)|(nan\\($hex\\)))"
+
+ register_test 222 x $hex
+ register_test 333 f $float
+ register_test 444 d -?$decimal
+ register_test 555 o $octal
+ register_test 666 t $binary
+}
+
mi_clean_restart $binfile
register_tests_no_exec
next reply other threads:[~2021-10-08 11:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-08 11:08 Tom de Vries via Gdb-patches [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-03-03 10:36 Tom de Vries
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=20211008110829.GA27337@delia.home \
--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