From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45874 invoked by alias); 23 Oct 2018 22:05:13 -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 45862 invoked by uid 89); 23 Oct 2018 22:05:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=aimed, waroquiers, Waroquiers, Hx-languages-length:1384 X-HELO: mailsec109.isp.belgacom.be Received: from mailsec109.isp.belgacom.be (HELO mailsec109.isp.belgacom.be) (195.238.20.105) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 Oct 2018 22:05:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1540332312; x=1571868312; h=message-id:subject:from:to:date:in-reply-to:references: mime-version:content-transfer-encoding; bh=wMspgLZPYqwT7W4TO9pJ4ONSIiuL2evCcU3Nzvg5q9s=; b=HSX22MZou7j69q2gDDQOyzLi2O2nFiB5y6L/mkrF6mvwQeVMIUuNtrC7 /tNFWVG8lYwyZm2dhljqMUNpUSjG+Q==; Received: from unknown (HELO md) ([109.129.148.150]) by relay.skynet.be with ESMTP/TLS/AES256-GCM-SHA384; 24 Oct 2018 00:05:09 +0200 Message-ID: <1540332309.12106.10.camel@skynet.be> Subject: Re: [RFAv3 5/5] Add a test case for info args|functions|locals|variables [-q] [-t TYPEREGEXP] [NAMEREGEXP] From: Philippe Waroquiers To: Pedro Alves , gdb-patches@sourceware.org Date: Tue, 23 Oct 2018 22:05:00 -0000 In-Reply-To: <0f46cdb0-4c14-2d1b-9f5f-410b32c0915d@redhat.com> References: <20180923214209.985-1-philippe.waroquiers@skynet.be> <20180923214209.985-6-philippe.waroquiers@skynet.be> <0f46cdb0-4c14-2d1b-9f5f-410b32c0915d@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00528.txt.bz2 On Mon, 2018-10-22 at 15:18 +0100, Pedro Alves wrote: > On 09/23/2018 10:42 PM, Philippe Waroquiers wrote: > > +############# test 'info args' in function setup. > > + > > +gdb_test "frame 1" ".* in setup .*" "set frame 1 for info args" > > + > > +# test name regexp matching all > > +foreach_with_prefix cmd { > > + "info args" > > + "info args arg_" > > + "info args g" > > + "info args -- .*" } { > > + gdb_test $cmd \ > > + [multi_line \ > > + "arg_c = 100 'd'" \ > > + "arg_i = 3" \ > > + "arg_j = 4" \ > > + ] \ > > + "info args" > > +} > > + > > +# test name regexp or type regexp matching some > > +foreach_with_prefix cmd { > > + "info args -t int" > > + "info args arg_[ij]"} { > > + gdb_test $cmd \ > > + [multi_line \ > > + "arg_i = 3" \ > > + "arg_j = 4" \ > > + ] \ > > + "info args" > > +} > > Duplicate test names. > > Consider sing with_test_prefix to wrap groups of tests. Doing make check RUNTESTFLAGS="gdb.base/info_qt.exp" cat gdb/testsuite/gdb.sum | grep "PASS" | sort | uniq -c | sort -n shows only unique test names (thanks to foreach_with_prefix I think). Is the 'with_test_prefix' aimed at removing duplication ? Or is it to have 4 groups wrapping together all the tests of 'info var' 'info local' 'info functions' 'info args' ? Thanks Philippe