This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/7] Deliver signal in hardware single step
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Mon, 11 Apr 2016 15:10:01 +0100
- Subject: Re: [PATCH 2/7] Deliver signal in hardware single step
- Authentication-results: sourceware.org; auth=none
- References: <1458749384-19793-1-git-send-email-yao dot qi at linaro dot org> <1458749384-19793-3-git-send-email-yao dot qi at linaro dot org>
On 03/23/2016 04:09 PM, Yao Qi wrote:
> +++ b/gdb/testsuite/gdb.trace/signal.exp
> @@ -166,7 +166,15 @@ while { $loop } {
>
> for { set i 0 } { $i < [expr 20] } { incr i } {
> if {[info exists tracepoint_hits($i)]} {
> - gdb_assert { $tracepoint_hits($i) == $iterations } \
> - "tracepoint $i hit $iterations times"
> +
> + if { $tracepoint_hits($i) == $iterations } {
> + pass "tracepoint $i hit $iterations times"
> + } elseif { $tracepoint_hits($i) > $iterations } {
> + # GDBserver delivers the signal while stepping over tracepoint,
> + # so it is possible that a tracepoint is collected twice.
> + pass "tracepoint $i hit $iterations times: spurious collection"
I think this will make some test runs print, e.g.:
pass "tracepoint 2 hit 4 times: spurious collection"
while others runs print:
pass "tracepoint 2 hit 4 times"
making test result diffing unstable. If so, I think it should
either be written as:
pass "tracepoint $i hit $iterations times (spurious collection)"
making use of the rule that terminating " (...)" bits don't really
count as test message, or always:
pass "tracepoint $i hit $iterations times"
Otherwise LGTM.
Thanks,
Pedro Alves