diff options
author | fche <fche> | 2005-03-15 22:38:27 +0000 |
---|---|---|
committer | fche <fche> | 2005-03-15 22:38:27 +0000 |
commit | 9c0c0e4652824a0bf8f4da2175278b129fac6809 (patch) | |
tree | c560854f3933fa4cfcf397c9fd040da913bd98bb /testsuite | |
parent | 204b456c7c08bc40ffe1f21575461d92a544e92b (diff) | |
download | systemtap-steved-9c0c0e4652824a0bf8f4da2175278b129fac6809.tar.gz systemtap-steved-9c0c0e4652824a0bf8f4da2175278b129fac6809.tar.xz systemtap-steved-9c0c0e4652824a0bf8f4da2175278b129fac6809.zip |
2005-03-15 Frank Ch. Eigler <fche@redhat.com>
* TODO: New file. Include some probe-point-provider syntax examples.
* parse.cxx (lexer::scan, parser::parse_literal): Support hex, octal
numbers via strtol.
(parse_probe, parse_probe_point): Modify for dotted syntax.
* staptree.cxx: Ditto.
* parsetest.cxx, semtest.cxx: Print parse/sem results even if
.stp files were given on command line.
* parse.h, staptree.h: Rename probe_point_spec -> probe_point.
* runtest.sh: New test-runner front-end script.
* Makefile.am: Use it for TESTS_ENVIRONMENT.
* testsuite/*: Update probe point syntax. Add a bunch of new tests.
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/parseko/five.stp | 16 | ||||
-rwxr-xr-x | testsuite/parseko/six.stp | 8 | ||||
-rwxr-xr-x | testsuite/parseok/five.stp | 19 | ||||
-rwxr-xr-x | testsuite/parseok/four.stp | 7 | ||||
-rwxr-xr-x | testsuite/parseok/six.stp | 8 | ||||
-rwxr-xr-x | testsuite/parseok/three.stp | 2 | ||||
-rwxr-xr-x | testsuite/parseok/two.stp | 4 | ||||
-rwxr-xr-x | testsuite/semko/one.stp | 2 | ||||
-rwxr-xr-x | testsuite/semok/four.stp | 2 | ||||
-rwxr-xr-x | testsuite/semok/one.stp | 2 |
10 files changed, 64 insertions, 6 deletions
diff --git a/testsuite/parseko/five.stp b/testsuite/parseko/five.stp new file mode 100755 index 00000000..1673a1e6 --- /dev/null +++ b/testsuite/parseko/five.stp @@ -0,0 +1,16 @@ +#! semtest + +probe foo( { +} + +probe bar() { +} + +probe baz.(1) { +} + +probe faz(2), { +} + +probe kaz,goo. { +} diff --git a/testsuite/parseko/six.stp b/testsuite/parseko/six.stp new file mode 100755 index 00000000..2e8c8dbe --- /dev/null +++ b/testsuite/parseko/six.stp @@ -0,0 +1,8 @@ +#! semtest + +probe foo { + a = -9999999999999999999999999; + b = 0xzoopoo; + c = 00011122233344455566677788; + d = 07777777777777777777777777; +} diff --git a/testsuite/parseok/five.stp b/testsuite/parseok/five.stp new file mode 100755 index 00000000..a475807e --- /dev/null +++ b/testsuite/parseok/five.stp @@ -0,0 +1,19 @@ +#! parsetest + +probe lkst("process_contextswitch") {} +probe syscall("name").return {} +probe syscall("*") {} +probe kernel.function("wait_for_godot") {} +probe kernel.function("name").line(10) {} +probe kernel.source("mempool.c").line(5004) {} +probe kernel.address(0xdeadbeef) {} +probe kernel.module("driver.ko").function("name").return {} +probe kernel.module("cpqarray.ko").jumptable("ida_fops") {} +probe kernel.watch("datasymbol").write {} +probe user("fche").inode("/bin/vi").function("refresh") {} +probe user.inode("/lib/libc.so.6").function("malloc").return {} +probe time.real.hz(500) {} +probe time.virtual.jiffies(100) {} +probe perfcounter("tlbmiss").count(4000) {} +probe resource.freemembelow(50) {} # pages? +probe begin {} diff --git a/testsuite/parseok/four.stp b/testsuite/parseok/four.stp new file mode 100755 index 00000000..d381b242 --- /dev/null +++ b/testsuite/parseok/four.stp @@ -0,0 +1,7 @@ +#! parsetest + +probe syscall ("foo").foo.bar , syscall ("bar"), syscall ("*").return +{ + $a = a$a = a$a$ = 0; +} + diff --git a/testsuite/parseok/six.stp b/testsuite/parseok/six.stp new file mode 100755 index 00000000..6fb9b764 --- /dev/null +++ b/testsuite/parseok/six.stp @@ -0,0 +1,8 @@ +#! parsetest + +probe one +{ + a = 1+01+0x1-1-01-0x1; + b = 2147483647; + c = -2147483647-1; +} diff --git a/testsuite/parseok/three.stp b/testsuite/parseok/three.stp index b2628d4d..d2401877 100755 --- a/testsuite/parseok/three.stp +++ b/testsuite/parseok/three.stp @@ -1,6 +1,6 @@ #! parsetest -probe kernel:systemcall("foo") +probe syscall ("foo") { $a = a$a = a$a$ = 0; } diff --git a/testsuite/parseok/two.stp b/testsuite/parseok/two.stp index 6ab3823e..b6b843de 100755 --- a/testsuite/parseok/two.stp +++ b/testsuite/parseok/two.stp @@ -1,6 +1,6 @@ #! parsetest -probe kernel:systemcall("foo") +probe syscall (231) { array[idx] << value; if (global > 5) { global -- } else ; @@ -11,7 +11,7 @@ function foo () { return 0; } -probe systemtap:end +probe end { foo ("value", 4+8); } diff --git a/testsuite/semko/one.stp b/testsuite/semko/one.stp index 994bb451..7519dfc6 100755 --- a/testsuite/semko/one.stp +++ b/testsuite/semko/one.stp @@ -5,4 +5,4 @@ function stamp (syscall) # no return expression => unknown function type } -probe kernel:syscall:read { stamp ("read"); } +probe syscall (read) { stamp ("read"); } diff --git a/testsuite/semok/four.stp b/testsuite/semok/four.stp index e11b644a..c3b2a7d0 100755 --- a/testsuite/semok/four.stp +++ b/testsuite/semok/four.stp @@ -17,7 +17,7 @@ function stamp (syscall) # probe kernel:syscall:read = kernel:function("sys_read"); -probe kernel:syscall:read +probe syscall ("read") { stamp ("read"); } diff --git a/testsuite/semok/one.stp b/testsuite/semok/one.stp index fb7483e2..336e57d2 100755 --- a/testsuite/semok/one.stp +++ b/testsuite/semok/one.stp @@ -19,7 +19,7 @@ function stamp (syscall) # probe kernel:syscall:read = kernel:function("sys_read"); -probe kernel:syscall:read +probe syscall ("read") { stamp ("read"); } |