Re: [PATCH 2/2] gdb: Make some test names unique

Pedro Alves
2017-06-22T11:08:54Z

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. Otherwise, we have a problem with
all the tests that call functions, and don't explicitly specify a test
name, like:

gdb_test "p function(1)" " = 1"

We have many such cases, C tests, Python tests, etc:

$ grep "[a-z](.*)$" testsuite/gdb.sum | wc -l
1174

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).

Thanks,
Pedro Alves