public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Lancelot SIX <lsix@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] gdb/testsuite: fix gdb.threads/linux-dp.exp regex
Date: Fri,  7 Oct 2022 19:17:09 +0000 (GMT)	[thread overview]
Message-ID: <20221007191709.14B053858CDA@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ae17d05a4a58baf42f297dfd40ed29256f4bc44d

commit ae17d05a4a58baf42f297dfd40ed29256f4bc44d
Author: Lancelot SIX <lancelot.six@amd.com>
Date:   Fri Oct 7 14:44:40 2022 +0100

    gdb/testsuite: fix gdb.threads/linux-dp.exp regex
    
    On ubuntu 22.04 with 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

Diff:
---
 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

                 reply	other threads:[~2022-10-07 19:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221007191709.14B053858CDA@sourceware.org \
    --to=lsix@sourceware.org \
    --cc=gdb-cvs@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).