From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id 9B0EC3858D3C for ; Sun, 21 Nov 2021 17:57:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9B0EC3858D3C Received: from Plymouth.lan (unknown [IPv6:2a02:390:9086:0:e409:90b0:99cc:9f98]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 945538198D; Sun, 21 Nov 2021 17:57:47 +0000 (UTC) From: Lancelot SIX To: gdb-patches@sourceware.org Cc: Lancelot SIX Subject: [PATCH 20/29] gdb/testsuite: Remove duplicates from gdb.base/set-cfd.exp Date: Sun, 21 Nov 2021 17:56:27 +0000 Message-Id: <20211121175636.779325-21-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-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:57:48 +0000 (UTC) X-Spam-Status: No, score=-12.3 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Sun, 21 Nov 2021 17:57:51 -0000 When running the testsuite, I have: Running .../gdb/testsuite/gdb.base/set-cwd.exp ... DUPLICATE: gdb.base/set-cwd.exp: test_cwd_reset: continue to breakpoint: break-here Fix by moving the tests after the 'runto_main' within the same with_test_prefix scope. While at it, I fix some indentation issues. Tested on x86_64-linux. --- gdb/testsuite/gdb.base/set-cwd.exp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/gdb/testsuite/gdb.base/set-cwd.exp b/gdb/testsuite/gdb.base/set-cwd.exp index eb8835b29bb..67492d73b72 100644 --- a/gdb/testsuite/gdb.base/set-cwd.exp +++ b/gdb/testsuite/gdb.base/set-cwd.exp @@ -43,15 +43,15 @@ proc_with_prefix test_tilde_expansion { } { set home "" set test "print home var" gdb_test_multiple "print home" $test { - -re "\\\$$decimal = $hex \"\(.+\)\"\r\n$gdb_prompt $" { - set home $expect_out(1,string) - pass $test - } + -re "\\\$$decimal = $hex \"\(.+\)\"\r\n$gdb_prompt $" { + set home $expect_out(1,string) + pass $test + } } if { $home == "" } { - untested "could not retrieve home var" - return + untested "could not retrieve home var" + return } set curdir "" @@ -177,13 +177,13 @@ proc_with_prefix test_cwd_reset { } { if { ![runto_main] } { return -1 } - } - gdb_breakpoint [gdb_get_line_number "break-here"] - gdb_continue_to_breakpoint "break-here" ".* break-here .*" + gdb_breakpoint [gdb_get_line_number "break-here"] + gdb_continue_to_breakpoint "break-here" ".* break-here .*" - gdb_test "print dir" "\\\$$decimal = \"$gdb_cwd\", .*" \ - "inferior cwd got reset correctly" + gdb_test "print dir" "\\\$$decimal = \"$gdb_cwd\", .*" \ + "inferior cwd got reset correctly" + } } test_cd_into_dir -- 2.33.1