From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id OEJAOzKrTWESNAAAWB0awg (envelope-from ) for ; Fri, 24 Sep 2021 06:40:50 -0400 Received: by simark.ca (Postfix, from userid 112) id EEE431EE25; Fri, 24 Sep 2021 06:40:50 -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 49FCC1EDDB for ; Fri, 24 Sep 2021 06:40:50 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 02D793858402 for ; Fri, 24 Sep 2021 10:40:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02D793858402 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1632480050; bh=HBuMGDufIucSLkI5+/IeYSKKWx2KV/37/0O+7DF/H2Y=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=vEgDaw13YqSCwcdgL7oht3Q5MfEwF44qPmWqKUIr/54jtz8wqSrsB8lr67vPR0OmR vcYYFtEmGQXkeDV7xuszZzNDZk1WeQU6vdNI9zKfMEyrNMHN8CptxhWuX1PE0yCdha cKQu5SlV8nqXZDNqjLoxrekwgSh9lUoMQoRnJKdc= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 3A91A385801A for ; Fri, 24 Sep 2021 10:40:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3A91A385801A 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 6C1F61FFE5 for ; Fri, 24 Sep 2021 10:40:26 +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 5955913E14 for ; Fri, 24 Sep 2021 10:40:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id PXyrFBqrTWHdVwAAMHmgww (envelope-from ) for ; Fri, 24 Sep 2021 10:40:26 +0000 Date: Fri, 24 Sep 2021 12:40:24 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix DUPLICATE in gdb.base/load-command.exp Message-ID: <20210924104023.GA1480@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, Fix this duplicate: ... DUPLICATE: gdb.base/load-command.exp: check initial value of the_variable ... by using with_test_prefix. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix DUPLICATE in gdb.base/load-command.exp --- gdb/testsuite/gdb.base/load-command.exp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.base/load-command.exp b/gdb/testsuite/gdb.base/load-command.exp index 8847aff3b74..944dc39c155 100644 --- a/gdb/testsuite/gdb.base/load-command.exp +++ b/gdb/testsuite/gdb.base/load-command.exp @@ -42,8 +42,12 @@ gdb_test "print/x the_variable" " = 0x1234" "check initial value of the_variable gdb_test_no_output "set the_variable = 0x5555" "manually change the_variable" gdb_test "print/x the_variable" " = 0x5555" "check manually changed value of the_variable" -# Re-load the binary using the load command. -gdb_test "load ${binfile}" ".*Loading section .data.*Transfer rate:.*" "re-load binary" - -# Re-loading the binary should have reset the variable value. -gdb_test "print/x the_variable" " = 0x1234" "check initial value of the_variable" +with_test_prefix "reload" { + # Re-load the binary using the load command. + gdb_test "load ${binfile}" ".*Loading section .data.*Transfer rate:.*" \ + "re-load binary" + + # Re-loading the binary should have reset the variable value. + gdb_test "print/x the_variable" " = 0x1234" \ + "check initial value of the_variable" +}