public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb/testsuite: fix an issue that prevents selftest
@ 2022-12-04 14:18 Enze Li
  2022-12-05 19:50 ` Simon Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: Enze Li @ 2022-12-04 14:18 UTC (permalink / raw)
  To: gdb-patches; +Cc: enze.li

When running gdb.gdb/selftest.exp, I see the following warning,
...
(gdb) break captured_main
Breakpoint 1 at 0x4fdab2
(gdb) run -nw -nx -iex "set height 0" -iex "set width 0"
Starting program: /home/lee/dev/binutils-gdb/gdb/testsuite/outputs/gdb.gdb/selftest/xgdb -nw -nx -iex "set height 0" -iex "set width 0"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, 0x0000555555a51ab2 in captured_main(void*) ()
(gdb) FAIL: gdb.gdb/selftest.exp: run until breakpoint at captured_main
WARNING: Couldn't test self
testcase /home/lee/dev/binutils-gdb/gdb/testsuite/gdb.gdb/selftest.exp completed in 1 seconds
...

Work around this by adding a dot and an asterisk in pattern instead of a
space.

Tested on x86_64-linux.
---
 gdb/testsuite/lib/selftest-support.exp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
index 3c270d88527d..7e5f5a2567d0 100644
--- a/gdb/testsuite/lib/selftest-support.exp
+++ b/gdb/testsuite/lib/selftest-support.exp
@@ -73,10 +73,10 @@ proc selftest_setup { executable function } {
 
     set description "run until breakpoint at $function"
     gdb_test_multiple "run $INTERNAL_GDBFLAGS" "$description" {
-        -re "Starting program.*Breakpoint \[0-9\]+,.*$function \\(.*\\).* at .*main.c:.*$gdb_prompt $" {
+        -re "Starting program.*Breakpoint \[0-9\]+,.*$function.*\\(.*\\).* at .*main.c:.*$gdb_prompt $" {
             pass "$description"
         }
-        -re "Starting program.*Breakpoint \[0-9\]+,.*$function \\(.*\\).*$gdb_prompt $" {
+        -re "Starting program.*Breakpoint \[0-9\]+,.*$function.*\\(.*\\).*$gdb_prompt $" {
             xfail "$description (line numbers scrambled?)"
         }
         -re "vfork: No more processes.*$gdb_prompt $" {

base-commit: 13556f4057d37f510f77143a1632febcc5618d1f
-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-07 13:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-04 14:18 [PATCH] gdb/testsuite: fix an issue that prevents selftest Enze Li
2022-12-05 19:50 ` Simon Marchi
2022-12-07 13:37   ` Enze Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).