[PATCH 0/4] Automatic detection of test name problems

Andrew Burgess
2020-04-23T17:54:02Z

This started as fixing some test names in
gdb.btrace/multi-inferior.exp, but then I wanted to try and prevent
these problems creeping back in again.

So, this series extends our testing framework so that Dejagnu will now
produce two new result types, these are:

# of paths in test names
# of duplicate test names

So, the test gdb.btrace/multi-inferior.exp (without the fix in this
series) would produce results like this:

=== gdb Summary ===

# of expected passes 10
# of paths in test names 2

This indicates that two test names include either the build or source
path, which should really be resolved.

Alternatively, the test gdb.ada/fun_overload_menu.exp currently
produces results like this:

=== gdb Summary ===

# of expected passes 8
# of duplicate test names 2

Indicating that two test names are duplicated.

It is expected that users will treat these new results just like
FAILs, they should never increase these numbers when adding new tests.

It's possible for a test run to include both of the new test result
types.

I've updated the dg-extract-results scripts so that the new result
types are merged over when running the tests in parallel. I know this
change needs to go through GCC, but I wanted to discuss these patches
here first, before posting the dg-extract-results changes to the gcc
list.

I'll merge the first patch in this series (the
gdb.btrace/multi-inferior.exp fix) relatively soon as obvious.

Feedback and thoughts welcome.

Thanks,
Andrew

--

Andrew Burgess (4):
gdb/testsuite: Remove build paths from test names
gdb/testsuite: Detect and warn if paths are used in test names
gdb/testsuite: Detect and warn about duplicate test names
contrib: Handle GDB specific test result types

contrib/ChangeLog | 5 +
contrib/dg-extract-results.py | 4 +-
contrib/dg-extract-results.sh | 10 ++
gdb/testsuite/ChangeLog | 17 +++
gdb/testsuite/gdb.btrace/multi-inferior.exp | 6 +-
gdb/testsuite/lib/check-test-names.exp | 108 ++++++++++++++++++++
gdb/testsuite/lib/gdb.exp | 1 +
7 files changed, 148 insertions(+), 3 deletions(-)
create mode 100644 gdb/testsuite/lib/check-test-names.exp

--
2.25.3