From: Lancelot SIX <Lancelot.Six@amd.com>
To: Pedro Alves <pedro@palves.net>, gdb-patches@sourceware.org
Cc: lsix@lancelotsix.com
Subject: Re: [PATCH] gdb/testsuite: Fix race in gdb.dwarf2/calling-convention.exp
Date: Wed, 30 Mar 2022 15:46:01 +0100 [thread overview]
Message-ID: <92eb4303-d6f6-1912-804d-a122b80e6768@amd.com> (raw)
In-Reply-To: <e86dd525-abe2-f72d-080c-7ee1470f31d8@palves.net>
Hi,
> This should escape the "?" in "now?" too, as '?' has special meaning in regexps.
Yes, this one should definitely be escaped.
>
> The ".*" just before (y or n) isn't needed, right?
>
TBH, this is a pattern I used from somewhere else… And at the moment is
sort of is required because of the non-escaped "?" you mentioned just
above. If the "?" is escaped properly, the ".*" can (should) be
replaced by a plain space " ".
>> pass $gdb_test_name
>> + gdb_test "n" "Not confirmed" "Cancel return"
>
> Lowercase messages please.
>
> Note gdb_test can handle this itself, it supports two extra arguments to handle questions. Like so:
Thanks, I was not aware of this. This indeed simplified the all thing
even further, so it should be preferred.
>
> gdb_test "return 35" \
> "Not confirmed" \
> "return 35" \
> "Function 'foo' does not follow the target calling convention.\r\nIf you continue, setting the return value will probably lead to unpredictable behaviors.\r\nMake foo return now\\? \\(y or n\\) $" \
> "n"
>
> Note that if gdb doesn't print the question and prints "Not confirmed" straight away, the test will still pass, because
> the question is optional. IMHO that's a gdb_test misfeature, though, which can lead to regressions without us noticing.
> I wrote a patch to change that, and it caught a number of wrong things in the testsuite. I'll send it a bit later.
Great! Thanks for doing this.
Best,
Lancelot.
prev parent reply other threads:[~2022-03-30 14:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 12:50 Lancelot SIX
2022-03-30 13:12 ` Bruno Larsen
2022-03-30 14:21 ` Pedro Alves
2022-03-30 14:46 ` Lancelot SIX [this message]
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=92eb4303-d6f6-1912-804d-a122b80e6768@amd.com \
--to=lancelot.six@amd.com \
--cc=gdb-patches@sourceware.org \
--cc=lsix@lancelotsix.com \
--cc=pedro@palves.net \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).