ubsan: alpha-vms: shift exponent is too large
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.trace / signal.exp
index 7118a9fea75ca39ada7e8522a69fa0348de13f3b..9fc3ecaf8edbbf0478ecfdfda4f73abec76acf07 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 2016 Free Software Foundation, Inc.
+#   Copyright 2016-2019 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 load_lib "trace-support.exp"
 
+if [target_info exists gdb,nosignals] {
+    verbose "Skipping signal.exp because of nosignals."
+    return -1
+}
+
 standard_testfile
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
-    untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
@@ -63,11 +67,11 @@ if { [istarget "i\[34567\]86-*-linux*"] || [istarget "x86_64-*-linux*"] } {
 # Start with a fresh gdb.
 clean_restart ${testfile}
 if ![runto_main] {
-    fail "Can't run to main"
+    fail "can't run to main"
     return -1
 }
 
-gdb_test "break kill" "Breakpoint $decimal at .*"
+gdb_breakpoint "kill" qualified
 gdb_test "handle SIGABRT nostop noprint pass" ".*" "pass SIGABRT"
 
 # Hit the breakpoint on $syscall for the first time.  In this time,
@@ -120,7 +124,7 @@ gdb_test_multiple $test $test {
 }
 
 delete_breakpoints
-gdb_test "break start" "Breakpoint $decimal at .*"
+gdb_breakpoint "start" qualified
 gdb_continue_to_breakpoint "continue to start"
 
 gdb_assert { 0 == [get_integer_valueof "counter" "1"] } "counter is zero"
@@ -136,7 +140,7 @@ set tpnum [get_integer_valueof "\$bpnum" 0]
 gdb_test "trace *$syscall_insn_next" "Tracepoint $decimal at .*" \
     "tracepoint on instruction following syscall instruction"
 
-gdb_test "break end" "Breakpoint $decimal at .*"
+gdb_breakpoint "end" qualified
 
 gdb_test_no_output "tstart"
 gdb_test "continue" ".*Breakpoint.* end .*at.*$srcfile.*" \
@@ -174,6 +178,14 @@ while { 1 } {
 # Step 3, check the number of collections on each tracepoint.
 
 for { set i $tpnum } { $i < [expr $tpnum + 2] } { incr 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 deliver the signal while stepping over tracepoint,
+       # so it is possible that a tracepoint is collected twice.
+       pass "tracepoint $i hit $iterations times (spurious collection)"
+    } else {
+       fail "tracepoint $i hit $iterations times"
+    }
 }
This page took 0.02493 seconds and 4 git commands to generate.