From 6643650db25f9ea5b32fe767b4f09e2b6d91a7c4 Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Mon, 16 Jun 2008 12:49:42 -0400 Subject: Bug 6611: read-only variable typo warnings should list alternatives. --- testsuite/ChangeLog | 5 +++++ testsuite/systemtap.base/warnings.exp | 2 +- testsuite/systemtap.base/warnings.stp | 12 +++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) (limited to 'testsuite') diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 518dc4f1..fd5a4c8f 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-06-16 Stan Cox + + * systemtap.base/warnings.stp: Added PR 6611 warning tests. + * systemtap.base/warnings.exp: Reset warning count. + 2008-06-13 Frank Ch. Eigler * lib/stap_run.exp: Remove module/cache warning boilerplate. diff --git a/testsuite/systemtap.base/warnings.exp b/testsuite/systemtap.base/warnings.exp index 99e70847..3e37553f 100644 --- a/testsuite/systemtap.base/warnings.exp +++ b/testsuite/systemtap.base/warnings.exp @@ -9,7 +9,7 @@ expect { eof { } } wait -if {$ok == 12} { +if {$ok == 16} { pass $test } else { fail "$test ($ok)" diff --git a/testsuite/systemtap.base/warnings.stp b/testsuite/systemtap.base/warnings.stp index a2ac5afc..314e45f7 100644 --- a/testsuite/systemtap.base/warnings.stp +++ b/testsuite/systemtap.base/warnings.stp @@ -1,4 +1,4 @@ -# PR 1119, 6538 +# PR 1119 global elide_me1 function elide_me2 () {} @@ -6,3 +6,13 @@ function foo:long () { elide_me3 = 1 } function bar() { print(elide+me1) ; ; ; } probe never { elide_me4 = 1; (elide_me5+5); print (foo()) } probe never { print(elide+me1) bar () } + +# PR 6611 + +probe probea = kernel.statement("bio_init@fs/bio.c:135") + { printf("%d", funca(2)); elide_me6="foo" } +probe probea { printf("%d", funcb(2,3)); printf("%s",var) } + +function funcb(a:long, b:long) {return a + b} +function funca(a:long) {a=b; elide_me7=1; return a} + -- cgit