aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2012-05-23 18:21:34 +0000
committerKeith Seitz <keiths@redhat.com>2012-05-23 18:21:34 +0000
commit11eb1b4dcc4f45cfdfb3bd8df61e969123293c59 (patch)
tree77fd3bf753ccdde5a54a9397dd1b6353ccc2ae99 /gdb
parenta79378d4510226bd2df9e6eb776c125bdb875755 (diff)
downloadgdb-11eb1b4dcc4f45cfdfb3bd8df61e969123293c59.zip
gdb-11eb1b4dcc4f45cfdfb3bd8df61e969123293c59.tar.gz
gdb-11eb1b4dcc4f45cfdfb3bd8df61e969123293c59.tar.bz2
* gdb.trace/stap-trace.exp: If compile_stap_bin fails,
return -1 to suppress the rest of the tests. (compile_stap_bin): Return boolean success value.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.trace/stap-trace.exp15
2 files changed, 18 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 21809b8..3f76a1b 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-23 Keith Seitz <keiths@redhat.com>
+
+ * gdb.trace/stap-trace.exp: If compile_stap_bin fails,
+ return -1 to suppress the rest of the tests.
+ (compile_stap_bin): Return boolean success value.
+
2012-05-21 Tom Tromey <tromey@redhat.com>
* gdb.cp/inherit.exp (test_print_mi_members): Expect errors.
diff --git a/gdb/testsuite/gdb.trace/stap-trace.exp b/gdb/testsuite/gdb.trace/stap-trace.exp
index 562eec4..abc5af4 100644
--- a/gdb/testsuite/gdb.trace/stap-trace.exp
+++ b/gdb/testsuite/gdb.trace/stap-trace.exp
@@ -46,8 +46,10 @@ proc compile_stap_bin {exec_name {arg ""}} {
"$binfile_dir/$exec_name" \
executable [concat $arg debug nowarnings]] != "" } {
untested "Could not compile ${srcfile}"
- return -1
+ return 0
}
+
+ return 1
}
proc prepare_for_trace_test {} {
@@ -105,7 +107,10 @@ proc gdb_collect_probe_arg { msg probe val_arg0 } {
"collect $msg: collected probe arg0"
}
-compile_stap_bin "stap-probe-nosem"
+if {![compile_stap_bin "stap-probe-nosem"]} {
+ # An appropriate failure message has already been output
+ return -1
+}
clean_restart $executable
if { ![runto_main] } {
@@ -121,7 +126,11 @@ if { ![gdb_target_supports_trace] } {
gdb_collect_probe_arg "probe args without semaphore" "-probe-stap user" "23"
gdb_exit
-compile_stap_bin "stap-probe-sem" "-DUSE_PROBES"
+if {![compile_stap_bin "stap-probe-sem" "-DUSE_PROBES"]} {
+ # An appropriate failure message has already been output
+ return -1
+}
+
gdb_collect_probe_arg "probe args with semaphore" "-probe-stap two" "46"
# Finished!