[gdb/testsuite] Emit unresolved for unknown proc
authorTom de Vries <tdevries@suse.de>
Mon, 29 Jun 2020 11:59:19 +0000 (13:59 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 29 Jun 2020 11:59:19 +0000 (13:59 +0200)
Since commit 26783bce15 "[gdb/testsuite] Don't abort testrun for invalid
command in test-case" we don't abort the testrun when encountering an invalid
command.  However, since we don't report errors in the summary, there's a
chance that the error goes unnoticed.

Make the invalid command error more visible by marking the test-case
unresolved, such that we have f.i.:
...
PASS: gdb.python/py-breakpoint.exp: test_bkpt_internal: Test watchpoint write
UNRESOLVED: gdb.python/py-breakpoint.exp: test_bkpt_eval_funcs: \
  testcase aborted due to invalid command name: gdb_py_test_multiple
ERROR: tcl error sourcing py-breakpoint.exp.
ERROR: invalid command name "gdb_py_test_multiple"
    while executing
  ...
                === gdb Summary ===

nr of expected passes            56
nr of unresolved testcases       1
...

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

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

* lib/gdb.exp (unknown): Make test-case unresolved.

gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdb.exp

index 0c2f47b5f2b63d3532a6cf86fb470b0cef3b3f2d..8001ec1a6295acf1e7536643b316b484cf796826 100644 (file)
@@ -1,3 +1,7 @@
+2020-06-29  Tom de Vries  <tdevries@suse.de>
+
+       * lib/gdb.exp (unknown): Make test-case unresolved.
+
 2020-06-29  Tom de Vries  <tdevries@suse.de>
 
        PR gdb/25475
index af3e02dac58fc84ac667e889db6d6e9f2dfafcba..b0faf622a9e6426a9cb5d38eee021fd587e3231d 100644 (file)
@@ -5103,6 +5103,8 @@ proc default_gdb_init { test_file_name } {
        rename ::unknown ::dejagnu_unknown
        proc unknown { args } {
            # Use tcl's unknown.
+           set cmd [lindex $args 0]
+           unresolved "testcase aborted due to invalid command name: $cmd"
            return [uplevel 1 ::gdb_tcl_unknown $args]
        }
     }
This page took 0.032686 seconds and 4 git commands to generate.