summaryrefslogtreecommitdiffstats
path: root/testsuite/buildok
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/buildok')
-rwxr-xr-xtestsuite/buildok/sixteen.stp21
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/buildok/sixteen.stp b/testsuite/buildok/sixteen.stp
new file mode 100755
index 00000000..26932b8e
--- /dev/null
+++ b/testsuite/buildok/sixteen.stp
@@ -0,0 +1,21 @@
+#! stap -p4
+
+global a
+
+function foo () {
+ if (a[k] == "sayonara") { return 2 }
+}
+
+
+probe begin {
+ a[1] = "hello"
+ a[2] = "goodbye"
+ foreach (k in a) {
+ log (a[k])
+ for (i=0; i<10; i++) {
+ log ("k=" . string(k) . " i=" . string(i))
+ if (k % (i+1)) break else continue
+ }
+ if (k % 3) { foo() ; next }
+ }
+}