gdb/testsuite: Remove duplicates from gdb.base/realname-expand.exp
authorLancelot SIX <lsix@lancelotsix.com>
Fri, 19 Nov 2021 22:48:59 +0000 (22:48 +0000)
committerLancelot SIX <lsix@lancelotsix.com>
Fri, 7 Jan 2022 22:43:32 +0000 (22:43 +0000)
commitf05f3e723568756ac523ffddfe90fe6ed12dbb95
tree9ddc1c3c7716a94943aae789b75e2e11b9b4e454
parent27e9a99fa02b635f5a89358c196fbf8f1670c6d7
gdb/testsuite: Remove duplicates from gdb.base/realname-expand.exp

When running the testsuite, I have:

    Running .../gdb/testsuite/gdb.base/realname-expand.exp ...
    DUPLICATE: gdb.base/realname-expand.exp: set basenames-may-differ on

This is due to the fact that the test restarts GDB twice and each time
sets the basenames-may-differ setting.  This patch proposes to fix this
by not restarting GDB so the setting is maintained.  It just clears the
breakpoints between the two tests and updates the breakpoints number as
required.

This patch also perform some minor refactorings to improve visibility.

Tested on x86_64-linux.
gdb/testsuite/gdb.base/realname-expand.exp