summaryrefslogtreecommitdiffstats
path: root/testsuite/semok
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/semok')
-rwxr-xr-xtestsuite/semok/badvar.stp7
-rwxr-xr-xtestsuite/semok/cast.stp13
2 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/semok/badvar.stp b/testsuite/semok/badvar.stp
new file mode 100755
index 00000000..b3bd2d67
--- /dev/null
+++ b/testsuite/semok/badvar.stp
@@ -0,0 +1,7 @@
+#! stap --skip-badvars
+
+probe syscall.read {
+ if ($foo == 0)
+ printf ("Voila! It works..\n")
+ exit ()
+}
diff --git a/testsuite/semok/cast.stp b/testsuite/semok/cast.stp
new file mode 100755
index 00000000..93da18ef
--- /dev/null
+++ b/testsuite/semok/cast.stp
@@ -0,0 +1,13 @@
+#! stap -p2
+
+probe begin {
+ // basic @cast test, with and without specifying kernel
+ println(@cast(0, "task_struct")->tgid)
+ println(@cast(0, "task_struct", "kernel")->tgid)
+
+ // check module-search paths
+ println(@cast(0, "task_struct", "foo:kernel:bar")->tgid)
+
+ // would be nice to test usermode @cast too,
+ // but who knows what debuginfo is installed...
+}