From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id iDV2HACJmmEyUQAAWB0awg (envelope-from ) for ; Sun, 21 Nov 2021 12:59:28 -0500 Received: by simark.ca (Postfix, from userid 112) id 71CBB1F0CE; Sun, 21 Nov 2021 12:59:28 -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 09F761EDF0 for ; Sun, 21 Nov 2021 12:59:28 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A33713858411 for ; Sun, 21 Nov 2021 17:59:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A33713858411 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637517567; bh=nKNtApyVO/RFy82yZcaXjUqlZU8vHgiNMWWnvf/8eFg=; 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=o3fVfUQRPf7o88PUBGPOHQbp5B/ESm2DuAkCJjTYAOibHutoGqdSlxEZSvfRL3ZPB GXmJ4V1rYjzXBgYQGPRMhyHs2OJDN1FJiDSQTi1gAbXIMVmK7IH0L2zQc0P25kN0lW stOxwzHkveYCQGb8q8eZqgM6GyUFs751ocwoyYww= Received: from lndn.lancelotsix.com (vps-42846194.vps.ovh.net [IPv6:2001:41d0:801:2000::2400]) by sourceware.org (Postfix) with ESMTPS id A89B7385842B for ; Sun, 21 Nov 2021 17:57:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A89B7385842B Received: from Plymouth.lan (unknown [IPv6:2a02:390:9086:0:e409:90b0:99cc:9f98]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 92A57854F8; Sun, 21 Nov 2021 17:57:24 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH 04/29] gdb/testsuite: Remove duplicates from gdb.base/realname-expand.exp Date: Sun, 21 Nov 2021 17:56:11 +0000 Message-Id: <20211121175636.779325-5-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:26 +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/realname-expand.exp ... DUPLICATE: gdb.base/realname-expand.exp: set basenames-may-differ on This is due to the fact that the test restarts GDB twice and each time sets the basenames-may-differ setting. This patch proposes to fix this by not restarting GDB so the setting is maintained. It just clears the breakpoints between the two tests and updates the breakpoints number as required. This patch also perform some minor refactorings to improve visibility. Tested on x86_64-linux. --- gdb/testsuite/gdb.base/realname-expand.exp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.base/realname-expand.exp b/gdb/testsuite/gdb.base/realname-expand.exp index ffe2f85e812..80bc4e0ab22 100644 --- a/gdb/testsuite/gdb.base/realname-expand.exp +++ b/gdb/testsuite/gdb.base/realname-expand.exp @@ -40,10 +40,12 @@ clean_restart ${testfile} gdb_test_no_output "set basenames-may-differ on" -gdb_test "rbreak realname-expand-real.c:func" "^rbreak realname-expand-real.c:func\r\nBreakpoint 1 at 0x\[0-9a-f\]+: file \[^\r\n\]*/realname-expand-link\\.c, line \[0-9\]+\\.\r\nvoid func\\(void\\);" +gdb_test "rbreak realname-expand-real.c:func" \ + [multi_line "" \ + "Breakpoint 1 at $hex: file \[^\r\n\]*/realname-expand-link\\.c, line $decimal\\." \ + "void func\\(void\\);"] -clean_restart ${testfile} - -gdb_test_no_output "set basenames-may-differ on" +delete_breakpoints -gdb_test "break realname-expand-real.c:func" "^break realname-expand-real.c:func\r\nBreakpoint 1 at 0x\[0-9a-f\]+: file \[^\r\n\]*/realname-expand-link\\.c, line \[0-9\]+\\." +gdb_test "break realname-expand-real.c:func" \ + "\r\nBreakpoint 2 at $hex: file \[^\r\n\]*/realname-expand-link\\.c, line $decimal\\." -- 2.33.1