[gdb/testsuite] Handle runto fail in gdb.mi/mi-var-cp.exp
authorTom de Vries <tdevries@suse.de>
Fri, 19 Nov 2021 14:55:16 +0000 (15:55 +0100)
committerTom de Vries <tdevries@suse.de>
Fri, 19 Nov 2021 14:55:16 +0000 (15:55 +0100)
commitf2f38377e5170839927106564d6f939290a2cd67
treee091b5b51abc759a0d8448f6a3c6b42456529fe1
parenta5ac8e7fa3b9c418b6d14ae9d6b0e2e128733ce7
[gdb/testsuite] Handle runto fail in gdb.mi/mi-var-cp.exp

On OBS I ran into:
...
PASS: gdb.mi/mi-var-cp.exp: run to mi-var-cp.cc:81 (set breakpoint)
UNRESOLVED: gdb.mi/mi-var-cp.exp: unable to start target
...
followed by 81 FAILs and two more UNRESOLVEDs.

I didn't manage to reproduce this, but I did notice that the initial
problem causing the UNRESOLVED caused all subsequent UNRESOLVEDs and FAILs.

I emulated the problem by commenting out the send_gdb "run\n" in
mi_run_cmd_full.

Fix this by:
- handling mi_run_cmd failure in mi_get_inline_test
- handling mi_run_inline_test failure in gdb.mi/mi-var-cp.exp, and
  other test-cases using mi_get_inline_test

Tested on x86_64-linux.
gdb/testsuite/gdb.mi/mi-var-child.exp
gdb/testsuite/gdb.mi/mi-var-cmd.exp
gdb/testsuite/gdb.mi/mi-var-cp.exp
gdb/testsuite/gdb.mi/mi-var-rtti.exp
gdb/testsuite/lib/mi-support.exp