diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/ChangeLog | 7 | ||||
-rwxr-xr-x | testsuite/semko/forty.stp | 4 | ||||
-rwxr-xr-x | testsuite/semko/fortyone.stp | 3 | ||||
-rwxr-xr-x | testsuite/semko/fortytwo.stp | 10 | ||||
-rw-r--r-- | testsuite/semok/twentynine.stp | 6 |
5 files changed, 27 insertions, 3 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 6dd0d8de..ac0eeebb 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2008-01-17 Frank Ch. Eigler <fche@elastic.org> + + PR 4935. + * semko/forty.stp, fortyone.stp, fortytwo.stp: New tests. + * semok/twentynine.stp: Weaken test since condition expressions have + become more tightly constrained. + 2008-01-17 David Smith <dsmith@redhat.com> * semko/procfs11.stp: Added test for invalid use of procfs probe diff --git a/testsuite/semko/forty.stp b/testsuite/semko/forty.stp new file mode 100755 index 00000000..f7721a47 --- /dev/null +++ b/testsuite/semko/forty.stp @@ -0,0 +1,4 @@ +#! stap -p2 + +global x +probe kernel.function("sys_open") if (x = 1) { } # bad side-effect diff --git a/testsuite/semko/fortyone.stp b/testsuite/semko/fortyone.stp new file mode 100755 index 00000000..e9b986df --- /dev/null +++ b/testsuite/semko/fortyone.stp @@ -0,0 +1,3 @@ +#! stap -p2 + +probe kernel.function("sys_open") if (x > 1) { } # not a global diff --git a/testsuite/semko/fortytwo.stp b/testsuite/semko/fortytwo.stp new file mode 100755 index 00000000..17dacb1c --- /dev/null +++ b/testsuite/semko/fortytwo.stp @@ -0,0 +1,10 @@ +#! stap -p2 + +probe kernel.function("sys_open") if (foo(2)) { } # must not call functions + +function foo(x) { return x } + +# NB: If this condition is relaxed, then this will have to be blocked: +# global y function foo () { return y++ } # since global y is written-to +# but this one would be fine: +# function foo () { return y++ } # since y is written-to diff --git a/testsuite/semok/twentynine.stp b/testsuite/semok/twentynine.stp index 6fe308f2..05e591ce 100644 --- a/testsuite/semok/twentynine.stp +++ b/testsuite/semok/twentynine.stp @@ -4,10 +4,10 @@ function dummy:long () {return p;} # alias with a condition probe alias0 = begin if (3) {p=1} -# alias with a kernel-variable condition -probe alias1 = kernel.function("sys_read").return if ($return) {p=0} +# alias with a kernel-variable condition -- not valid +probe alias1 = kernel.function("sys_read").return if (0) { if ($return) {p=0} } # alias with a function-call condition -probe blias0 = timer.s(1) if (dummy()) {p=10} +probe blias0 = timer.s(1) if (1 /* dummy() */) {p=10} # multiple probe point with conditions probe alias2 = alias0 if (1), alias1 if (-1) {p=2} |