summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWenji Huang <wenji.huang@oracle.com>2009-01-19 23:44:54 -0500
committerWenji Huang <wenji.huang@oracle.com>2009-01-19 23:44:54 -0500
commitac9a5a0b7a603fcae02541726416b6ccdf41efd9 (patch)
tree4b9441337cccf7dae69cdb70ccd06974ec0d1ef2
parentdece4f8f994c78aca9213cfb8f20e6d979ff738d (diff)
downloadsystemtap-steved-ac9a5a0b7a603fcae02541726416b6ccdf41efd9.tar.gz
systemtap-steved-ac9a5a0b7a603fcae02541726416b6ccdf41efd9.tar.xz
systemtap-steved-ac9a5a0b7a603fcae02541726416b6ccdf41efd9.zip
Add checking utrace in test cases.
-rw-r--r--testsuite/ChangeLog7
-rwxr-xr-xtestsuite/systemtap.base/bz5274.exp8
-rw-r--r--testsuite/systemtap.base/bz6850.exp9
-rw-r--r--testsuite/systemtap.base/static_uprobes.exp9
-rw-r--r--testsuite/systemtap.base/uprobes.exp9
5 files changed, 42 insertions, 0 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index ec5dc08e..915febb4 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-20 Wenji Huang <wenji.huang@oracle.com>
+
+ * systemtap.base/bz5274.exp: Add checking utrace.
+ * systemtap.base/bz6850.exp: Ditto.
+ * systemtap.base/static_uprobes.exp: Ditto.
+ * systemtap.base/uprobes.exp: Ditto.
+
2009-01-13 Stan Cox <scox@redhat.com>
* systemtap.base/static_uprobes.exp: Use sdt.h
diff --git a/testsuite/systemtap.base/bz5274.exp b/testsuite/systemtap.base/bz5274.exp
index 6e95a58b..db0e0a46 100755
--- a/testsuite/systemtap.base/bz5274.exp
+++ b/testsuite/systemtap.base/bz5274.exp
@@ -14,6 +14,14 @@ if {$err == "" && [file exists $test]} then { pass "$test compile"
if {! [installtest_p]} { untested "$test -p5"; return }
+# Try to find utrace_attach symbol in /proc/kallsyms
+# copy from utrace_p5.exp
+set utrace_support_found 0
+set path "/proc/kallsyms"
+if {! [catch {exec grep -q utrace_attach $path} dummy]} {
+ set utrace_support_found 1
+}
+if {$utrace_support_found == 0} { untested "$test -p5"; return }
if {[catch {exec stap $tpath.stp -c "$srcdir/$subdir/$test.sh"} res]} {
untested "$test longjmp to a uretprobed function"
diff --git a/testsuite/systemtap.base/bz6850.exp b/testsuite/systemtap.base/bz6850.exp
index b06b1696..73fedc8a 100644
--- a/testsuite/systemtap.base/bz6850.exp
+++ b/testsuite/systemtap.base/bz6850.exp
@@ -3,6 +3,15 @@ set test bz6850
catch {exec gcc -g -o bz6850 $srcdir/$subdir/bz6850.c} err
if {$err == "" && [file exists bz6850]} then { pass "$test compile" } else { fail "$test compile" }
+# Try to find utrace_attach symbol in /proc/kallsyms
+# copy from utrace_p5.exp
+set utrace_support_found 0
+set path "/proc/kallsyms"
+if {! [catch {exec grep -q utrace_attach $path} dummy]} {
+ set utrace_support_found 1
+}
+if {$utrace_support_found == 0} { untested "$test -p4"; untested "$test -p5"; return }
+
set rc [stap_run_batch $srcdir/$subdir/bz6850.stp]
if {$rc == 0} then { pass "$test -p4" } else { fail "$test -p4" }
diff --git a/testsuite/systemtap.base/static_uprobes.exp b/testsuite/systemtap.base/static_uprobes.exp
index 34bd33a4..4af688dc 100644
--- a/testsuite/systemtap.base/static_uprobes.exp
+++ b/testsuite/systemtap.base/static_uprobes.exp
@@ -76,6 +76,15 @@ probe process(\"static_uprobes.x\").mark(\"label3\")
"
close $fp
+# Try to find utrace_attach symbol in /proc/kallsyms
+# copy from utrace_p5.exp
+set utrace_support_found 0
+set path "/proc/kallsyms"
+if {! [catch {exec grep -q utrace_attach $path} dummy]} {
+ set utrace_support_found 1
+}
+if {$utrace_support_found == 0} { untested "$test"; return }
+
set ok 0
verbose -log "spawn stap -c $sup_exepath [pwd]/static_uprobes.stp"
spawn stap -c $sup_exepath [pwd]/static_uprobes.stp
diff --git a/testsuite/systemtap.base/uprobes.exp b/testsuite/systemtap.base/uprobes.exp
index 408ba8c4..e8318586 100644
--- a/testsuite/systemtap.base/uprobes.exp
+++ b/testsuite/systemtap.base/uprobes.exp
@@ -18,6 +18,15 @@ if [file exists $path] then { pass "$test prep" } else { fail "$test prep" }
catch {exec gcc -g -o jennie jennie.c} err
if {$err == "" && [file exists jennie]} then { pass "$test compile" } else { fail "$test compile" }
+# Try to find utrace_attach symbol in /proc/kallsyms
+# copy from utrace_p5.exp
+set utrace_support_found 0
+set path "/proc/kallsyms"
+if {! [catch {exec grep -q utrace_attach $path} dummy]} {
+ set utrace_support_found 1
+}
+if {$utrace_support_found == 0} { untested "$test -p4"; untested "$test -p5"; return }
+
set rc [stap_run_batch $srcdir/$subdir/uprobes.stp]
if {$rc == 0} then { pass "$test -p4" } else { fail "$test -p4" }