gdb/testsuite: remove duplicate test names for gdb.cp/nsusing.exp
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 16 Mar 2021 10:09:25 +0000 (10:09 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 26 Mar 2021 14:04:15 +0000 (14:04 +0000)
commitac45a6ca5105ebd9f6b68368bcba24bbb9453e58
treed587fdded30488c3c986d32c9109d1638204f529
parentc3344b626d4c593f81a840be521d9ad47d37f979
gdb/testsuite: remove duplicate test names for gdb.cp/nsusing.exp

In trying to resolve the duplicate test names for the
gdb.cp/nsusing.exp script, I ended up giving the test script a serious
spring clean.

This reverts some of the changes introduced in commit df83a9bf8b0d,
but I don't think that we have lost any testing.

The test program is made of many functions, the test script wants to
stop in different functions and check which symbols are in scope.

Previously the test script would either restart GDB completely in
order to "progress" to the next function, or the script would restart
the test program using 'runto'.

In this commit I have reordered the steps of the test to correspond to
program order, I then progress through the test program once by just
placing a breakpoint and then continuing.  As I said, the test is
checking which symbols are in scope at each location, so the exact
order of the tests doesn't matter, so long as we check the correct
symbols at each location.

I have also given the comments capital letters and full stops, and
re-wrapped them to a more sensible line length.

There was a duplicate test block introduced in the df83a9bf8b0d
commit which I have removed in this commit, this duplicate code was
responsible for one of the duplicate test names.

The other duplicate test name was due to the same command being run at
different locations, in this case I just gave the two tests explicit,
unique, names.

gdb/testsuite/ChangeLog:

* gdb.cp/nsusing.exp: Rewrite test, remove a duplicate test block.
Avoid repeated uses of 'runto', and instread just progress once
through the test stopping at different breakpoints.  Give comments
a capital letter and full stop.  Give duplicate tests unique names.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.cp/nsusing.exp
This page took 0.027679 seconds and 4 git commands to generate.