From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WDBqDW2LmmEyUQAAWB0awg (envelope-from ) for ; Sun, 21 Nov 2021 13:09:49 -0500 Received: by simark.ca (Postfix, from userid 112) id 345391F0CE; Sun, 21 Nov 2021 13:09:49 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,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 BF25F1EDF0 for ; Sun, 21 Nov 2021 13:09:48 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 648CD385842C for ; Sun, 21 Nov 2021 18:09:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 648CD385842C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637518188; bh=kX5YRVc9M/1wHV7w/NQBI+yq/Vj1ilQzaSeQjcsH+uU=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=gTgFUoJM8CNYQTA8SK70PO4v/bL4DJHELUOoB6gxoiLVuScRSmdYevbrE6FqO/H5c gRin9WlwAKX8DimViNHge6yo/367OKOeWjbNm5I/I5EuTjIAHL49HNH4yv7xzmy7tR NcSPHwgln2nqBQsrSrKHyASa6ny1BsQou3OPILCk= Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id 22FCF3858425 for ; Sun, 21 Nov 2021 17:58:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 22FCF3858425 Received: from Plymouth.lan (unknown [IPv6:2a02:390:9086:0:e409:90b0:99cc:9f98]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 40635854F8; Sun, 21 Nov 2021 17:58:00 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH 27/29] gdb/testsuite: Remove duplicates from gdb.base/nested-subp2.exp Date: Sun, 21 Nov 2021 17:56:34 +0000 Message-Id: <20211121175636.779325-28-lsix@lancelotsix.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211121175636.779325-1-lsix@lancelotsix.com> References: <20211121175636.779325-1-lsix@lancelotsix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Sun, 21 Nov 2021 17:58:02 +0000 (UTC) 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: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Cc: Lancelot SIX Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" When running the testsuite, I have: Running .../gdb/testsuite/gdb.base/nested-subp2.exp ... DUPLICATE: gdb.base/nested-subp2.exp: continue to the STOP marker DUPLICATE: gdb.base/nested-subp2.exp: print c DUPLICATE: gdb.base/nested-subp2.exp: print count Fix by using with_test_prefix to differentiate the test that are performed at different points during the execution of the debuggee. Tested on x86_64-linux. --- gdb/testsuite/gdb.base/nested-subp2.exp | 28 +++++++++++++------------ 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/gdb/testsuite/gdb.base/nested-subp2.exp b/gdb/testsuite/gdb.base/nested-subp2.exp index d9393da6f10..2c4cdf86efa 100644 --- a/gdb/testsuite/gdb.base/nested-subp2.exp +++ b/gdb/testsuite/gdb.base/nested-subp2.exp @@ -49,21 +49,23 @@ set bp_location [gdb_get_line_number "STOP" "${testcase}.c"] gdb_test "break ${testcase}.c:${bp_location}" \ "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: .*" \ "breakpoint to the STOP marker" -gdb_test "continue" \ - "Breakpoint \[0-9\]+, increment .*" \ - "continue to the STOP marker" +with_test_prefix "stop at first iteration" { + gdb_test "continue" \ + "Breakpoint \[0-9\]+, increment .*" \ + "continue to the STOP marker" -# Check we get correct values for both local and non-local variable references. - -gdb_test "print c" "102 'f'" -gdb_test "print count" "0" + # Check we get correct values for both local and non-local variable references. + gdb_test "print c" "102 'f'" + gdb_test "print count" "0" +} # Same but a little later: make sure we were looking at the proper places. - -gdb_test "continue" \ - "Breakpoint \[0-9\]+, increment .*" \ - "continue to the STOP marker" -gdb_test "print c" "111 'o'" -gdb_test "print count" "1" +with_test_prefix "stop at second iteration" { + gdb_test "continue" \ + "Breakpoint \[0-9\]+, increment .*" \ + "continue to the STOP marker" + gdb_test "print c" "111 'o'" + gdb_test "print count" "1" +} -- 2.33.1