From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128760 invoked by alias); 7 Oct 2019 10:30:37 -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 128609 invoked by uid 89); 7 Oct 2019 10:30:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=helped, continuing X-HELO: mail-wm1-f66.google.com Received: from mail-wm1-f66.google.com (HELO mail-wm1-f66.google.com) (209.85.128.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 07 Oct 2019 10:30:23 +0000 Received: by mail-wm1-f66.google.com with SMTP id r19so12057246wmh.2 for ; Mon, 07 Oct 2019 03:30:20 -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=7CBQ+6iDSXoHrKeyfQze8CmeEhU3TRVK9YM9bQJzPAU=; b=FB/eIgepaVTnDfrShcUuRirp7QhMb8KB7ltBWBcyZ9SELIDSeosoviVwHZmerNijUY F6jEwm3xw3eM59ie5Pwf2ckhZNe56W7+HgVeNTDGY70F3YaULBli4pMuhkTEhnkXtOuM 7xmeJ20rHzOpC3tEsAGWLcptYGeF6OSGzNklAdzu1cteZXS1r5LvL1KGv1mewOPjxuEm 4V18XdjeiMNdLrLCB6QV/Fy17oxYBB6ClS2y2e8tNv7XK+2QzQhYgGoQNQTlfZ8Y09Vz LN7SH28q3wtldiNVgxpZwgykeC3uKcKl1pvXDTnbenvnHDQLDam2Eke4K829b04lAjh0 kn6Q== Return-Path: Received: from localhost (cust64-dsl91-135-5.idnet.net. [91.135.5.64]) by smtp.gmail.com with ESMTPSA id h7sm14583857wrt.17.2019.10.07.03.30.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Oct 2019 03:30:18 -0700 (PDT) Date: Mon, 07 Oct 2019 10:30:00 -0000 From: Andrew Burgess To: Tom de Vries Cc: gdb-patches@sourceware.org Subject: Re: [PATCH][gdb/testsuite] Add -cooked pattern flag to gdb_test_multiple Message-ID: <20191007103017.GN4962@embecosm.com> References: <20190919111322.GA29391@delia> <20190919161846.GC4962@embecosm.com> <62b20c8f-6792-c17e-621a-946002df6df9@suse.de> <20190919192423.GF4962@embecosm.com> <86b5c1b8-ac35-5c7e-1a5d-89b8563ab761@suse.de> <20191005153835.GL4962@embecosm.com> <21c198a3-5013-b7e2-1d72-00470704e899@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21c198a3-5013-b7e2-1d72-00470704e899@suse.de> X-Fortune: MESSAGE ACKNOWLEDGED -- The Pershing II missiles have been launched. 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-10/txt/msg00184.txt.bz2 * Tom de Vries [2019-10-06 08:37:31 +0200]: > On 05-10-19 17:38, Andrew Burgess wrote: > > * Tom de Vries [2019-10-05 08:05:03 +0200]: > > > >> [ was: Re: [PATCH][gdb/testsuite] Introduce gdb_test_ext ] > >> > >> On 19-09-19 21:24, Andrew Burgess wrote: > >>> On further thought, I actually think there's no need for an extra > >>> function at all, we can get all the benefit (as I see it) by possibly > >>> updating gdb_test_multiple. I'm travelling right now so can't code > >>> this up, but I think a solution that does something like this: > >>> > >>> gdb_test_multiple "command" "test name" { > >>> -re "full regexp here$gdb_prompt" { > >>> pass $gdb_test_multiple_name > >>> } > >>> -output "pattern without prompt" { > >>> fail $gdb_test_multiple_name > >>> } > >>> } > >>> > >>> So using '-re' and '-output' to specialise the behaviour of > >>> gdb_test_multiple, and adding in the $gdb_test_multiple_name variable. > >>> > >>> When I get back to my desk I'll try to code this up. > >> > >> Hi, > >> > >> I took a stab at this. I'm not sure about the naming though. > >> > >> For the pattern flag I used the name -cooked. Perhaps -wrap is better? > >> Any better suggestions? > >> > >> I used gdb_test_multiple_message (using the 'message' postfix because it > >> matched the name of the gdb_test_multiple argument) for the convenience > >> variable, but it's a tad long, perhaps we could abbreviate to > >> 'gtm_message'? > > > > This duplicates work in this patch: > > > > https://sourceware.org/ml/gdb-patches/2019-10/msg00023.html > > > > I see, that's unfortunate. [ FWIW, it would have helped me if you would > have submitted continuing this thread, or cc-ed me on the new thread, or > mentioned the new thread at this thread. ] > > > I was just about to merge that patch, but I'll leave it for a couple > > of days in case you'd like to provide feedback. > > > > Pedro's suggestion, which I was going to adopt was 'gdb_test_name'. > > OK, I'll take a look and follow up at the new thread if I have any comments. Apologies, I'll try to do better next time. I have now pushed the gdb_test_name patch. Thanks, Andrew