From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oEiUBYRooWE6QAAAWB0awg (envelope-from ) for ; Fri, 26 Nov 2021 18:06:44 -0500 Received: by simark.ca (Postfix, from userid 112) id 140661F0CE; Fri, 26 Nov 2021 18:06:44 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,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 6BF4F1EDF0 for ; Fri, 26 Nov 2021 18:06:43 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0AA353858431 for ; Fri, 26 Nov 2021 23:06:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0AA353858431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637968003; bh=B8cuQTGOeUPWtbgT9dwYkAWhbJLjhTcWp7DfuVEhcdk=; 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=lw+Efuw8FaccQ9owNE59v6WMZvI/9B9j7dGoLshTwe2PqencEoHfytLRGeEdA2fJm 7CBbCoTn1ZIS9e8oT55cS/U02PhXIjIWvqtszR1i4Cx4vPEONWlNKp+PF8WQIo3c3D 7WqCdBDXby8R4Vjku2s8E4ITXS8zamifqptFtTK0= Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id E05E63857C7B for ; Fri, 26 Nov 2021 23:01:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E05E63857C7B Received: from Plymouth.lan (unknown [IPv6:2a02:390:9086:0:a47d:3441:84f3:f4bc]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 4D49E85746; Fri, 26 Nov 2021 23:01:00 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH 11/12] gdb/testsuite: Remove duplicates from gdb.mi/mi2-amd64-entry-value.exp Date: Fri, 26 Nov 2021 23:00:37 +0000 Message-Id: <20211126230038.103225-12-lsix@lancelotsix.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211126230038.103225-1-lsix@lancelotsix.com> References: <20211126230038.103225-1-lsix@lancelotsix.com> MIME-Version: 1.0 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]); Fri, 26 Nov 2021 23:01:00 +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.mi/mi2-amd64-entry-value.exp ... DUPLICATE: gdb.mi/mi2-amd64-entry-value.exp: breakpoint at main DUPLICATE: gdb.mi/mi2-amd64-entry-value.exp: mi runto main DUPLICATE: gdb.mi/mi2-amd64-entry-value.exp: breakpoint at main DUPLICATE: gdb.mi/mi2-amd64-entry-value.exp: mi runto main DUPLICATE: gdb.mi/mi2-amd64-entry-value.exp: breakpoint at main DUPLICATE: gdb.mi/mi2-amd64-entry-value.exp: mi runto main DUPLICATE: gdb.mi/mi2-amd64-entry-value.exp: breakpoint at main DUPLICATE: gdb.mi/mi2-amd64-entry-value.exp: mi runto main DUPLICATE: gdb.mi/mi2-amd64-entry-value.exp: breakpoint at main DUPLICATE: gdb.mi/mi2-amd64-entry-value.exp: mi runto main DUPLICATE: gdb.mi/mi2-amd64-entry-value.exp: breakpoint at main DUPLICATE: gdb.mi/mi2-amd64-entry-value.exp: mi runto main Fix by enclosing the various 'mi_runto_main' calls (which are responsible for the DUPLICATEs warnings) in 'with_test_prefix' blocks since this is the easiest way to adjust the test names. Tested on x86_64-linux. --- .../gdb.mi/mi2-amd64-entry-value.exp | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp b/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp index 4505bfada67..eae9a9c17ad 100644 --- a/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp +++ b/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp @@ -49,8 +49,10 @@ foreach name {different breakhere_different breakhere_validity breakhere_invalid # Test various kinds of `set print entry-values'. -if {[mi_runto_main] == -1} { - return -1 +with_test_prefix "setup for set print-entry-values no" { + if {[mi_runto_main] == -1} { + return -1 + } } mi_gdb_test "-gdb-set print entry-values no" {\^done} "no: set print entry-values" mi_send_resuming_command "exec-continue" "no: entry_equal: continue" @@ -66,8 +68,10 @@ mi_send_resuming_command "exec-continue" "no: invalid: continue" mi_expect_stop "breakpoint-hit" .* {{name="inv",value=""}} .* .* {.* disp="keep"} "no: invalid: stop" mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value=""}\]} "no: invalid: -stack-list-variables" -if {[mi_runto_main] == -1} { - return -1 +with_test_prefix "setup for set print-entry-values only" { + if {[mi_runto_main] == -1} { + return -1 + } } mi_gdb_test "-gdb-set print entry-values only" {\^done} "only: set print entry-values" mi_send_resuming_command "exec-continue" "only: entry_equal: continue" @@ -83,8 +87,10 @@ mi_send_resuming_command "exec-continue" "only: invalid: continue" mi_expect_stop "breakpoint-hit" .* {{name="inv@entry",value=""}} .* .* {.* disp="keep"} "only: invalid: stop" mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv@entry",arg="1",value=""}\]} "only: invalid: -stack-list-variables" -if {[mi_runto_main] == -1} { - return -1 +with_test_prefix "setup for set print-entry-values preferred" { + if {[mi_runto_main] == -1} { + return -1 + } } mi_gdb_test "-gdb-set print entry-values preferred" {\^done} "preferred: set print entry-values" mi_send_resuming_command "exec-continue" "preferred: entry_equal: continue" @@ -100,8 +106,10 @@ mi_send_resuming_command "exec-continue" "preferred: invalid: continue" mi_expect_stop "breakpoint-hit" .* {{name="inv@entry",value=""}} .* .* {.* disp="keep"} "preferred: invalid: stop" mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv@entry",arg="1",value=""}\]} "preferred: invalid: -stack-list-variables" -if {[mi_runto_main] == -1} { - return -1 +with_test_prefix "setup for set print-entry-values if-needed" { + if {[mi_runto_main] == -1} { + return -1 + } } mi_gdb_test "-gdb-set print entry-values if-needed" {\^done} "if-needed: set print entry-values" mi_send_resuming_command "exec-continue" "if-needed: entry_equal: continue" @@ -117,8 +125,10 @@ mi_send_resuming_command "exec-continue" "if-needed: invalid: continue" mi_expect_stop "breakpoint-hit" .* {{name="inv",value=""}} .* .* {.* disp="keep"} "if-needed: invalid: stop" mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value=""}\]} "if-needed: invalid: -stack-list-variables" -if {[mi_runto_main] == -1} { - return -1 +with_test_prefix "setup for set print-entry-values both" { + if {[mi_runto_main] == -1} { + return -1 + } } mi_gdb_test "-gdb-set print entry-values both" {\^done} "both: set print entry-values" mi_send_resuming_command "exec-continue" "both: entry_equal: continue" @@ -134,8 +144,10 @@ mi_send_resuming_command "exec-continue" "both: invalid: continue" mi_expect_stop "breakpoint-hit" .* {{name="inv",value=""},{name="inv@entry",value=""}} .* .* {.* disp="keep"} "both: invalid: stop" mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value=""},{name="inv@entry",arg="1",value=""}\]} "both: invalid: -stack-list-variables" -if {[mi_runto_main] == -1} { - return -1 +with_test_prefix "setup for set print-entry-values compact" { + if {[mi_runto_main] == -1} { + return -1 + } } mi_gdb_test "-gdb-set print entry-values compact" {\^done} "compact: set print entry-values" mi_send_resuming_command "exec-continue" "compact: entry_equal: continue" @@ -151,8 +163,10 @@ mi_send_resuming_command "exec-continue" "compact: invalid: continue" mi_expect_stop "breakpoint-hit" .* {{name="inv",value=""}} .* .* {.* disp="keep"} "compact: invalid: stop" mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value=""}\]} "compact: invalid: -stack-list-variables" -if {[mi_runto_main] == -1} { - return -1 +with_test_prefix "setup for set print-entry-values default" { + if {[mi_runto_main] == -1} { + return -1 + } } mi_gdb_test "-gdb-set print entry-values default" {\^done} "default: set print entry-values" mi_send_resuming_command "exec-continue" "default: entry_equal: continue" -- 2.33.1