From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simark@simark.ca>,
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 22:43:43 +0100 [thread overview]
Message-ID: <dece8e44-ed39-2585-c32a-67ed1ffec4d5@redhat.com> (raw)
In-Reply-To: <bf9dc761-2e70-729e-44dc-56cdcacf30e1@simark.ca>
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.
There were other cases in the patch that didn't match though. Like:
> gdb_test_multiple "python gdb.prompt_hook = prompt" "set the hook" {
> -re "\[\r\n\]$newprompt $" {
> - pass "set hook"
> + pass "set hook prompt"
> }
> }
Here this can result in either:
FAIL: set the hook
PASS: set hook prompt
Pedro Alves
next prev parent reply other threads:[~2020-06-23 21:43 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 [this message]
2020-06-23 21:56 ` Simon Marchi
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=dece8e44-ed39-2585-c32a-67ed1ffec4d5@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
--cc=simark@simark.ca \
/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