[gdb/testsuite] Fix untested message in gdb.tui/corefile-run.exp
authorTom de Vries <tdevries@suse.de>
Mon, 13 Mar 2023 16:20:09 +0000 (17:20 +0100)
committerTom de Vries <tdevries@suse.de>
Mon, 13 Mar 2023 16:20:09 +0000 (17:20 +0100)
commited7d5797b56e8b771d5f7553738f790819d96b6f
tree9abe25130b8e931a3fd042c6fef42aaa21bb9a85
parent275589d9a0fda6fe898aae678588bb3841d3fed1
[gdb/testsuite] Fix untested message in gdb.tui/corefile-run.exp

In test-case gdb.tui/corefile-run.exp, we have this bit:
...
require !use_gdb_stub
if { [target_info gdb_protocol] == "extended-remote" } {
    untested "not supported"
    return
}
...

So with target board native-gdbserver we get:
...
UNSUPPORTED: gdb.tui/corefile-run.exp: require failed: !use_gdb_stub
...
and with target board native-extended-gdbserver instead:
...
UNTESTED: gdb.tui/corefile-run.exp: not supported
...

Fix this by:
- adding an optional argument target_description to proc
  target_can_use_run_cmd
- handling the target_description == core &&
  [target_info gdb_protocol] == "extended-remote" case in the proc
- using require {target_can_use_run_cmd core}
such that now in both cases we have:
...
UNSUPPORTED: gdb.tui/corefile-run.exp: require failed: \
  target_can_use_run_cmd core
...

Tested on x86_64-linux.
gdb/testsuite/gdb.tui/corefile-run.exp
gdb/testsuite/lib/gdb.exp