From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id OpRCL+kuXGFGFQAAWB0awg (envelope-from ) for ; Tue, 05 Oct 2021 06:54:33 -0400 Received: by simark.ca (Postfix, from userid 112) id 9DCDB1EE1B; Tue, 5 Oct 2021 06:54:33 -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 E498C1E79C for ; Tue, 5 Oct 2021 06:54:32 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B71993857017 for ; Tue, 5 Oct 2021 10:54:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B71993857017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1633431271; bh=rcg0v6M0dY2vDVFOjiHofBaBtKA56lSEOvZWo/qA7po=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=c7EqjKU8d3dlkOu7TKA3sIS5f/mhQ7Av81WUjW4UZ6gxQPJryVfdl9SnTFHcY3Bc2 pF+2wh5ZcIvD3SbOBLKFBst7aamtoWzGh5KI8xzQ0gfIYGAcVx4hXRuzMwuIHE4NMD fxZQKyWNK/qtvltJLSGeQG9bkOR8PzD8Jb9LhMxY= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 259BA385840B for ; Tue, 5 Oct 2021 10:54:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 259BA385840B 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 3EC7320008; Tue, 5 Oct 2021 10:54:12 +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 1CEE413C2B; Tue, 5 Oct 2021 10:54:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id hFRNBdQuXGGdLAAAMHmgww (envelope-from ); Tue, 05 Oct 2021 10:54:12 +0000 Date: Tue, 5 Oct 2021 12:54:10 +0200 To: gdb-patches@sourceware.org Subject: [PATCH][gdb/testsuite] Fix FAIL in gdb.mi/mi-nsmoribund.exp Message-ID: <20211005105408.GA30962@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, Since commit e36788d1354 "[gdb/testsuite] Fix handling of nr_args < 3 in mi_gdb_test" we run into: ... PASS: gdb.mi/mi-nsmoribund.exp: print done = 1 Expecting: ^(.*[^M ]+)?([^ ]*^M \*running,thread-id="[0-9]+"^M \*running,thread-id="[0-9]+"^M \*running,thread-id="[0-9]+"^M \*running,thread-id="[0-9]+"^M \*running,thread-id="[0-9]+"^M \*running,thread-id="[0-9]+"^M \*running,thread-id="[0-9]+"^M \*running,thread-id="[0-9]+"^M \*running,thread-id="[0-9]+"^M \*running,thread-id="[0-9]+"[^M ]+[(]gdb[)] ^M [ ]*) 103-exec-continue --all^M =library-loaded,id="/lib64/libgcc_s.so.1",target-name="/lib64/libgcc_s.so.1",\ host-name="/lib64/libgcc_s.so.1",symbols-loaded="0",thread-group="i1",\ ranges=[{from="0x00007ffff22a5010",to="0x00007ffff22b6365"}]^M 103^running^M *running,thread-id="5"^M (gdb) ^M FAIL: gdb.mi/mi-nsmoribund.exp: 103-exec-continue --all (unexpected output) ... The regexp expect running messages for all threads, but we only get one for thread 5. The test-case uses non-stop mode, and when the exec-continue --all command is issued, thread 5 is stopped and all other threads are running. Consequently, only thread 5 is resumed, and reported as running. Fix this by updating the regexp. Tested on x86_64-linux. Any comments? Thanks, - Tom [gdb/testsuite] Fix FAIL in gdb.mi/mi-nsmoribund.exp --- gdb/testsuite/gdb.mi/mi-nsmoribund.exp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.mi/mi-nsmoribund.exp b/gdb/testsuite/gdb.mi/mi-nsmoribund.exp index 58de9591da8..73a8d1ac71b 100644 --- a/gdb/testsuite/gdb.mi/mi-nsmoribund.exp +++ b/gdb/testsuite/gdb.mi/mi-nsmoribund.exp @@ -121,7 +121,11 @@ set re [list \ [string_list_to_regexp " = 1" \\ n {"} \r\n ^ done]] set re [join $re ""] mi_gdb_test "print done = 1" $re -mi_gdb_test "103-exec-continue --all" "\[^\n\]*\r\n$running_re" + +# Command exec-continue --all attempts to resume all threads, but only +# thread 5 was stopped, so only that one is reported as running. +set running_re "\\*running,thread-id=\"5\"" +mi_gdb_test "103-exec-continue --all" "\[^\n\]*\r\n$running_re" \ gdb_expect { -re "\\*stopped,reason=\"exited-normally\"" {