]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/testsuite: remove incorrect global variable accesses
authorAndrew Burgess <aburgess@redhat.com>
Mon, 13 Oct 2025 13:44:56 +0000 (14:44 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Wed, 15 Oct 2025 19:15:18 +0000 (20:15 +0100)
commitb6753354fbbe7c2c66ae9f452ba7aa049db0fe0c
tree925f6f3c4ca55f60a8c6152848690a01a6393c0b
parentc1288ad0f77bf2211dc33de30fe86dd084670a15
gdb/testsuite: remove incorrect global variable accesses

I noticed in gdb.replay/missing-thread.exp a reference to $testfile in
a location where 'testfile' had not been made available via a use of
'global'.  The uses looked like this:

  unsupported "$testfile (couldn't start gdbreplay)"

I think there are three problems here, the $testfile is invalid
because there's no 'global testfile' making the variable available.
The use of $testfile is redundant anyway as 'unsupported' already adds
the script name to the output line.  The final text within parenthesis
is bad style that's an important part of the output, but GDB test name
style is that text in parenthesis is additional text that could be
ignored, e.g. "(timeout)".

Replace the above with just:

  unsupported "couldn't start gdbreplay"

This same construct has been copied into multiple gdb.replay/ tests,
so fix them all.

There's no change to what is actually tested after this commit.
gdb/testsuite/gdb.replay/connect.exp
gdb/testsuite/gdb.replay/fetch-exec-and-args.exp
gdb/testsuite/gdb.replay/missing-thread.exp