summaryrefslogtreecommitdiffstats
path: root/testsuite/semok/cast.stp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/semok/cast.stp')
-rwxr-xr-xtestsuite/semok/cast.stp13
1 files changed, 13 insertions, 0 deletions
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...
+}