Re: [PATCH v2 4/8] Fix test names starting with uppercase using gdb_test_multiple

Luis Machado
2016-11-29T15:07:11Z

On 11/29/2016 08:48 AM, Yao Qi wrote:
> On Mon, Nov 28, 2016 at 10:06:28AM -0600, Luis Machado wrote:
>> On 11/27/2016 11:09 AM, Yao Qi wrote:
>>> On Fri, Nov 25, 2016 at 02:54:00PM -0600, Luis Machado wrote:
>>>> This fixes offender testcases that have test names starting with uppercase
>>>> when using gdb_test_multiple in a single-line construct.
>>>>
>>>> gdb/testsuite/ChangeLog
>>>> 2016-11-25 Luis Machado <lgustavo@codesourcery.com>
>>>>
>>>> Fix test names starting with uppercase throughout the files.
>>>>
>>>> * gdb/testsuite/gdb.arch/i386-bp_permanent.exp
>>>> * gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
>>>> * gdb/testsuite/gdb.base/disasm-end-cu.exp
>>>> * gdb/testsuite/gdb.base/macscp.exp
>>>> * gdb/testsuite/gdb.base/pending.exp
>>>> * gdb/testsuite/gdb.base/watch_thread_num.exp
>>>> * gdb/testsuite/gdb.cp/exception.exp
>>>> * gdb/testsuite/gdb.cp/gdb2495.exp
>>>> * gdb/testsuite/gdb.cp/local.exp
>>>> * gdb/testsuite/gdb.python/py-evsignal.exp
>>>> * gdb/testsuite/gdb.python/python.exp
>>>> * gdb/testsuite/gdb.trace/tracecmd.exp
>>>
>>> Drop "gdb/testsuite/". Patch is good to me, but I think we need to
>>> enforce a rule in "proc gdb_test_multiple" that test message should
>>> start with a lower case letter, emit an ERROR if it starts with
>>> uppercase.
>>>
>>
>> Do you mean just for gdb_test_multiple?
>
> Yes,
>

Why just that one? Shouldn't we attempt to enforce this for all the
other proc's, so gdb_test, gdb_test_multiple, gdb_test_no_output and
mi_gdb_test?

>>
>> It can be tricky, since one is still free to start the sentences
>> with something like "ARM ..." or some other technology name. So
>> unfortunately we can't be too strict. I wish we could.
>
> Do we have some many technology names? We have a white list of these
> technology names which can be capitalized in test message.
>

It is certainly possible, but do we want to add one more layer of
maintenance? We could enforce a rule from now on to require test names
to always start with lowercase or to even be all lowercase.

I don't think we're coherent with our use of lower/uppercase anyway. For
example, GDBserver gets called gdbserver in gdbserver's own help text
and the testsuite is (less so now with this series) a mixed bag.

I'm open to ideas.