summaryrefslogtreecommitdiffstats
path: root/testsuite/semko
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/semko')
-rwxr-xr-xtestsuite/semko/four.stp12
-rwxr-xr-xtestsuite/semko/one.stp8
-rwxr-xr-xtestsuite/semko/three.stp6
-rwxr-xr-xtestsuite/semko/two.stp8
4 files changed, 34 insertions, 0 deletions
diff --git a/testsuite/semko/four.stp b/testsuite/semko/four.stp
new file mode 100755
index 00000000..e73cc88d
--- /dev/null
+++ b/testsuite/semko/four.stp
@@ -0,0 +1,12 @@
+#! semtest
+
+global a, b; # types unknown
+
+function bar ()
+{
+ # no return statement
+}
+
+probe foo {
+ a = b;
+}
diff --git a/testsuite/semko/one.stp b/testsuite/semko/one.stp
new file mode 100755
index 00000000..994bb451
--- /dev/null
+++ b/testsuite/semko/one.stp
@@ -0,0 +1,8 @@
+#! semtest
+
+function stamp (syscall)
+{
+ # no return expression => unknown function type
+}
+
+probe kernel:syscall:read { stamp ("read"); }
diff --git a/testsuite/semko/three.stp b/testsuite/semko/three.stp
new file mode 100755
index 00000000..bfdeec66
--- /dev/null
+++ b/testsuite/semko/three.stp
@@ -0,0 +1,6 @@
+#! semtest
+
+probe foo {
+ a << 2;
+ b[a] = 4; # must not index with stats variable
+}
diff --git a/testsuite/semko/two.stp b/testsuite/semko/two.stp
new file mode 100755
index 00000000..39b77f6a
--- /dev/null
+++ b/testsuite/semko/two.stp
@@ -0,0 +1,8 @@
+#! semtest
+
+function zoo (p) { p << 5; return 0 } # passing stats as function arg
+
+probe foo {
+ bar = 2 + "string"; # mixing integer+string arithmetic
+ zoo (car)
+}