From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112539 invoked by alias); 4 Sep 2019 10:59:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 112531 invoked by uid 89); 4 Sep 2019 10:59:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-wr1-f45.google.com Received: from mail-wr1-f45.google.com (HELO mail-wr1-f45.google.com) (209.85.221.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Sep 2019 10:59:55 +0000 Received: by mail-wr1-f45.google.com with SMTP id s18so20803970wrn.1 for ; Wed, 04 Sep 2019 03:59:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=M1VbiCnMUZ2406waBKX0fWeeqeOApIeSXgfK+A1CDO8=; b=cgIKSsCdJXJLVEqpoNVNroZIAvSuv6Gm3o9wdkbAdI5NGkjo5gZojjtW3I3mFP8zLJ Od0FvnGVMboW/+7WfRs94hG/8GH9VZkDK7W0wYzYcH4PHgokd5weaNEN0H++R44iEMgr LQ+JDssp1OsEgbWqdtHSMQYtAGvDzkGe1t2sE/4f1C6tStKsX90NC+tlukjpV4rlnkMl ctDj1RfUoZ+qLhQujmwPBvWrk0jOhLniX1Ajy1DyohrZcvmB4SoNIv56YLUCfH5iMglc GvY4oKd6xfnWR5RjyUMMcPxBSE8Vgf3OUxObSPDeIh+62AwaRAy00Bkbw4k3JDCjB6jE 6r4A== Return-Path: Received: from localhost (host86-161-16-231.range86-161.btcentralplus.com. [86.161.16.231]) by smtp.gmail.com with ESMTPSA id t203sm3655515wmf.42.2019.09.04.03.59.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Sep 2019 03:59:53 -0700 (PDT) Date: Wed, 04 Sep 2019 10:59:00 -0000 From: Andrew Burgess To: Tom de Vries Cc: "gdb-patches@sourceware.org" , Jan Kratochvil Subject: Re: [RFC][gdb/testsuite] Remove breakpoint command in gdb.base/ui-redirect.exp Message-ID: <20190904105952.GI6076@embecosm.com> References: <3150ecd9-9221-4360-6a16-563b3c5ef1ab@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3150ecd9-9221-4360-6a16-563b3c5ef1ab@suse.de> X-Fortune: A chicken is an egg's way of producing more eggs. X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00025.txt.bz2 * Tom de Vries [2019-09-03 19:43:44 +0200]: > Hi, > > I noticed a bit in gdb.base/ui-redirect.exp that sets a breakpoint > command on main, but then due to runto_main, the break point is deleted: > ... > (gdb) break main^M > Breakpoint 1 at 0x4004d7: file > /data/gdb_versions/devel/src/gdb/testsuite/gdb.base/start.c, line 34.^M > (gdb) commands^M > Type commands for breakpoint(s) 1, one per line.^M > End with a line saying just "end".^M > >PASS: gdb.base/ui-redirect.exp: commands > print 1^M > >PASS: gdb.base/ui-redirect.exp: print 1 > end^M > (gdb) PASS: gdb.base/ui-redirect.exp: end > delete breakpoints^M > Delete all breakpoints? (y or n) y^M > ... > > In the original commit ( submission here > https://sourceware.org/ml/gdb-patches/2010-09/msg00120.html ) there was > no runto_main, and the breakpoint command was not triggered either. > > Is this some artefact, and can it be removed, or is it actually testing > something related to redirection? I can't comment on the original patch intention, but given this part of the tests never really did anything useful, and the "commands" mechanism is tested in gdb.base/commands.exp, I'd be OK with what you propose below. I'd suggest give it a few days for anyone else to chip in, then just commit this as an obvious cleanup. Thanks, Andrew > > Thanks, > - Tom > diff --git a/gdb/testsuite/gdb.base/ui-redirect.exp b/gdb/testsuite/gdb.base/ui-redirect.exp > index 4507ac51a2..e48ca72e91 100644 > --- a/gdb/testsuite/gdb.base/ui-redirect.exp > +++ b/gdb/testsuite/gdb.base/ui-redirect.exp > @@ -23,23 +23,6 @@ if { [prepare_for_testing "failed to prepare" ui-redirect start.c] } { > return -1 > } > > -gdb_breakpoint main > - > -set test "commands" > -gdb_test_multiple $test $test { > - -re "End with a line saying just \"end\"\\.\r\n>$" { > - pass $test > - } > -} > - > -set test "print 1" > -gdb_test_multiple $test $test { > - -re "\r\n>$" { > - pass $test > - } > -} > -gdb_test_no_output "end" > - > if ![runto_main] { > fail "can't run to main" > return -1