From: Simon Marchi <simark@simark.ca>
To: Pedro Alves <palves@redhat.com>,
Philippe Waroquiers <philippe.waroquiers@skynet.be>,
gdb-patches@sourceware.org
Subject: Re: [RFA] Make test names unique in python.exp and guile.exp
Date: Tue, 23 Jun 2020 17:56:03 -0400 [thread overview]
Message-ID: <fee03020-dfb1-14e2-4ecc-74344717262b@simark.ca> (raw)
In-Reply-To: <dece8e44-ed39-2585-c32a-67ed1ffec4d5@redhat.com>
On 2020-06-23 5:43 p.m., Pedro Alves wrote:
> On 6/23/20 10:32 PM, Simon Marchi wrote:
>> On 2020-06-23 4:51 p.m., Philippe Waroquiers via Gdb-patches wrote:
>>> + if {[gdb_test_multiple $input "$name - $input" {
>>> + -re "\[\r\n\]*($result)\[\r\n\]+($gdb_prompt | *>)$" {
>>> + pass "$name - $input (input nr $inputnr)"
>>
>> The test name passed as the second argument of `gdb_test_multiple` and the test
>> name passed to `pass` should match. This is why the special variable $gdb_test_name
>> was added, to avoid potential mismatches. You can use "pass $gdb_test_name" inside
>> the gdb_test_multiple body.
>
> Text within the "(xxx)" at the end is considered informational, not
> part of the test name, though. That's why we avoid trailing parens
> in general. So in this case they do match. Just like these match:
>
> PASS: foo
> FAIL: foo (timeout)
>
> Still a good idea to write:
>
> pass "$gdb_test_name (input nr $inputnr)"
>
> though.
But here we want to use $inputnr to really differentiate the names of
the tests, because $input is a command to execute. So if two commands to
execute are "end", we would end up with
PASS: something - end (input nr 0)
PASS: something - end (input nr 1)
which would be wrongfully considered as the same test. So I think we need
inputnr to be part of the test name, not in parenthesis. Maybe
$name: input $inputnr: $input
?
Simon
next prev parent reply other threads:[~2020-06-23 21:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 20:51 Philippe Waroquiers
2020-06-23 21:32 ` Simon Marchi
2020-06-23 21:43 ` Pedro Alves
2020-06-23 21:56 ` Simon Marchi [this message]
2020-06-24 11:28 ` Pedro Alves
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=fee03020-dfb1-14e2-4ecc-74344717262b@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=philippe.waroquiers@skynet.be \
/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