public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 3/4] [gdb/testsuite] Fix gdb.server/no-thread-db.exp with local-remote-host.exp
Date: Tue, 18 Oct 2022 15:33:27 +0200	[thread overview]
Message-ID: <20221018133328.7574-4-tdevries@suse.de> (raw)
In-Reply-To: <20221018133328.7574-1-tdevries@suse.de>

With test-case gdb.server/no-thread-db.exp and host board local-remote-host.exp
with a tentative fix for PR29697 I run into:
...
(gdb) print foo^M
Cannot find thread-local storage for Thread 29613.29613, executable file \
  $HOME/no-thread-db:^M
Remote target failed to process qGetTLSAddr request^M
(gdb) FAIL: gdb.server/no-thread-db.exp: print foo
...

The regexp in the test-case expects the full $binfile pathname, but we have
instead $HOME/no-thread-db.

Fix this by making the regexp less strict.

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.server/no-thread-db.exp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.server/no-thread-db.exp b/gdb/testsuite/gdb.server/no-thread-db.exp
index db61c61ccbc..16c1a0d9ca1 100644
--- a/gdb/testsuite/gdb.server/no-thread-db.exp
+++ b/gdb/testsuite/gdb.server/no-thread-db.exp
@@ -59,5 +59,6 @@ gdb_breakpoint ${srcfile}:[gdb_get_line_number "after tls assignment"]
 gdb_continue_to_breakpoint "after tls assignment"
 
 # Printing a tls variable should fail gracefully without a libthread_db.
+set re_exec "\[^\r\n\]*[file tail $binfile]"
 gdb_test "print foo" \
-    "Cannot find thread-local storage for Thread \[^,\]+, executable file ${binfile}:\[\r\n\]+Remote target failed to process qGetTLSAddr request"
+    "Cannot find thread-local storage for Thread \[^,\]+, executable file $re_exec:\[\r\n\]+Remote target failed to process qGetTLSAddr request"
-- 
2.35.3


  parent reply	other threads:[~2022-10-18 13:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 13:33 [PATCH 0/4] [gdb/testsuite] Test-case fixes with local-remote-board Tom de Vries
2022-10-18 13:33 ` [PATCH 1/4] [gdb/testsuite] Fix gdb.server/file-transfer.exp with local-remote-host.exp Tom de Vries
2022-10-18 13:33 ` [PATCH 2/4] [gdb/testsuite] Fix gdb.base/return-nodebug.exp " Tom de Vries
2022-10-18 13:33 ` Tom de Vries [this message]
2022-10-18 13:33 ` [PATCH 4/4] [gdb/testsuite] Handle header files " Tom de Vries
2022-10-18 13:36 ` [pushed 0/4] [gdb/testsuite] Test-case fixes with local-remote-board 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=20221018133328.7574-4-tdevries@suse.de \
    --to=tdevries@suse.de \
    --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).