]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/testsuite: fix some more duplicate test names in gdb.trace/
authorAndrew Burgess <aburgess@redhat.com>
Thu, 1 Feb 2024 12:49:02 +0000 (12:49 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Tue, 5 Mar 2024 16:35:23 +0000 (16:35 +0000)
commitb208792b31cf194f069af034290b8df6d3ee27c3
treefc5634443f5efc482c50639577ea7a2d410b9ea6
parent533c24e167926995da0a03083f41b8d88141d938
gdb/testsuite: fix some more duplicate test names in gdb.trace/

This commit fixes some duplicate test names in the gdb.trace/
directory when run with the native-gdbserver and
native-extended-gdbserver boards.  In this case the duplicates relate
to the calls to gdb_compile_pthreads which emits a fixed PASS message,
as there are two calls to gdb_compile_pthreads we get a duplicate PASS
message.

In both cases the problem is fixed by adding a with_test_prefix around
one of the compilations, however, I've made additional changes to
clean up the tests a little while I was working on them:

  1. Switch to use prepare_for_testing instead of
  gdb_compile_pthreads.  By passing the 'pthreads' option this does
  call gdb_compile_pthreads under the hood, but using the standard
  compile function is cleaner,

  2. Using prepare_for_testing removes the need to call clean_restart
  immediately afterwards, so those calls are removed,

  3. I removed the unneeded $executable and $expfile globals, where
  the $executable global was used I've replaced this with $binfile,

  4. When we compile two executables I've now given these different
  names so that both exist at the end of the test run,

  5. Removed a gdb_reinitialize_dir call, this is covered by
  clean_restart,

  6. Use gdb_test_no_output where it makes sense.

I now see no duplicate test names when running these test scripts.
There should be no change in what is being tested after this commit.
gdb/testsuite/gdb.trace/ftrace-lock.exp
gdb/testsuite/gdb.trace/trace-mt.exp