summaryrefslogtreecommitdiffstats
path: root/testsuite/semok/cast.stp
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-03-11 20:07:07 -0700
committerJosh Stone <jistone@redhat.com>2009-03-11 20:11:11 -0700
commit49462d1bcec68365e3ac96fc5c11c83ab7a8abd6 (patch)
treec5823b2b31881d758da1062f0756be05c950861f /testsuite/semok/cast.stp
parentec80b3969d33e4d54e97ead4286bdb018e2f1f97 (diff)
downloadsystemtap-steved-49462d1bcec68365e3ac96fc5c11c83ab7a8abd6.tar.gz
systemtap-steved-49462d1bcec68365e3ac96fc5c11c83ab7a8abd6.tar.xz
systemtap-steved-49462d1bcec68365e3ac96fc5c11c83ab7a8abd6.zip
Add simple testcases for @cast
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...
+}