summaryrefslogtreecommitdiffstats
path: root/testsuite/lib/systemtap.exp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/lib/systemtap.exp')
-rw-r--r--testsuite/lib/systemtap.exp23
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp
index 76fd57bd..82afb6b7 100644
--- a/testsuite/lib/systemtap.exp
+++ b/testsuite/lib/systemtap.exp
@@ -26,6 +26,29 @@ proc utrace_p {} {
}
+proc uprobes_p {} {
+ global env
+ if {! [utrace_p]} {
+ return 0
+ }
+ set uprobes $env(SYSTEMTAP_RUNTIME)/uprobes
+ set res [catch "exec make -q -C $uprobes uprobes.ko" output]
+ if {$res != 0} {
+ if {! [installtest_p]} {
+ # build as user in the source tree
+ verbose -log "exec make -C $uprobes"
+ set res [catch "exec make -C $uprobes" output]
+ verbose -log "OUT $output"
+ verbose -log "RC $res"
+ } else {
+ # build as root in the installed location
+ set res [as_root "make -C $uprobes"]
+ }
+ }
+ if {$res == 0} { return 1 } else { return 0 }
+}
+
+
proc print_systemtap_version {} {
set version [exec /bin/uname -r]
set location "/boot/vmlinux-$version"