diff options
author | hunt <hunt> | 2007-03-14 07:11:11 +0000 |
---|---|---|
committer | hunt <hunt> | 2007-03-14 07:11:11 +0000 |
commit | 3b6fd2ea934f1d75174e5a786701c90f32553fe8 (patch) | |
tree | f1e359f5592625b3f2173885393aac3e8d853da8 /testsuite | |
parent | b272f21d2a42d44222cfc20f35025c324f6091c4 (diff) | |
download | systemtap-steved-3b6fd2ea934f1d75174e5a786701c90f32553fe8.tar.gz systemtap-steved-3b6fd2ea934f1d75174e5a786701c90f32553fe8.tar.xz systemtap-steved-3b6fd2ea934f1d75174e5a786701c90f32553fe8.zip |
2007-03-14 Martin Hunt <hunt@redhat.com>
* systemtap.base/div0.stp: Fix so output
won't possibly have the error message before the printed
output.
* systemtap.base/maxactive.exp: Ditto.
* systemtap.maps/ix_clear.stp: Ditto.
* systemtap.maps/ix_clear2.stp: Ditto.
* systemtap.samples/args.exp: Remove obsolete "-r" option
to staprun.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | testsuite/systemtap.base/div0.exp | 1 | ||||
-rw-r--r-- | testsuite/systemtap.base/div0.stp | 23 | ||||
-rw-r--r-- | testsuite/systemtap.base/maxactive.exp | 6 | ||||
-rwxr-xr-x | testsuite/systemtap.maps/ix_clear.stp | 7 | ||||
-rwxr-xr-x | testsuite/systemtap.maps/ix_clear2.stp | 6 | ||||
-rw-r--r-- | testsuite/systemtap.samples/args.exp | 4 |
7 files changed, 39 insertions, 19 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 4a2453cb..3961d269 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2007-03-14 Martin Hunt <hunt@redhat.com> + + * systemtap.base/div0.stp: Fix so output + won't possibly have the error message before the printed + output. + * systemtap.base/maxactive.exp: Ditto. + * systemtap.maps/ix_clear.stp: Ditto. + * systemtap.maps/ix_clear2.stp: Ditto. + * systemtap.samples/args.exp: Remove obsolete "-r" option + to staprun. + 2007-03-07 Frank Ch. Eigler <fche@elastic.org> PR 4116. diff --git a/testsuite/systemtap.base/div0.exp b/testsuite/systemtap.base/div0.exp index bfd0186c..dd1098cb 100644 --- a/testsuite/systemtap.base/div0.exp +++ b/testsuite/systemtap.base/div0.exp @@ -1,5 +1,4 @@ # Simple function to test that systemtap divide by 0 doesn't kill the machine -# FIXME correct the output check set test "div0" diff --git a/testsuite/systemtap.base/div0.stp b/testsuite/systemtap.base/div0.stp index 65710f09..b2694e58 100644 --- a/testsuite/systemtap.base/div0.stp +++ b/testsuite/systemtap.base/div0.stp @@ -2,7 +2,12 @@ * div.stp0 * * Check the systemtap divide by 0 does not kill the machine - * FIXME this test needs to be refined + * + * Note: Error messages are written to stderr. That means it is + * possible that if a printf is followed by something that + * generates an error, the error will get displayed before the printf. + * That is why both print's are in the begin probe. + * */ global x3 @@ -11,17 +16,17 @@ global x2 probe begin { - log("systemtap starting probe") + print("systemtap starting probe\n") + print("systemtap ending probe\n") x1 = 56088; x2 = 0; } probe end { - log("systemtap ending probe") - x3 = x1 / x2; - if (x3 != 456 ) { - log("systemtap test failure"); - } else { - log("systemtap test success"); - } + x3 = x1 / x2 + /* this part does not get executed */ + if (x3 != 456 ) + print("systemtap test failure\n") + else + print("systemtap test failure\n") } diff --git a/testsuite/systemtap.base/maxactive.exp b/testsuite/systemtap.base/maxactive.exp index db71602b..e2175d17 100644 --- a/testsuite/systemtap.base/maxactive.exp +++ b/testsuite/systemtap.base/maxactive.exp @@ -17,8 +17,7 @@ set script1 { kernel.function("sys_read").return { } probe timer.ms(5000) { exit(); } - probe begin { log("systemtap starting probe"); } - probe end { log("systemtap ending probe"); } + probe begin { log("systemtap starting probe"); log("systemtap ending probe");} } # Run script1 and save the number of skipped probes (which will most @@ -34,8 +33,7 @@ set script2 { kernel.function("sys_read").return.maxactive(1) { } probe timer.ms(5000) { exit(); } - probe begin { log("systemtap starting probe"); } - probe end { log("systemtap ending probe"); } + probe begin { log("systemtap starting probe"); log("systemtap ending probe");} } # Run script2 and save the number of skipped probes. diff --git a/testsuite/systemtap.maps/ix_clear.stp b/testsuite/systemtap.maps/ix_clear.stp index a36e5400..dd8c63a0 100755 --- a/testsuite/systemtap.maps/ix_clear.stp +++ b/testsuite/systemtap.maps/ix_clear.stp @@ -6,7 +6,10 @@ probe begin { foo[1] <<< 1 printf("foo[1] = %d %d\n", @count(foo[1]), @sum(foo[1])) delete foo[1] - printf("foo[1] = %d %d\n", @count(foo[1]), @sum(foo[1])) - exit() } +probe timer.ms(1000) { exit() } + +probe end { + printf("foo[1] = %d %d\n", @count(foo[1]), @sum(foo[1])) +} diff --git a/testsuite/systemtap.maps/ix_clear2.stp b/testsuite/systemtap.maps/ix_clear2.stp index cedec482..cc2bb9ee 100755 --- a/testsuite/systemtap.maps/ix_clear2.stp +++ b/testsuite/systemtap.maps/ix_clear2.stp @@ -6,7 +6,11 @@ probe begin { foo[1] <<< 1 printf("foo[1] = %d %d\n", @count(foo[1]), @sum(foo[1])) delete foo +} + +probe timer.ms(1000) { exit() } + +probe end { printf("foo[1] = %d %d\n", @count(foo[1]), @sum(foo[1])) - exit() } diff --git a/testsuite/systemtap.samples/args.exp b/testsuite/systemtap.samples/args.exp index 0eb39801..d147d21d 100644 --- a/testsuite/systemtap.samples/args.exp +++ b/testsuite/systemtap.samples/args.exp @@ -37,7 +37,7 @@ if [file exists $modpath] { return } -spawn sudo $staprunpath -r -d [pid] $modpath foo=hello bar=999 +spawn sudo $staprunpath -d [pid] $modpath foo=hello bar=999 set ok 0 expect { -timeout 30 @@ -52,7 +52,7 @@ if {$ok == 1} { fail "$test run 1" } -spawn sudo $staprunpath -r -d [pid] $modpath foo=goodbye bar=0 +spawn sudo $staprunpath -d [pid] $modpath foo=goodbye bar=0 set ok 0 expect { -timeout 30 |