diff options
author | fche <fche> | 2007-08-24 19:26:51 +0000 |
---|---|---|
committer | fche <fche> | 2007-08-24 19:26:51 +0000 |
commit | fedd4090d18990f9bec6c37a1689414659ac8312 (patch) | |
tree | 6dfddabb74bf19ade749ea1bb6e1d3baa4853547 /testsuite/buildok | |
parent | c5b064726ec7648c8fb46c4c00ecadfd83cfa4c8 (diff) | |
download | systemtap-steved-fedd4090d18990f9bec6c37a1689414659ac8312.tar.gz systemtap-steved-fedd4090d18990f9bec6c37a1689414659ac8312.tar.xz systemtap-steved-fedd4090d18990f9bec6c37a1689414659ac8312.zip |
2007-08-24 Frank Ch. Eigler <fche@redhat.com>
PR 4899
* tapsets.cxx (dwflpp::has_single_line_record): Extended,
abstraction violated.
(iterate_over_srcfile_lines): Remove exactly line number match
logic. Improve error message to offered better-checked alternative
line numbers.
(query_srcfile_line): Whoops, pass scope_die down for statement("...")
probes, to enable $target var processing.
2007-08-24 Frank Ch. Eigler <fche@redhat.com>
PR 4899
* buildok/fortytwo.stp: New test.
Diffstat (limited to 'testsuite/buildok')
-rwxr-xr-x | testsuite/buildok/fortytwo.stp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/buildok/fortytwo.stp b/testsuite/buildok/fortytwo.stp new file mode 100755 index 00000000..c37d19af --- /dev/null +++ b/testsuite/buildok/fortytwo.stp @@ -0,0 +1,24 @@ +#! /bin/sh + +# This is a roundabout test of kernel.statement(). + +set -e + +fn="do_readv_writev@fs/read_write.c" +var="file" + +fullfn=`stap -p2 -e 'probe kernel.statement("'$fn'") {}' | grep kernel | cut -f2 -d'"'` +lineno=`echo $fullfn | cut -f2 -d:` + +echo "$0: $fn found, starting line $lineno" + +for i in 0 1 2 4 6 10 15 20 25 # some random numbers, not larger than the number of lines in fn +do + ilineno=`expr $lineno + $i` + errors=`stap -u -p4 -e 'probe kernel.statement("'$fn':'$ilineno'") {$'$var'}' 2>&1 >/dev/null ||true ` + if echo "$errors" | grep -q unable.to.find.local + then + echo "Unexpected error $errors"; exit 1 + fi + echo 'probe kernel.statement("'$fn':'$ilineno'") {$'$var'}' '#' OK +done |