diff options
author | dsmith <dsmith> | 2006-05-24 15:09:42 +0000 |
---|---|---|
committer | dsmith <dsmith> | 2006-05-24 15:09:42 +0000 |
commit | 357134252c66425e159c9eff011e35a70faf3e11 (patch) | |
tree | 2524a332d361acd3b2dec6cd071984a543b4ce02 | |
parent | e5c899dc4a42a8b84f42f3e6dd5a8bb3ec14a1d0 (diff) | |
download | systemtap-steved-357134252c66425e159c9eff011e35a70faf3e11.tar.gz systemtap-steved-357134252c66425e159c9eff011e35a70faf3e11.tar.xz systemtap-steved-357134252c66425e159c9eff011e35a70faf3e11.zip |
2006-05-24 David Smith <dsmith@redhat.com>
* testsuite/parseko/cmdlinearg01.stp: New file.
* testsuite/parseko/cmdlinearg02.stp: New file.
* testsuite/parseko/eighteen.stp: New file.
* testsuite/parseko/foreachstmt01.stp: New file.
* testsuite/parseko/foreachstmt02.stp: New file.
* testsuite/parseko/foreachstmt03.stp: New file.
* testsuite/parseko/foreachstmt04.stp: New file.
* testsuite/parseko/foreachstmt05.stp: New file.
* testsuite/parseko/forstmt01.stp: New file.
* testsuite/parseko/forstmt02.stp: New file.
* testsuite/parseko/forstmt03.stp: New file.
* testsuite/parseko/forstmt04.stp: New file.
* testsuite/parseko/functiondecl01.stp: New file.
* testsuite/parseko/functiondecl02.stp: New file.
* testsuite/parseko/functiondecl03.stp: New file.
* testsuite/parseko/functiondecl04.stp: New file.
* testsuite/parseko/functiondecl05.stp: New file.
* testsuite/parseko/functiondecl06.stp: New file.
* testsuite/parseko/functiondecl07.stp: New file.
* testsuite/parseko/ifstmt01.stp: New file.
* testsuite/parseko/ifstmt02.stp: New file.
* testsuite/parseko/nineteen.stp: New file.
* testsuite/parseko/preprocess01.stp: New file.
* testsuite/parseko/preprocess02.stp: New file.
* testsuite/parseko/preprocess03.stp: New file.
* testsuite/parseko/preprocess04.stp: New file.
* testsuite/parseko/preprocess05.stp: New file.
* testsuite/parseko/preprocess06.stp: New file.
* testsuite/parseko/preprocess07.stp: New file.
* testsuite/parseko/preprocess08.stp: New file.
* testsuite/parseko/preprocess09.stp: New file.
* testsuite/parseko/probepoint01.stp: New file.
* testsuite/parseko/probepoint02.stp: New file.
* testsuite/parseko/probepoint03.stp: New file.
* testsuite/parseko/seventeen.stp: New file.
* testsuite/parseko/ternarystmt01.stp: New file.
* testsuite/parseko/twenty.stp: New file.
* testsuite/parseko/twentyone.stp: New file.
* testsuite/parseko/whilestmt01.stp: New file.
* testsuite/parseko/whilestmt02.stp: New file.
41 files changed, 334 insertions, 0 deletions
@@ -1,3 +1,46 @@ +2006-05-24 David Smith <dsmith@redhat.com> + + * testsuite/parseko/cmdlinearg01.stp: New file. + * testsuite/parseko/cmdlinearg02.stp: New file. + * testsuite/parseko/eighteen.stp: New file. + * testsuite/parseko/foreachstmt01.stp: New file. + * testsuite/parseko/foreachstmt02.stp: New file. + * testsuite/parseko/foreachstmt03.stp: New file. + * testsuite/parseko/foreachstmt04.stp: New file. + * testsuite/parseko/foreachstmt05.stp: New file. + * testsuite/parseko/forstmt01.stp: New file. + * testsuite/parseko/forstmt02.stp: New file. + * testsuite/parseko/forstmt03.stp: New file. + * testsuite/parseko/forstmt04.stp: New file. + * testsuite/parseko/functiondecl01.stp: New file. + * testsuite/parseko/functiondecl02.stp: New file. + * testsuite/parseko/functiondecl03.stp: New file. + * testsuite/parseko/functiondecl04.stp: New file. + * testsuite/parseko/functiondecl05.stp: New file. + * testsuite/parseko/functiondecl06.stp: New file. + * testsuite/parseko/functiondecl07.stp: New file. + * testsuite/parseko/ifstmt01.stp: New file. + * testsuite/parseko/ifstmt02.stp: New file. + * testsuite/parseko/nineteen.stp: New file. + * testsuite/parseko/preprocess01.stp: New file. + * testsuite/parseko/preprocess02.stp: New file. + * testsuite/parseko/preprocess03.stp: New file. + * testsuite/parseko/preprocess04.stp: New file. + * testsuite/parseko/preprocess05.stp: New file. + * testsuite/parseko/preprocess06.stp: New file. + * testsuite/parseko/preprocess07.stp: New file. + * testsuite/parseko/preprocess08.stp: New file. + * testsuite/parseko/preprocess09.stp: New file. + * testsuite/parseko/probepoint01.stp: New file. + * testsuite/parseko/probepoint02.stp: New file. + * testsuite/parseko/probepoint03.stp: New file. + * testsuite/parseko/seventeen.stp: New file. + * testsuite/parseko/ternarystmt01.stp: New file. + * testsuite/parseko/twenty.stp: New file. + * testsuite/parseko/twentyone.stp: New file. + * testsuite/parseko/whilestmt01.stp: New file. + * testsuite/parseko/whilestmt02.stp: New file. + 2006-05-24 Li Guanglei <guanglei@cn.ibm.com> * configure.ac: add lket.5 & runtime/lket/b2a diff --git a/testsuite/parseko/cmdlinearg01.stp b/testsuite/parseko/cmdlinearg01.stp new file mode 100755 index 00000000..da4f4545 --- /dev/null +++ b/testsuite/parseko/cmdlinearg01.stp @@ -0,0 +1,6 @@ +#! stap -p1 + +# bad command line argument number - must start at 1 +probe begin { + arg = $0 +} diff --git a/testsuite/parseko/cmdlinearg02.stp b/testsuite/parseko/cmdlinearg02.stp new file mode 100755 index 00000000..072a7294 --- /dev/null +++ b/testsuite/parseko/cmdlinearg02.stp @@ -0,0 +1,6 @@ +#! stap -p1 + +# bad command line argument number - bad number +probe begin { + arg = $12A3 +} diff --git a/testsuite/parseko/eighteen.stp b/testsuite/parseko/eighteen.stp new file mode 100755 index 00000000..83780cfd --- /dev/null +++ b/testsuite/parseko/eighteen.stp @@ -0,0 +1,4 @@ +#! stap -p1 + +# bad global +global 123 diff --git a/testsuite/parseko/foreachstmt01.stp b/testsuite/parseko/foreachstmt01.stp new file mode 100755 index 00000000..fbbb8d85 --- /dev/null +++ b/testsuite/parseko/foreachstmt01.stp @@ -0,0 +1,12 @@ +#! stap -p1 + +# missing parens after foreach keyword + +global array + +function decl() +{ + array[0] = 1 + foreach key in array + printf("key %d, value %d\n", key, array[key]) +} diff --git a/testsuite/parseko/foreachstmt02.stp b/testsuite/parseko/foreachstmt02.stp new file mode 100755 index 00000000..b3154f35 --- /dev/null +++ b/testsuite/parseko/foreachstmt02.stp @@ -0,0 +1,12 @@ +#! stap -p1 + +# no identifier after opening paren after foreach keyword + +global array + +function decl() +{ + array[0] = 1 + foreach (* in array) + printf("key %d, value %d\n", key, array[key]) +} diff --git a/testsuite/parseko/foreachstmt03.stp b/testsuite/parseko/foreachstmt03.stp new file mode 100755 index 00000000..05be6991 --- /dev/null +++ b/testsuite/parseko/foreachstmt03.stp @@ -0,0 +1,12 @@ +#! stap -p1 + +# missing closing bracket after opening paren after foreach keyword + +global array + +function decl() +{ + array[0] = 1 + foreach ([key in array) + printf("key %d, value %d\n", key, array[key]) +} diff --git a/testsuite/parseko/foreachstmt04.stp b/testsuite/parseko/foreachstmt04.stp new file mode 100755 index 00000000..65545d64 --- /dev/null +++ b/testsuite/parseko/foreachstmt04.stp @@ -0,0 +1,12 @@ +#! stap -p1 + +# multiple sort directives in foreach statement + +global array + +function decl() +{ + array[0] = 1 + foreach (key- in array-) + printf("key %d, value %d\n", key, array[key]) +} diff --git a/testsuite/parseko/foreachstmt05.stp b/testsuite/parseko/foreachstmt05.stp new file mode 100755 index 00000000..a499b1f6 --- /dev/null +++ b/testsuite/parseko/foreachstmt05.stp @@ -0,0 +1,12 @@ +#! stap -p1 + +# missing closing paren after foreach keyword + +global array + +function decl() +{ + array[0] = 1 + foreach (key in array + printf("key %d, value %d\n", key, array[key]) +} diff --git a/testsuite/parseko/forstmt01.stp b/testsuite/parseko/forstmt01.stp new file mode 100755 index 00000000..73ff1671 --- /dev/null +++ b/testsuite/parseko/forstmt01.stp @@ -0,0 +1,9 @@ +#! stap -p1 + +# no '(' following 'for' + +function decl() +{ + for i = 0; i < 10; i++ + j = i +} diff --git a/testsuite/parseko/forstmt02.stp b/testsuite/parseko/forstmt02.stp new file mode 100755 index 00000000..e560a654 --- /dev/null +++ b/testsuite/parseko/forstmt02.stp @@ -0,0 +1,9 @@ +#! stap -p1 + +# no ';' following for initialization + +function decl() +{ + for (i = 0) + j = i +} diff --git a/testsuite/parseko/forstmt03.stp b/testsuite/parseko/forstmt03.stp new file mode 100755 index 00000000..8267799b --- /dev/null +++ b/testsuite/parseko/forstmt03.stp @@ -0,0 +1,9 @@ +#! stap -p1 + +# no ';' following for condition + +function decl() +{ + for (i = 0; i < 5) + j = i +} diff --git a/testsuite/parseko/forstmt04.stp b/testsuite/parseko/forstmt04.stp new file mode 100755 index 00000000..f1786633 --- /dev/null +++ b/testsuite/parseko/forstmt04.stp @@ -0,0 +1,9 @@ +#! stap -p1 + +# 'for' missing closing ')' + +function decl() +{ + for (i = 0; i < 5; i++ + j = i +} diff --git a/testsuite/parseko/functiondecl01.stp b/testsuite/parseko/functiondecl01.stp new file mode 100755 index 00000000..f7bfb0a6 --- /dev/null +++ b/testsuite/parseko/functiondecl01.stp @@ -0,0 +1,7 @@ +#! stap -p1 + +# bad function declaration +function 123 (arg1, arg2) +{ + return arg1 + arg2 +} diff --git a/testsuite/parseko/functiondecl02.stp b/testsuite/parseko/functiondecl02.stp new file mode 100755 index 00000000..b8b786c5 --- /dev/null +++ b/testsuite/parseko/functiondecl02.stp @@ -0,0 +1,7 @@ +#! stap -p1 + +# bad function declaration +function function (arg1, arg2) +{ + return arg1 + arg2 +} diff --git a/testsuite/parseko/functiondecl03.stp b/testsuite/parseko/functiondecl03.stp new file mode 100755 index 00000000..732f9e55 --- /dev/null +++ b/testsuite/parseko/functiondecl03.stp @@ -0,0 +1,8 @@ +#! stap -p1 + +# bad function declaration - only "string" or "long" are valid +# function return types +function decl:foo (arg1, arg2) +{ + return arg1 + arg2 +} diff --git a/testsuite/parseko/functiondecl04.stp b/testsuite/parseko/functiondecl04.stp new file mode 100755 index 00000000..39534bc4 --- /dev/null +++ b/testsuite/parseko/functiondecl04.stp @@ -0,0 +1,7 @@ +#! stap -p1 + +# bad function declaration - no "()" after name +function decl +{ + return 0 +} diff --git a/testsuite/parseko/functiondecl05.stp b/testsuite/parseko/functiondecl05.stp new file mode 100755 index 00000000..1406769d --- /dev/null +++ b/testsuite/parseko/functiondecl05.stp @@ -0,0 +1,7 @@ +#! stap -p1 + +# bad function declaration - bad parameter list +function decl(*) +{ + return 0 +} diff --git a/testsuite/parseko/functiondecl06.stp b/testsuite/parseko/functiondecl06.stp new file mode 100755 index 00000000..b96b2599 --- /dev/null +++ b/testsuite/parseko/functiondecl06.stp @@ -0,0 +1,7 @@ +#! stap -p1 + +# bad function declaration - bad argument type +function decl(a:foo) +{ + return 0 +} diff --git a/testsuite/parseko/functiondecl07.stp b/testsuite/parseko/functiondecl07.stp new file mode 100755 index 00000000..e6e15ecf --- /dev/null +++ b/testsuite/parseko/functiondecl07.stp @@ -0,0 +1,7 @@ +#! stap -p1 + +# bad function declaration - needs a ',' between arguments +function decl(a b) +{ + return 0 +} diff --git a/testsuite/parseko/ifstmt01.stp b/testsuite/parseko/ifstmt01.stp new file mode 100755 index 00000000..92ebfa7b --- /dev/null +++ b/testsuite/parseko/ifstmt01.stp @@ -0,0 +1,8 @@ +#! stap -p1 + +# missing parens after if statment + +function decl() +{ + if a == b +} diff --git a/testsuite/parseko/ifstmt02.stp b/testsuite/parseko/ifstmt02.stp new file mode 100755 index 00000000..da6d75df --- /dev/null +++ b/testsuite/parseko/ifstmt02.stp @@ -0,0 +1,9 @@ +#! stap -p1 + +# missing closing paren in if statment + +function decl() +{ + if (a == b + printf("in decl\n") +} diff --git a/testsuite/parseko/nineteen.stp b/testsuite/parseko/nineteen.stp new file mode 100755 index 00000000..99e9cfff --- /dev/null +++ b/testsuite/parseko/nineteen.stp @@ -0,0 +1,8 @@ +#! stap -p1 + +# 'next' in function context + +function decl() +{ + next +} diff --git a/testsuite/parseko/preprocess01.stp b/testsuite/parseko/preprocess01.stp new file mode 100755 index 00000000..81832594 --- /dev/null +++ b/testsuite/parseko/preprocess01.stp @@ -0,0 +1,6 @@ +#! stap -p1 + +# bad kernel version - not a string +%( kernel_v <= 2.6 %? + probe begin { } +%) diff --git a/testsuite/parseko/preprocess02.stp b/testsuite/parseko/preprocess02.stp new file mode 100755 index 00000000..2f5b1958 --- /dev/null +++ b/testsuite/parseko/preprocess02.stp @@ -0,0 +1,6 @@ +#! stap -p1 + +# bad comparison operator +%( kernel_v * "2.6" %? + probe begin { } +%) diff --git a/testsuite/parseko/preprocess03.stp b/testsuite/parseko/preprocess03.stp new file mode 100755 index 00000000..3d3badf5 --- /dev/null +++ b/testsuite/parseko/preprocess03.stp @@ -0,0 +1,6 @@ +#! stap -p1 + +# bad arch - not a string +%( arch == foo %? + probe begin { } +%) diff --git a/testsuite/parseko/preprocess04.stp b/testsuite/parseko/preprocess04.stp new file mode 100755 index 00000000..e35a9912 --- /dev/null +++ b/testsuite/parseko/preprocess04.stp @@ -0,0 +1,6 @@ +#! stap -p1 + +# bad arch comparison operator - not '==' or '!=' +%( arch >= "foo" %? + probe begin { } +%) diff --git a/testsuite/parseko/preprocess05.stp b/testsuite/parseko/preprocess05.stp new file mode 100755 index 00000000..efb23833 --- /dev/null +++ b/testsuite/parseko/preprocess05.stp @@ -0,0 +1,6 @@ +#! stap -p1 + +# bad preprocess condition start - not "arch", "kernel_v", or "kernel_vr" +%( foo == "2.6" %? + probe begin { } +%) diff --git a/testsuite/parseko/preprocess06.stp b/testsuite/parseko/preprocess06.stp new file mode 100755 index 00000000..6a5b6e23 --- /dev/null +++ b/testsuite/parseko/preprocess06.stp @@ -0,0 +1,4 @@ +#! stap -p1 + +# no "%?" +%( arch == "2.6" %) diff --git a/testsuite/parseko/preprocess07.stp b/testsuite/parseko/preprocess07.stp new file mode 100755 index 00000000..9786ff7d --- /dev/null +++ b/testsuite/parseko/preprocess07.stp @@ -0,0 +1,4 @@ +#! stap -p1 + +# incomplete condition +%( arch == diff --git a/testsuite/parseko/preprocess08.stp b/testsuite/parseko/preprocess08.stp new file mode 100755 index 00000000..6665983d --- /dev/null +++ b/testsuite/parseko/preprocess08.stp @@ -0,0 +1,4 @@ +#! stap -p1 + +# missing "then" token +%( arch == "2.6" %? diff --git a/testsuite/parseko/preprocess09.stp b/testsuite/parseko/preprocess09.stp new file mode 100755 index 00000000..5bd83766 --- /dev/null +++ b/testsuite/parseko/preprocess09.stp @@ -0,0 +1,4 @@ +#! stap -p1 + +# missing "else" token +%( arch == "2.6" %? probe begin { } %: diff --git a/testsuite/parseko/probepoint01.stp b/testsuite/parseko/probepoint01.stp new file mode 100755 index 00000000..9f0f7549 --- /dev/null +++ b/testsuite/parseko/probepoint01.stp @@ -0,0 +1,4 @@ +#! stap -p1 + +# bad probe point +probe foo bar diff --git a/testsuite/parseko/probepoint02.stp b/testsuite/parseko/probepoint02.stp new file mode 100755 index 00000000..f5500b4a --- /dev/null +++ b/testsuite/parseko/probepoint02.stp @@ -0,0 +1,4 @@ +#! stap -p1 + +# bad probe point +probe foo(5( diff --git a/testsuite/parseko/probepoint03.stp b/testsuite/parseko/probepoint03.stp new file mode 100755 index 00000000..62fd76f9 --- /dev/null +++ b/testsuite/parseko/probepoint03.stp @@ -0,0 +1,4 @@ +#! stap -p1 + +# bad probe point +probe foo(5)(6) diff --git a/testsuite/parseko/seventeen.stp b/testsuite/parseko/seventeen.stp new file mode 100755 index 00000000..62c736d6 --- /dev/null +++ b/testsuite/parseko/seventeen.stp @@ -0,0 +1,3 @@ +#! stap -p1 + +# empty file diff --git a/testsuite/parseko/ternarystmt01.stp b/testsuite/parseko/ternarystmt01.stp new file mode 100755 index 00000000..ffac03b2 --- /dev/null +++ b/testsuite/parseko/ternarystmt01.stp @@ -0,0 +1,8 @@ +#! stap -p1 + +# missing ':' in ternary statement + +function decl() +{ + a = (a == 1) ? 0 +} diff --git a/testsuite/parseko/twenty.stp b/testsuite/parseko/twenty.stp new file mode 100755 index 00000000..199fb9a8 --- /dev/null +++ b/testsuite/parseko/twenty.stp @@ -0,0 +1,8 @@ +#! stap -p1 + +# 'return' in probe context + +probe begin +{ + return +} diff --git a/testsuite/parseko/twentyone.stp b/testsuite/parseko/twentyone.stp new file mode 100755 index 00000000..404009c4 --- /dev/null +++ b/testsuite/parseko/twentyone.stp @@ -0,0 +1,9 @@ +#! stap -p1 + +# bad stat operator + +probe begin +{ + v <<< 1 + printf("foo %d\n", @foo(v)) +} diff --git a/testsuite/parseko/whilestmt01.stp b/testsuite/parseko/whilestmt01.stp new file mode 100755 index 00000000..2d0b90fb --- /dev/null +++ b/testsuite/parseko/whilestmt01.stp @@ -0,0 +1,9 @@ +#! stap -p1 + +# missing parens after while statment + +function decl() +{ + while 0 == 1 + printf("here\n") +} diff --git a/testsuite/parseko/whilestmt02.stp b/testsuite/parseko/whilestmt02.stp new file mode 100755 index 00000000..c3c4510c --- /dev/null +++ b/testsuite/parseko/whilestmt02.stp @@ -0,0 +1,9 @@ +#! stap -p1 + +# missing closing paren after while statment + +function decl() +{ + while (0 == 1 + printf("here\n") +} |