diff options
-rw-r--r-- | testsuite/ChangeLog | 7 | ||||
-rwxr-xr-x | testsuite/semko/thirtyfour.stp | 7 | ||||
-rwxr-xr-x | testsuite/semok/twentyfour.stp | 8 |
3 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index bed37e80..1cf83b6a 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2006-11-28 David Smith <dsmith@redhat.com> + + * semko/thirtyfour.stp: Checks for writing to target variable in + .return probe. + * semok/twentyfour.stp: Tests read access to target variable in + .return probe. + 2006-11-21 Li Guanglei <guanglei@cn.ibm.com> From Gui Jian <guijian@cn.ibm.com> diff --git a/testsuite/semko/thirtyfour.stp b/testsuite/semko/thirtyfour.stp index 6d9a67d1..515fcfbb 100755 --- a/testsuite/semko/thirtyfour.stp +++ b/testsuite/semko/thirtyfour.stp @@ -1,3 +1,10 @@ #! stap -p2 +# can't write to target variables in .return probes + +probe kernel.function("sys_read").return +{ + $fd = 0 + printf("fd is %d\n", $fd) +} probe kernel.function("sys_open").return { $filename } diff --git a/testsuite/semok/twentyfour.stp b/testsuite/semok/twentyfour.stp new file mode 100755 index 00000000..91dee48f --- /dev/null +++ b/testsuite/semok/twentyfour.stp @@ -0,0 +1,8 @@ +#! stap -p2 + +# read access to target variables should work in .return probes + +probe kernel.function("sys_read").return +{ + printf("fd is %d\n", $fd) +} |