From: Tom de Vries <tdevries@suse.de>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/testsuite] Add -cooked pattern flag to gdb_test_multiple
Date: Sun, 06 Oct 2019 06:37:00 -0000 [thread overview]
Message-ID: <21c198a3-5013-b7e2-1d72-00470704e899@suse.de> (raw)
In-Reply-To: <20191005153835.GL4962@embecosm.com>
On 05-10-19 17:38, Andrew Burgess wrote:
> * Tom de Vries <tdevries@suse.de> [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.
Thanks,
- Tom
next prev parent reply other threads:[~2019-10-06 6:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-19 11:13 [PATCH][gdb/testsuite] Introduce gdb_test_ext Tom de Vries
2019-09-19 16:18 ` Andrew Burgess
2019-09-19 19:01 ` Tom de Vries
2019-09-19 19:24 ` Andrew Burgess
2019-09-19 21:50 ` Tom de Vries
2019-10-05 6:05 ` [PATCH][gdb/testsuite] Add -cooked pattern flag to gdb_test_multiple Tom de Vries
2019-10-05 15:38 ` Andrew Burgess
2019-10-06 6:37 ` Tom de Vries [this message]
2019-10-07 10:30 ` Andrew Burgess
2019-10-06 8:29 ` Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=21c198a3-5013-b7e2-1d72-00470704e899@suse.de \
--to=tdevries@suse.de \
--cc=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox