This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/7] Deliver signal in hardware single step


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]