summaryrefslogtreecommitdiffstats
path: root/testsuite/transok
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/transok')
-rwxr-xr-xtestsuite/transok/eight.stp30
1 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/transok/eight.stp b/testsuite/transok/eight.stp
new file mode 100755
index 00000000..e703a5ae
--- /dev/null
+++ b/testsuite/transok/eight.stp
@@ -0,0 +1,30 @@
+#! stap -p3
+
+global foo
+global baz
+
+function bar()
+{
+ return foo["hello"]
+}
+
+probe begin
+{
+ foo["hello"] = 10
+ foreach (a in foo)
+ {
+ bar()
+ }
+
+ baz[1,"hello",a] = "chicken"
+ baz[1,"goodbye",a] = "supreme"
+
+ foreach ([x,y,z] in baz)
+ {
+ printk(baz[x,y,z] . y)
+ }
+
+ printk("hello from systemtap")
+}
+
+