diff options
Diffstat (limited to 'testsuite/buildok/twentyone.stp')
-rwxr-xr-x | testsuite/buildok/twentyone.stp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/buildok/twentyone.stp b/testsuite/buildok/twentyone.stp new file mode 100755 index 00000000..052c3a17 --- /dev/null +++ b/testsuite/buildok/twentyone.stp @@ -0,0 +1,27 @@ +#! stap -p4 + +global a + +probe begin { + a[5] = 0 + a[4] = 2 + a[3] = 5 + a[2] = 8 + a[1] = 1 + a[0] = -4 + exit () +} + +probe end { + log ("x+ in a") + foreach (x+ in a) log ("a[" . string(x) . "]=" . string(a[x])) + + log ("x- in a") + foreach (x- in a) log ("a[" . string(x) . "]=" . string(a[x])) + + log ("x in a+") + foreach (x in a+) log ("a[" . string(x) . "]=" . string(a[x])) + + log ("x in a-") + foreach (x in a-) log ("a[" . string(x) . "]=" . string(a[x])) +} |