public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb/testsuite: fix gdb.threads/linux-dp.exp regex
@ 2022-10-07 14:21 Lancelot SIX
  2022-10-07 19:12 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Lancelot SIX @ 2022-10-07 14:21 UTC (permalink / raw)
  To: gdb-patches; +Cc: lsix, Lancelot SIX

On ubuntu 22.04 with debug the libc6-dbg package installed, I have the
following failure:

    where
    #0  print_philosopher (n=3, left=33 '!', right=33 '!') at .../gdb/testsuite/gdb.threads/linux-dp.c:105
    #1  0x000055555555576a in philosopher (data=0x55555555937c) at .../gdb/testsuite/gdb.threads/linux-dp.c:148
    #2  0x00007ffff7e11b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
    #3  0x00007ffff7ea3a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
    (gdb) FAIL: gdb.threads/linux-dp.exp: first thread-specific breakpoint hit

The regex for this test accounts for different situations (with /
without debug symbol) but assumes that if debug info is present the
backtrace shows execution under pthread_create.  However, for the
implementation under test, we are under start_thread.

Update the regex to accept start_thread.

Tested on Ubuntu-22.04 x86_64 with and without libc6-dbg debug symbols
available.

Change-Id: I1e1536279890bca2cd07f038e026b41e46af44e0
---
 gdb/testsuite/gdb.threads/linux-dp.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp
index 0805aa06664..953e6a9756b 100644
--- a/gdb/testsuite/gdb.threads/linux-dp.exp
+++ b/gdb/testsuite/gdb.threads/linux-dp.exp
@@ -226,7 +226,7 @@ gdb_continue_to_breakpoint "thread 5's print"
 # If you do have debug info, the output obviously depends more on the
 # exact library in use; under NPTL, you get:
 #    #2  0x0012b7fc in start_thread (arg=0x21) at pthread_create.c:264
-gdb_test "where" "print_philosopher.*philosopher.* \(from .*libpthread\|at pthread_create\|in pthread_create|from .*libc\\.\).*" \
+gdb_test "where" "print_philosopher.*philosopher.* \(from .*libpthread\|at pthread_create\|in pthread_create\|in start_thread\|from .*libc\\.\).*" \
 	"first thread-specific breakpoint hit"
 
 # Make sure it's catching the right thread.  Try hitting the

base-commit: ea4e4a19b7f6c192c307b5a37c67d141f3aea074
-- 
2.34.1


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

* Re: [PATCH] gdb/testsuite: fix gdb.threads/linux-dp.exp regex
  2022-10-07 14:21 [PATCH] gdb/testsuite: fix gdb.threads/linux-dp.exp regex Lancelot SIX
@ 2022-10-07 19:12 ` Tom Tromey
  2022-10-07 19:18   ` Lancelot SIX
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2022-10-07 19:12 UTC (permalink / raw)
  To: Lancelot SIX via Gdb-patches; +Cc: Lancelot SIX, lsix

>>>>> "Lancelot" == Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org> writes:

Lancelot> The regex for this test accounts for different situations (with /
Lancelot> without debug symbol) but assumes that if debug info is present the
Lancelot> backtrace shows execution under pthread_create.  However, for the
Lancelot> implementation under test, we are under start_thread.

Lancelot> Update the regex to accept start_thread.

Looks good to me.  Thank you.

Tom

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

* Re: [PATCH] gdb/testsuite: fix gdb.threads/linux-dp.exp regex
  2022-10-07 19:12 ` Tom Tromey
@ 2022-10-07 19:18   ` Lancelot SIX
  0 siblings, 0 replies; 3+ messages in thread
From: Lancelot SIX @ 2022-10-07 19:18 UTC (permalink / raw)
  To: Tom Tromey, Lancelot SIX via Gdb-patches; +Cc: lsix

Thanks,

I just pushed this to master (with a minor typo fix in the commit message).

Best,
Lancelot.

On 07/10/2022 20:12, Tom Tromey wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
>>>>>> "Lancelot" == Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Lancelot> The regex for this test accounts for different situations (with /
> Lancelot> without debug symbol) but assumes that if debug info is present the
> Lancelot> backtrace shows execution under pthread_create.  However, for the
> Lancelot> implementation under test, we are under start_thread.
> 
> Lancelot> Update the regex to accept start_thread.
> 
> Looks good to me.  Thank you.
> 
> Tom

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

end of thread, other threads:[~2022-10-07 19:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-07 14:21 [PATCH] gdb/testsuite: fix gdb.threads/linux-dp.exp regex Lancelot SIX
2022-10-07 19:12 ` Tom Tromey
2022-10-07 19:18   ` Lancelot SIX

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).