diff options
author | fche <fche> | 2005-07-28 18:07:02 +0000 |
---|---|---|
committer | fche <fche> | 2005-07-28 18:07:02 +0000 |
commit | 24cb178fd82936f55d254ebd0cd79802da21134a (patch) | |
tree | d9fbde4a94c16abf37a994c7d3ae147d04b77919 /testsuite | |
parent | b290c791d701b5841ed824fddfce3f949b0a7b61 (diff) | |
download | systemtap-steved-24cb178fd82936f55d254ebd0cd79802da21134a.tar.gz systemtap-steved-24cb178fd82936f55d254ebd0cd79802da21134a.tar.xz systemtap-steved-24cb178fd82936f55d254ebd0cd79802da21134a.zip |
2005-07-28 Frank Ch. Eigler <fche@redhat.com>
translator/1120
* main.cxx (main): Preset -R and -I options from environment
variables (if set). Pass guru mode flags to parser.
* parse.cxx (privileged): New parser operation flag. Update callers.
(parse_embeddedcode): Throw an error if !privileged.
(parse_functiondecl): Change signature. Prevent duplicates.
(parse_globals): Ditto.
* parse.h: Corresponding changes.
* tapset/*.stp: Beginnings of real tapset library, to replace
previous builtins.
* tapsets.cxx: Greatly reduce verbose mode output.
* Makefile.am: Install & dist it.
* runtest.sh: Refer to it.
* Makefile.in, aclocal.m4: Regenerated.
* testsuite/*/*.stp: Set guru mode via /bin/sh if needed.
* testusite/*/*ko.stp: Homogenize shell scripts.
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/buildko/one.stp | 6 | ||||
-rwxr-xr-x | testsuite/buildok/two.stp | 6 | ||||
-rwxr-xr-x | testsuite/parseko/eleven.stp | 4 | ||||
-rwxr-xr-x | testsuite/parseko/fourteen.stp | 7 | ||||
-rwxr-xr-x | testsuite/parseko/ten.stp | 6 | ||||
-rwxr-xr-x | testsuite/parseko/thirteen.stp | 7 | ||||
-rwxr-xr-x | testsuite/parseko/twelve.stp | 4 | ||||
-rwxr-xr-x | testsuite/parseok/semko.stp | 11 | ||||
-rwxr-xr-x | testsuite/parseok/twelve.stp | 6 | ||||
-rwxr-xr-x | testsuite/semok/transko.stp | 8 | ||||
-rwxr-xr-x | testsuite/transok/buildko.stp | 8 | ||||
-rwxr-xr-x | testsuite/transok/nine.stp | 6 |
12 files changed, 67 insertions, 12 deletions
diff --git a/testsuite/buildko/one.stp b/testsuite/buildko/one.stp index b8d54c51..1b4da936 100755 --- a/testsuite/buildko/one.stp +++ b/testsuite/buildko/one.stp @@ -1,4 +1,6 @@ -#! stap -p4 +#! /bin/sh + +./stap -p4 -g - $@ <<'END' %{ #include <linux/version.h> @@ -14,4 +16,4 @@ probe begin printk("hello from systemtap, kernel version " . get_release()) } - +END diff --git a/testsuite/buildok/two.stp b/testsuite/buildok/two.stp index 83a4705c..7453cae1 100755 --- a/testsuite/buildok/two.stp +++ b/testsuite/buildok/two.stp @@ -1,4 +1,6 @@ -#! stap -p4 +#! /bin/sh + +./stap -p4 -g $@ - <<'END' %{ #include <linux/version.h> @@ -13,4 +15,4 @@ probe begin printk("hello from systemtap, kernel version " . get_release()) } - +END diff --git a/testsuite/parseko/eleven.stp b/testsuite/parseko/eleven.stp new file mode 100755 index 00000000..f1b9321d --- /dev/null +++ b/testsuite/parseko/eleven.stp @@ -0,0 +1,4 @@ +#! stap -p1 + +function foo () {} +function foo () {} diff --git a/testsuite/parseko/fourteen.stp b/testsuite/parseko/fourteen.stp new file mode 100755 index 00000000..b646f8b6 --- /dev/null +++ b/testsuite/parseko/fourteen.stp @@ -0,0 +1,7 @@ +#! stap -p2 + +function zoo () %{ /* invalid embedded code */ %} + +probe begin +{ +} diff --git a/testsuite/parseko/ten.stp b/testsuite/parseko/ten.stp index a268db4e..0a5f338e 100755 --- a/testsuite/parseko/ten.stp +++ b/testsuite/parseko/ten.stp @@ -1,5 +1,9 @@ -#! stap -p1 +#! /bin/sh + +./stap -p1 -g - <<'END' probe foo { %{ /* not a valid place for embedded code */ %} } + +END diff --git a/testsuite/parseko/thirteen.stp b/testsuite/parseko/thirteen.stp new file mode 100755 index 00000000..1a5b46f6 --- /dev/null +++ b/testsuite/parseko/thirteen.stp @@ -0,0 +1,7 @@ +#! stap -p2 + +%{ /* embedded code not permitted since -g not supplied */ %} + +probe begin +{ +} diff --git a/testsuite/parseko/twelve.stp b/testsuite/parseko/twelve.stp new file mode 100755 index 00000000..199f6a90 --- /dev/null +++ b/testsuite/parseko/twelve.stp @@ -0,0 +1,4 @@ +#! stap -p1 + +global foo +global foo diff --git a/testsuite/parseok/semko.stp b/testsuite/parseok/semko.stp index 11f2a2da..92339597 100755 --- a/testsuite/parseok/semko.stp +++ b/testsuite/parseok/semko.stp @@ -3,4 +3,13 @@ # 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' + +set -e +for file in ${SRCDIR}/testsuite/semko/*.stp +do + if grep -q /bin/sh $file; then + true # can't override stap options + else + ./stap -p1 $file + fi +done diff --git a/testsuite/parseok/twelve.stp b/testsuite/parseok/twelve.stp index 5b8a3932..d5029d1a 100755 --- a/testsuite/parseok/twelve.stp +++ b/testsuite/parseok/twelve.stp @@ -1,4 +1,6 @@ -#! stap -p1 +#! /bin/sh + +./stap -p1 -g $@ - <<'END' %{ /* hello world */ @@ -7,3 +9,5 @@ function foo (p1, p2) %{ /* goodbye world */ %} + +END diff --git a/testsuite/semok/transko.stp b/testsuite/semok/transko.stp index 9c78c6ef..18bfc8aa 100755 --- a/testsuite/semok/transko.stp +++ b/testsuite/semok/transko.stp @@ -1,10 +1,14 @@ #! /bin/sh # make sure that we can *semcheck* all transko test files, to ensure -# that it is translation-time checks that fail, not earlier ones errors +# that it is translation-time checks that fail, not earlier ones set -e for file in ${SRCDIR}/testsuite/transko/*.stp do - ./stap -p2 $file + if grep -q /bin/sh $file; then + true # can't override stap options + else + ./stap -p2 $file + fi done diff --git a/testsuite/transok/buildko.stp b/testsuite/transok/buildko.stp index 67f11eba..4387b0f1 100755 --- a/testsuite/transok/buildko.stp +++ b/testsuite/transok/buildko.stp @@ -1,10 +1,14 @@ #! /bin/sh # make sure that we can *translate* all buildko test files, to ensure -# that it is build-time checks that fail, not earlier ones errors +# that it is build-time checks that fail, not earlier ones set -e for file in ${SRCDIR}/testsuite/buildko/*.stp do - ./stap -p3 $file + if grep -q /bin/sh $file; then + true # can't override stap options + else + ./stap -p3 $file + fi done diff --git a/testsuite/transok/nine.stp b/testsuite/transok/nine.stp index a75fad5e..82ebc4a9 100755 --- a/testsuite/transok/nine.stp +++ b/testsuite/transok/nine.stp @@ -1,4 +1,6 @@ -#! stap -p3 +#! /bin/sh + +./stap -p3 -g $@ - <<'END' %{ void just_some_declaration () {} @@ -10,3 +12,5 @@ probe begin { bar (5) + 0 } + +END |