* [PATCH][gdb/testsuite] Emit unresolved for unknown proc
@ 2020-06-29 11:21 Tom de Vries
2020-06-29 11:54 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Tom de Vries @ 2020-06-29 11:21 UTC (permalink / raw)
To: gdb-patches; +Cc: Pedro Alves
Hi,
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.
Any comments?
Thanks,
- Tom
[gdb/testsuite] Emit unresolved for unknown proc
gdb/testsuite/ChangeLog:
2020-06-29 Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (unknown): Make test-case unresolved.
---
gdb/testsuite/lib/gdb.exp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index af3e02dac5..b0faf622a9 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -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]
}
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH][gdb/testsuite] Emit unresolved for unknown proc
2020-06-29 11:21 [PATCH][gdb/testsuite] Emit unresolved for unknown proc Tom de Vries
@ 2020-06-29 11:54 ` Pedro Alves
2020-06-29 11:58 ` Tom de Vries
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2020-06-29 11:54 UTC (permalink / raw)
To: Tom de Vries, gdb-patches
On 6/29/20 12:21 PM, Tom de Vries wrote:
> Hi,
>
> 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.
>
> Any comments?
LGTM.
Sounds like we'll end up with two UNRESOLVEDs for this when Jacob's
changes land in DejaGnu, right? Do you plan on making this
dependent on dejagnu version, or leave the two UNRESOLVEDs anyway?
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][gdb/testsuite] Emit unresolved for unknown proc
2020-06-29 11:54 ` Pedro Alves
@ 2020-06-29 11:58 ` Tom de Vries
0 siblings, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2020-06-29 11:58 UTC (permalink / raw)
To: Pedro Alves, gdb-patches
On 6/29/20 1:54 PM, Pedro Alves wrote:
> On 6/29/20 12:21 PM, Tom de Vries wrote:
>> Hi,
>>
>> 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.
>>
>> Any comments?
>
> LGTM.
>
> Sounds like we'll end up with two UNRESOLVEDs for this when Jacob's
> changes land in DejaGnu, right? Do you plan on making this
> dependent on dejagnu version, or leave the two UNRESOLVEDs anyway?
I'm waiting for things to land in dejagnu master, and then plan to
update gdb accordingly, which hopefully will result in one UNRESOLVED.
Thanks,
- Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-29 11:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 11:21 [PATCH][gdb/testsuite] Emit unresolved for unknown proc Tom de Vries
2020-06-29 11:54 ` Pedro Alves
2020-06-29 11:58 ` Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox