From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0PYCOwIeS2EUbwAAWB0awg (envelope-from ) for ; Wed, 22 Sep 2021 08:13:54 -0400 Received: by simark.ca (Postfix, from userid 112) id ED6801EE25; Wed, 22 Sep 2021 08:13:54 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 1A2231EDF0 for ; Wed, 22 Sep 2021 08:13:54 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AC1F63858002 for ; Wed, 22 Sep 2021 12:13:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC1F63858002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1632312833; bh=9QGiMFi1B8kr6mMppxi4n3rhxKkhGR8voZg/Fh2lq1I=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=rNKVQ7M8Qd5VUC9nT31HqVEAgyR8MqMhjHGLLdRPGmqEsgStNLhhMTFyJv/C+RV1t 6YzNWfO3NXJCQp2UWH2aT0FOdloHnSiYITSjfPloQ8rttX6gVn/VrVvx+Oa2qvpaUg ZJOJB5KM62AP9PdRZGbdOEkigQr+2zDq1QjzC6RM= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 4EA53385802E for ; Wed, 22 Sep 2021 12:11:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4EA53385802E Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5C1301FE19 for ; Wed, 22 Sep 2021 12:11:58 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3DEDD13D7B for ; Wed, 22 Sep 2021 12:11:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id oXVRDY4dS2F/FQAAMHmgww (envelope-from ) for ; Wed, 22 Sep 2021 12:11:58 +0000 Date: Wed, 22 Sep 2021 14:11:56 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.python/py-events.exp Message-ID: <20210922121154.GA15715@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, With test-case gdb.python/py-events.exp on ubuntu 18.04.5 we run into: ... (gdb) info threads^M Id Target Id Frame ^M * 1 Thread 0x7ffff7fc3740 (LWP 31467) "py-events" do_nothing () at \ src/gdb/testsuite/gdb.python/py-events-shlib.c:19^M (gdb) FAIL: gdb.python/py-events.exp: get current thread ... The info thread commands uses "Thread" instead of "process" because libpthread is already loaded: ... new objfile name: /lib/x86_64-linux-gnu/libdl.so.2^M [Thread debugging using libthread_db enabled]^M Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".^M event type: new_objfile^M new objfile name: /lib/x86_64-linux-gnu/libpthread.so.0^M ... and consequently thread_db_target::pid_to_str is used. Fix this by parsing the "Thread" expression. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.python/py-events.exp --- gdb/testsuite/gdb.python/py-events.exp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.python/py-events.exp b/gdb/testsuite/gdb.python/py-events.exp index 753709361f5..d6dc9fd4252 100644 --- a/gdb/testsuite/gdb.python/py-events.exp +++ b/gdb/testsuite/gdb.python/py-events.exp @@ -82,9 +82,13 @@ delete_breakpoints # Test inferior call events gdb_test_multiple "info threads" "get current thread" { - -re "\[^\n\r\]*process (\[0-9\]+)\[^\n\r\]*do_nothing.*$gdb_prompt $" { + -re -wrap "process ($decimal)\[^\n\r\]*do_nothing.*" { set process_id $expect_out(1,string) - pass "get current thread" + pass $gdb_test_name + } + -re -wrap "Thread $hex \\(LWP ($decimal)\\)\[^\n\r\]*do_nothing.*" { + set process_id $expect_out(1,string) + pass $gdb_test_name } }