diff options
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/parseok/semko.stp | 6 | ||||
-rwxr-xr-x | testsuite/semko/eight.stp | 2 | ||||
-rwxr-xr-x | testsuite/semko/four.stp | 2 | ||||
-rwxr-xr-x | testsuite/semko/three.stp | 3 | ||||
-rwxr-xr-x | testsuite/semko/two.stp | 2 | ||||
-rwxr-xr-x | testsuite/transok/four.stp | 13 |
6 files changed, 24 insertions, 4 deletions
diff --git a/testsuite/parseok/semko.stp b/testsuite/parseok/semko.stp new file mode 100755 index 00000000..11f2a2da --- /dev/null +++ b/testsuite/parseok/semko.stp @@ -0,0 +1,6 @@ +#! /bin/sh + +# make sure that we can *parse* all semko test files, to ensure +# that it is semantic (elaboration) checks that fail, not parse errors + +./stap -p1 -I${SRCDIR}/testsuite/semko -e 'global nothing' diff --git a/testsuite/semko/eight.stp b/testsuite/semko/eight.stp index 7d297295..d95e225f 100755 --- a/testsuite/semko/eight.stp +++ b/testsuite/semko/eight.stp @@ -1,5 +1,5 @@ #! stap -p2 probe foo { - stats << "string" # stats only collect numbers + stats <<< "string" # stats only collect numbers } diff --git a/testsuite/semko/four.stp b/testsuite/semko/four.stp index fd2b3928..21e2be20 100755 --- a/testsuite/semko/four.stp +++ b/testsuite/semko/four.stp @@ -1,6 +1,6 @@ #! stap -p2 -global a, b; # types unknown +global a, b # types unknown function bar () { diff --git a/testsuite/semko/three.stp b/testsuite/semko/three.stp index 423dbcdf..7a64a93c 100755 --- a/testsuite/semko/three.stp +++ b/testsuite/semko/three.stp @@ -1,6 +1,7 @@ #! stap -p2 +global b probe foo { - a << 2; + a <<< 2; b[a] = 4; # must not index with stats variable } diff --git a/testsuite/semko/two.stp b/testsuite/semko/two.stp index acf0a973..5906687c 100755 --- a/testsuite/semko/two.stp +++ b/testsuite/semko/two.stp @@ -1,6 +1,6 @@ #! stap -p2 -function zoo (p) { p << 5; return 0 } # passing stats as function arg +function zoo (p) { p <<< 5; return 0 } # passing stats as function arg probe foo { bar = 2 + "string"; # mixing integer+string arithmetic diff --git a/testsuite/transok/four.stp b/testsuite/transok/four.stp new file mode 100755 index 00000000..daad4f5d --- /dev/null +++ b/testsuite/transok/four.stp @@ -0,0 +1,13 @@ +#! stap + +function f () { + return 0 +} + +probe end { + a = 0 as = "" + b = a * (b + c) - d bs = as . "bs" . as + c = (a > b) ? (a == b) : (a != b) cs = (as > bs) ? (as == bs) : (as != bs) + d = (a > b) + (a >= b) + (a < b) + (a <= b) + if (a) b else c if (cs) 0 else 1 +} |