This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] gdb: Make some test names unique
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: Andrew Burgess <andrew dot burgess at embecosm dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 22 Jun 2017 13:06:39 +0100
- Subject: Re: [PATCH 2/2] gdb: Make some test names unique
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1049014287D
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1049014287D
- References: <cover.1497466455.git.andrew.burgess@embecosm.com> <c9b6ef063fbb5e33c157b1041418cd2fb7d8cf27.1497466455.git.andrew.burgess@embecosm.com> <86vanoi9zm.fsf@gmail.com> <1565437a-a03e-1fa8-021a-a2d32de69a97@redhat.com> <CAH=s-PNf8xHRCPzLsf3Ub8Wa=pz+h1O-ij=P2a1TeTRQT0VbuQ@mail.gmail.com>
On 06/22/2017 12:59 PM, Yao Qi wrote:
> On Thu, Jun 22, 2017 at 12:08 PM, Pedro Alves <palves@redhat.com> wrote:
>> On 06/22/2017 11:37 AM, Yao Qi wrote:
>>> Andrew Burgess <andrew.burgess@embecosm.com> writes:
>>>
>>>
>>>> mi_gdb_test "540-data-evaluate-expression vla1(1)" \
>>>> - "540\\^done,value=\"1\"" "evaluate filled vla"
>>>> + "540\\^done,value=\"1\"" "evaluate filled vla(1)"
>>>
>>> Do not use "tail parentheses" on the test message,
>>> https://sourceware.org/gdb/wiki/GDBTestcaseCookbook#Do_not_use_.22tail_parentheses.22_on_test_messages
>>
>> The wiki doesn't mention it, but I think the rule should only apply when
>> there's a space before the parens.
>
> I wanted to get confirm from analyze-racy-logs.py,
> but I was lost in it, so I decided to follow the wiki.
I only realized the need for the tweak to the rule after
the original discussion that led to the rule being added
to the wiki, and this is the first time I'm suggesting it,
I think.
>>
>> I don't think it's worth it, or even a good idea to try to
>> come up with different test names for all of these. In cases like
>> these, I think it's generally possible to avoid the space before
>> the parens. So IMO, we should clarify the rule instead
>> (and the buildbot testresult diffing accordingly, if necessary).
>>
>
> The current rule is "When you write a test, do not
> put text between parentheses at the end of the text
> message", we can change it "when you write a test,
> do not put text between parentheses at the end of
> the text message and space before parentheses".
>
> They are OK,
> PASS: gdb.base/foo.exp: whatever test
> FAIL: gdb.base/foo.exp: whatever test (timeout)
> PASS: gdb.base/foo.exp: whatever test(1st)
> PASS: gdb.base/foo.exp: whatever test(2nd)
>
> They are not OK,
> PASS: gdb.trace/trace-break.exp: 2 trace trace on: trace set_point (1)
> PASS: gdb.trace/trace-break.exp: 2 trace trace on: trace set_point (2)
>
> Is it right?
Yes.
Thanks,
Pedro Alves