aboutsummaryrefslogtreecommitdiff
path: root/gdb/d-namespace.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-04-23 10:47:29 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-05-11 22:26:52 +0100
commit34584c091bb4414cea6531269f435b2938b2d8e6 (patch)
treea97a3c3932037f3b0bd9fe392f7216b0999c293c /gdb/d-namespace.c
parent5eb68a39a2c2908fc01f03e79daed72ba85dc14c (diff)
downloadbinutils-34584c091bb4414cea6531269f435b2938b2d8e6.zip
binutils-34584c091bb4414cea6531269f435b2938b2d8e6.tar.gz
binutils-34584c091bb4414cea6531269f435b2938b2d8e6.tar.bz2
gdb/testsuite: Detect and warn if paths are used in test names
A new library is introduced that hooks into the core of Dejagnu and detects when a test's name includes either the source or build paths. If any offending test names are detected then Dejagnu will print a new result type, '# of paths in test names'. Users should treat this result type just like other bad results types, and aim not to increase this number. As well as displaying the total number of offending tests as part of the final results, a new marker is included in both the gdb.log and gdb.sum files, this marker starts with 'PATH: ', so an offending test would be expected to appear like this: PASS: gdb.base/sometest.exp: Loaded /path/to/build/testsuite/foo.exe PATH: gdb.base/sometest.exp: Loaded /path/to/build/testsuite/foo.exe This should make it easier to track down offending tests. Currently for a local run on my machine, I don't see any offending test names, but it is possible that different targets, or different configurations, might currently be breaking the no paths rule. In order to get this working I have needed to wrap two core Dejagnu functions, log_summary, and reset_vars. Relying on core functions that are not part of any API is always going to be risky, given the relatively slow rate of Dejagnu change this is probably OK for now, and we can possibly upstream some changes to Dejagnu that would allow this functionality to be supported in a more official way later on. Currently if the tests are run in parallel mode the new result type is not merged into the combined summary file so users will need to run in non-parallel mode to check this result. Similarly, the 'PATH: ' markers will not be merged into the combined summary file. A later commit will fix this. gdb/testsuite/ChangeLog: * lib/gdb.exp: Include check-test-names.exp library. * lib/check-test-names.exp: New file.
Diffstat (limited to 'gdb/d-namespace.c')
0 files changed, 0 insertions, 0 deletions