summaryrefslogtreecommitdiffstats
path: root/testsuite/semok
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/semok')
-rwxr-xr-xtestsuite/semok/badvar.stp4
-rwxr-xr-xtestsuite/semok/cast.stp10
-rwxr-xr-xtestsuite/semok/thirtythree.stp6
-rwxr-xr-xtestsuite/semok/thirtytwo.stp2
-rwxr-xr-xtestsuite/semok/twentynine.stp2
-rwxr-xr-xtestsuite/semok/utrace01.stp4
6 files changed, 24 insertions, 4 deletions
diff --git a/testsuite/semok/badvar.stp b/testsuite/semok/badvar.stp
index b3bd2d67..677187a3 100755
--- a/testsuite/semok/badvar.stp
+++ b/testsuite/semok/badvar.stp
@@ -1,7 +1,9 @@
-#! stap --skip-badvars
+#! /bin/sh
+stap -p2 --skip-badvars -e '
probe syscall.read {
if ($foo == 0)
printf ("Voila! It works..\n")
exit ()
}
+'
diff --git a/testsuite/semok/cast.stp b/testsuite/semok/cast.stp
index 93da18ef..14401886 100755
--- a/testsuite/semok/cast.stp
+++ b/testsuite/semok/cast.stp
@@ -10,4 +10,14 @@ probe begin {
// would be nice to test usermode @cast too,
// but who knows what debuginfo is installed...
+
+ // check modules generated from headers
+ println(@cast(0, "task_struct", "kernel<linux/sched.h>")->tgid)
+ println(@cast(0, "timeval", "<sys/time.h>")->tv_sec)
+
+ // make sure that bogus @casts can get optimized away
+ @cast(0, "task_struct")->no_such_field
+ @cast(0, "task_struct")->parent->no_such_field
+ @cast(0, "no_such_type")->tgid
+ @cast(0, "task_struct", "no_such_module")->tgid
}
diff --git a/testsuite/semok/thirtythree.stp b/testsuite/semok/thirtythree.stp
index 90070370..0f0cacf6 100755
--- a/testsuite/semok/thirtythree.stp
+++ b/testsuite/semok/thirtythree.stp
@@ -1,5 +1,9 @@
#! stap -p2
# Per bz3016, this should get through the semantic pass without warnings.
probe kernel.function("do_mpage_readpage") {
- printf("\n page->mapping %p",$page->mapping)
+ printf("\n page->mapping %p",$page->mapping)
+ %( kernel_v >= "2.6.22" %?
+ printf("\n page->first_page->mapping %p",$page->first_page->mapping)
+ %)
+
}
diff --git a/testsuite/semok/thirtytwo.stp b/testsuite/semok/thirtytwo.stp
index 2a69b8cd..0f0334a1 100755
--- a/testsuite/semok/thirtytwo.stp
+++ b/testsuite/semok/thirtytwo.stp
@@ -2,4 +2,4 @@
# PR 6836
-probe kernel.function("sys_open").return { log($$return . $$parms) }
+probe kernel.function("do_sys_open").return { log($$return . $$parms) }
diff --git a/testsuite/semok/twentynine.stp b/testsuite/semok/twentynine.stp
index 05e591ce..4b2e5056 100755
--- a/testsuite/semok/twentynine.stp
+++ b/testsuite/semok/twentynine.stp
@@ -5,7 +5,7 @@ function dummy:long () {return p;}
# alias with a condition
probe alias0 = begin if (3) {p=1}
# alias with a kernel-variable condition -- not valid
-probe alias1 = kernel.function("sys_read").return if (0) { if ($return) {p=0} }
+probe alias1 = kernel.function("vfs_read").return if (0) { if ($return) {p=0} }
# alias with a function-call condition
probe blias0 = timer.s(1) if (1 /* dummy() */) {p=10}
diff --git a/testsuite/semok/utrace01.stp b/testsuite/semok/utrace01.stp
new file mode 100755
index 00000000..864bdf15
--- /dev/null
+++ b/testsuite/semok/utrace01.stp
@@ -0,0 +1,4 @@
+#! stap -p2
+
+# process path doesn't need to be absolute
+probe process("cat").end { }