public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Enze Li <enze.li@hotmail.com>
To: gdb-patches@sourceware.org
Cc: enze.li@gmx.com
Subject: [PATCH] gdb/testsuite: fix an issue that prevents selftest
Date: Sun,  4 Dec 2022 22:18:40 +0800	[thread overview]
Message-ID: <OS3P286MB2152D128C759609D7AF24BDCF0199@OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM> (raw)

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


             reply	other threads:[~2022-12-04 14:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-04 14:18 Enze Li [this message]
2022-12-05 19:50 ` Simon Marchi
2022-12-07 13:37   ` Enze Li

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=OS3P286MB2152D128C759609D7AF24BDCF0199@OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM \
    --to=enze.li@hotmail.com \
    --cc=enze.li@gmx.com \
    --cc=gdb-patches@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).