From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WKN3GQ7wVWGIXQAAWB0awg (envelope-from ) for ; Thu, 30 Sep 2021 13:12:46 -0400 Received: by simark.ca (Postfix, from userid 112) id 661B61EE28; Thu, 30 Sep 2021 13:12:46 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.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 B84D81EDF7 for ; Thu, 30 Sep 2021 13:12:45 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 70FF33858422 for ; Thu, 30 Sep 2021 17:12:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 70FF33858422 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1633021965; bh=RrA49S2NBShxQw7BVHckcrEugV6gkcVTHrwXRecjjK8=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=X9hNM0a27HCPRAoR7l9ewBkQ3MYPG3L/kp0Wyld5jHvyUnP8oJ5tDvYaYy2eIqBYi ci7+JUi2chZjE4VN07SwmnciLOGvJAEx0TQIeatyJeVKoxXZ0Ik9Wjg3CquR6prRtE mCPcXxKCnYD6CcrBKNvF/WAEIgNfgtS9QxL9gbyE= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 06C1B3858433 for ; Thu, 30 Sep 2021 17:11:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 06C1B3858433 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 3CDF720048 for ; Thu, 30 Sep 2021 17:11:06 +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 288CB13AF5 for ; Thu, 30 Sep 2021 17:11:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id tyLYCKrvVWH/WwAAMHmgww (envelope-from ) for ; Thu, 30 Sep 2021 17:11:06 +0000 Date: Thu, 30 Sep 2021 19:11:04 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix DUPLICATE in gdb.base/info-os.exp Message-ID: <20210930171102.GA25195@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, When running test-case gdb.base/info-os.exp, I run into: ... PASS: gdb.base/info-os.exp: get threads PASS: gdb.base/info-os.exp: get threads DUPLICATE: gdb.base/info-os.exp: get threads ... Fix this not doing pass followed by exp_continue in gdb_test_multiple. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix DUPLICATE in gdb.base/info-os.exp --- gdb/testsuite/gdb.base/info-os.exp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/info-os.exp index b17a7842d5f..14bbbd95a07 100644 --- a/gdb/testsuite/gdb.base/info-os.exp +++ b/gdb/testsuite/gdb.base/info-os.exp @@ -125,17 +125,16 @@ proc expect_multiline { command expect test } { global gdb_prompt # Do not duplicate FAILs from gdb_test_multiple. - set pass 0 - set fail 0 + set found 0 + set ok 0 gdb_test_multiple $command $test { -re "^$expect *\r\n" { - pass $test - set pass 1 + set found 1 exp_continue } -re "^$gdb_prompt $" { - if !$pass { - set fail 1 + if $found { + set ok 1 } # Exit the loop. } @@ -144,9 +143,7 @@ proc expect_multiline { command expect test } { exp_continue } } - if $fail { - fail $test - } + gdb_assert { $ok } $test } # Test output of the 'info os' commands against the expected results.