summaryrefslogtreecommitdiffstats
path: root/testsuite/semko
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-01-24 23:48:06 -0500
committerFrank Ch. Eigler <fche@elastic.org>2008-01-24 23:48:06 -0500
commita1732c4f7856621604a1cc45a29af618aaa502e0 (patch)
tree29e3f9c4405e1fd1f81b8c87ac2e485855541a66 /testsuite/semko
parent7ee3e80ec0b7880c33d0ca3018025855d9dd5123 (diff)
parent674427d3a018d0f89c9669db8dcf952aab8b4423 (diff)
downloadsystemtap-steved-a1732c4f7856621604a1cc45a29af618aaa502e0.tar.gz
systemtap-steved-a1732c4f7856621604a1cc45a29af618aaa502e0.tar.xz
systemtap-steved-a1732c4f7856621604a1cc45a29af618aaa502e0.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite/semko')
-rwxr-xr-xtestsuite/semko/forty.stp4
-rwxr-xr-xtestsuite/semko/fortyone.stp3
-rwxr-xr-xtestsuite/semko/fortytwo.stp10
3 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/semko/forty.stp b/testsuite/semko/forty.stp
new file mode 100755
index 00000000..f7721a47
--- /dev/null
+++ b/testsuite/semko/forty.stp
@@ -0,0 +1,4 @@
+#! stap -p2
+
+global x
+probe kernel.function("sys_open") if (x = 1) { } # bad side-effect
diff --git a/testsuite/semko/fortyone.stp b/testsuite/semko/fortyone.stp
new file mode 100755
index 00000000..e9b986df
--- /dev/null
+++ b/testsuite/semko/fortyone.stp
@@ -0,0 +1,3 @@
+#! stap -p2
+
+probe kernel.function("sys_open") if (x > 1) { } # not a global
diff --git a/testsuite/semko/fortytwo.stp b/testsuite/semko/fortytwo.stp
new file mode 100755
index 00000000..17dacb1c
--- /dev/null
+++ b/testsuite/semko/fortytwo.stp
@@ -0,0 +1,10 @@
+#! stap -p2
+
+probe kernel.function("sys_open") if (foo(2)) { } # must not call functions
+
+function foo(x) { return x }
+
+# NB: If this condition is relaxed, then this will have to be blocked:
+# global y function foo () { return y++ } # since global y is written-to
+# but this one would be fine:
+# function foo () { return y++ } # since y is written-to