From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ogZzK9nhs2GaZwAAWB0awg (envelope-from ) for ; Fri, 10 Dec 2021 18:25:13 -0500 Received: by simark.ca (Postfix, from userid 112) id 95EA71F0D0; Fri, 10 Dec 2021 18:25:13 -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.8 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, NICE_REPLY_A 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 DAB5B1EDEE for ; Fri, 10 Dec 2021 18:25:12 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 586383857C77 for ; Fri, 10 Dec 2021 23:25:12 +0000 (GMT) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by sourceware.org (Postfix) with ESMTPS id 235613858405 for ; Fri, 10 Dec 2021 23:25:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 235613858405 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f41.google.com with SMTP id i12so7977597wmq.4 for ; Fri, 10 Dec 2021 15:25:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=NPEG/uQbgfPBFfB+CHDeUkcDENl5OYIbVlBMgkQBl8A=; b=H/Oyvt6qsYoiMNpEKim4L3W+3sApnD5M7oNSHuW+YjYAmLTnQ5SmZWetzyFUrcuVd6 G3tYdQJKp1DpgQm6+9PXSmgrYpca7o2pz0yWxBlDYz/NzIuDcqLhgwtaDsx3A33D8VSB YhJNk+sp1ReFCuxO4AHhuHp1vbIVuPxICsvAjarXRgmVVYejgIVMRTjZGSt6YDPyVMoO BKskUhuXojHzYSmO8rVkjhXIKUfuR2IV+RsinW8GFyCEU7ghYP2ZOuI9s6VJQp/jMa++ fXsco8Hl3szi7SQh02/uSmd4tiR1DJcw+IMAgfn6SMla/zGYIUuojl8524sqktbb5Z42 s1ng== X-Gm-Message-State: AOAM5309j51VP5JupncyDTO7QF+z9ww5C1nflQIT1amw8vIaPFHBeLDS nHqagbvoYWVj1TKizMddO7Jp6BfETNo= X-Google-Smtp-Source: ABdhPJzgtnEF6A2CusAKsjk/uKGK4GKOnR/iMF/eRnNpQ8adX1l0rS+vXPe+bE/r1DzbAA9E8kKFmg== X-Received: by 2002:a7b:c770:: with SMTP id x16mr21109978wmk.66.1639178700212; Fri, 10 Dec 2021 15:25:00 -0800 (PST) Received: from ?IPV6:2001:8a0:f912:1a00:d3db:ac91:4b9e:1449? ([2001:8a0:f912:1a00:d3db:ac91:4b9e:1449]) by smtp.gmail.com with ESMTPSA id l9sm778201wrs.101.2021.12.10.15.24.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Dec 2021 15:24:59 -0800 (PST) Message-ID: Date: Fri, 10 Dec 2021 23:24:58 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH 21/29] gdb/testsuite: Remove duplicates from gdb.base/shlib-call.exp Content-Language: en-US To: Lancelot SIX , gdb-patches@sourceware.org References: <20211121175636.779325-1-lsix@lancelotsix.com> <20211121175636.779325-22-lsix@lancelotsix.com> From: Pedro Alves In-Reply-To: <20211121175636.779325-22-lsix@lancelotsix.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2021-11-21 17:56, Lancelot SIX via Gdb-patches wrote: > When I run the testsuite, I have: > > Running .../gdb/testsuite/gdb.base/shlib-call.exp ... > DUPLICATE: gdb.base/shlib-call.exp: print g > DUPLICATE: gdb.base/shlib-call.exp: set print sevenbit-strings > DUPLICATE: gdb.base/shlib-call.exp: set print address off > DUPLICATE: gdb.base/shlib-call.exp: set width 0 > DUPLICATE: gdb.base/shlib-call.exp: continue until exit > > Fix by adjusting the test names. > > Tested on x86_64-linux. > --- > gdb/testsuite/gdb.base/shlib-call.exp | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/gdb/testsuite/gdb.base/shlib-call.exp b/gdb/testsuite/gdb.base/shlib-call.exp > index 0a5a1c336c1..f7f20cc0127 100644 > --- a/gdb/testsuite/gdb.base/shlib-call.exp > +++ b/gdb/testsuite/gdb.base/shlib-call.exp > @@ -90,7 +90,7 @@ if ![gdb_skip_stdio_test "next over shr1"] { > > > #print g > -gdb_test "print g" "\[0-9\]* = 2" > +gdb_test "print g" "\[0-9\]* = 2" "print g two" > > #print shr1(1) > if ![gdb_skip_stdio_test "print shr1(1)"] { > @@ -166,9 +166,12 @@ gdb_exit > gdb_start > gdb_reinitialize_dir $srcdir/$subdir > gdb_load ${binfile} > -gdb_test_no_output "set print sevenbit-strings" > -gdb_test_no_output "set print address off" > -gdb_test_no_output "set width 0" > +gdb_test_no_output "set print sevenbit-strings" \ > + "set print sevenbit-strings, after restart" > +gdb_test_no_output "set print address off" \ > + "set print address off, after restart" > +gdb_test_no_output "set width 0" \ > + "set width 0, after restart" Let's not fix DUPLICATEs with duplication. :-) Write instead: with_test_prefix "after restart" { gdb_test_no_output "set print sevenbit-strings" gdb_test_no_output "set print address off" gdb_test_no_output "set width 0" } Actually, I take that back. We should just delete these 3 "set" commands and the same ones at the bottom too. Setting width to 0 is already done centrally. The other two make no difference in this test. I strongly suspect this is very very old test code. The "Start with a fresh gdb" block could just use clean_restart. > > > # PR's 16495, 18213 > @@ -193,4 +196,4 @@ gdb_test_multiple "" $test { > } > } > > -gdb_continue_to_end "" continue 1 > +gdb_continue_to_end "after re-run" continue 1 >