From patchwork Thu Mar 9 11:31:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 66166 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 85D7E3858C78 for ; Thu, 9 Mar 2023 11:32:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85D7E3858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678361523; bh=AG8ftKMl1VZZxLedwIipUIjEhhIqQ+ZqIKM0Qp/BY10=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=d07eQkbXYeQsrEzI7SpfhpbQXz5keZi9Ptnkllntn+EK0gXxEc2Y2l2RGU5sWjmiT 39o4D7kSEadAE6Baaa6zd4cEE629HnDLcdeVnAGwhUKK+QwIpmhdAKISO/mtg0GfUz rkmQ282N/rMSkop1IwnMbMMwNXPMgm6QXkJiX8zo= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id EC7FD3858D33 for ; Thu, 9 Mar 2023 11:31:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EC7FD3858D33 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 2F0722004A for ; Thu, 9 Mar 2023 11:31:40 +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 19BDA1391B for ; Thu, 9 Mar 2023 11:31:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id XDkIBZzDCWQLUgAAMHmgww (envelope-from ) for ; Thu, 09 Mar 2023 11:31:40 +0000 To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Fix gdb.threads/thread-specific-bp.exp on native-gdbserver Date: Thu, 9 Mar 2023 12:31:51 +0100 Message-Id: <20230309113151.18356-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: , X-Patchwork-Original-From: Tom de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" With test-case gdb.threads/thread-specific-bp.exp and target board native-gdbserver I run into: ... (gdb) PASS: gdb.threads/thread-specific-bp.exp: non_stop=off: thread 1 selected continue^M Continuing.^M Thread-specific breakpoint 3 deleted - thread 2 no longer in the thread list.^M ^M Thread 1 "thread-specific" hit Breakpoint 4, end () at \ thread-specific-bp.c:29^M 29 }^M (gdb) FAIL: gdb.threads/thread-specific-bp.exp: non_stop=off: \ continue to end (timeout) ... The problem is that the test-case tries to match the "[Thread ... exited]" message which we do see with native testing: ... Continuing.^M [Thread 0x7ffff746e700 (LWP 7047) exited]^M Thread-specific breakpoint 3 deleted - thread 2 no longer in the thread list.^M ... The fact that the message is missing was reported as PR remote/30129. We could add a KFAIL for this, but the functionality the test-case is trying to test has nothing to do with the message, so it should pass. I only added matching of the message in commit 2e5843d87c4 ("[gdb/testsuite] Fix gdb.threads/thread-specific-bp.exp") to handle a race, not realizing doing so broke testing on native-gdbserver. Fix this by matching the "Thread-specific breakpoint $decimal deleted" message instead. Tested on x86_64-linux. --- gdb/testsuite/gdb.threads/thread-specific-bp.exp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) base-commit: 64c9b6398c287901119bf282a26c6a27df330663 diff --git a/gdb/testsuite/gdb.threads/thread-specific-bp.exp b/gdb/testsuite/gdb.threads/thread-specific-bp.exp index cecf946f5c4..2d1c71a68e3 100644 --- a/gdb/testsuite/gdb.threads/thread-specific-bp.exp +++ b/gdb/testsuite/gdb.threads/thread-specific-bp.exp @@ -90,8 +90,14 @@ proc check_thread_specific_breakpoint {non_stop} { set test "continue to end" set thread_exited 0 set prompt 0 + set msg_re \ + [join \ + [list \ + "Thread-specific breakpoint 3 deleted" \ + "-" \ + "thread 2 no longer in the thread list\\."]] gdb_test_multiple "$cmd" $test -lbl { - -re "(^|\r\n)\\\[Thread \[^\r\n\]* exited](?=\r\n)" { + -re "(^|\r\n)${msg_re}(?=\r\n)" { if { $prompt } { pass $gdb_test_name } else {