[gdb/testsuite] Don't abort testrun for invalid command in test-case
authorTom de Vries <tdevries@suse.de>
Fri, 12 Jun 2020 07:13:17 +0000 (09:13 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 12 Jun 2020 07:13:17 +0000 (09:13 +0200)
commit26783bce15adc0316f9167a216519cebcf1ccac3
tree65cf0274d276e64edf61bc0e87005dca3e9d0ad1
parent453c733fcf74893b5907f935283976c11cd46ad5
[gdb/testsuite] Don't abort testrun for invalid command in test-case

Say we add a call to foobar at the end of a test-case, and run the
test-suite.  We'll run into a dejagnu error:
...
ERROR: (DejaGnu) proc "foobar" does not exist.
...
and the test-suite run is aborted.

It's reasonable that the test-case is aborted, but it's not reasonable that
the testsuite run is aborted.

Problems in one test-case should not leak into other test-cases, and they
generally don't.  The exception is the "invalid command name" problem due to
an override of ::unknown in dejagnu's framework.exp.

Fix this by reverting dejagnu's ::unknown override for the duration of each
test-case, using the gdb_init/gdb_finish hooks.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-06-12  Tom de Vries  <tdevries@suse.de>

PR testsuite/26110
* lib/gdb.exp (gdb_init): Revert dejagnu's override of ::unknown.
(gdb_finish): Reinstall dejagnu's override of ::unknown.
gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdb.exp
This page took 0.034922 seconds and 4 git commands to generate.