diff options
Diffstat (limited to 'testsuite/semok')
-rwxr-xr-x | testsuite/semok/four.stp | 23 | ||||
-rwxr-xr-x | testsuite/semok/one.stp | 25 | ||||
-rwxr-xr-x | testsuite/semok/three.stp | 6 | ||||
-rwxr-xr-x | testsuite/semok/two.stp | 13 |
4 files changed, 67 insertions, 0 deletions
diff --git a/testsuite/semok/four.stp b/testsuite/semok/four.stp new file mode 100755 index 00000000..e11b644a --- /dev/null +++ b/testsuite/semok/four.stp @@ -0,0 +1,23 @@ +#! semtest + +# these will ultimately be somehow associated with "providers" +# and have a syntax of their own +global kernel_jiffies, kernel_current_comm; + +function kernel_netlink(a, b) { + # this should be a builtin function + return 0 +} + +function stamp (syscall) +{ + return kernel_netlink (4, kernel_jiffies . " " . kernel_current_comm . " " . syscall) +} + +# probe kernel:syscall:read = kernel:function("sys_read"); + + +probe kernel:syscall:read +{ + stamp ("read"); +} diff --git a/testsuite/semok/one.stp b/testsuite/semok/one.stp new file mode 100755 index 00000000..fb7483e2 --- /dev/null +++ b/testsuite/semok/one.stp @@ -0,0 +1,25 @@ +#! semtest + +# these will ultimately be somehow associated with "providers" +# and have a syntax of their own +global kernel_jiffies, kernel_current_comm; + +function kernel_netlink(a, b) { + # this should be a builtin function + return 0 +} + +function stamp (syscall) +{ + kernel_netlink (4, kernel_jiffies . " " . + kernel_current_comm . " " . syscall); + return 0 +} + +# probe kernel:syscall:read = kernel:function("sys_read"); + + +probe kernel:syscall:read +{ + stamp ("read"); +} diff --git a/testsuite/semok/three.stp b/testsuite/semok/three.stp new file mode 100755 index 00000000..6ae531a2 --- /dev/null +++ b/testsuite/semok/three.stp @@ -0,0 +1,6 @@ +#! semtest + +probe foo { + a << 2; + b[4] << 4; +} diff --git a/testsuite/semok/two.stp b/testsuite/semok/two.stp new file mode 100755 index 00000000..f3c6046e --- /dev/null +++ b/testsuite/semok/two.stp @@ -0,0 +1,13 @@ +#! semtest + +global bar, baz; + +function koo (p) { + baz [p, "p", p] ++; + return p + 2; +} + +probe foo { + bar = 2 + koo (4); + foo = bar + koo; +} |