diff options
author | Stan Cox <scox@redhat.com> | 2009-04-02 15:15:22 -0400 |
---|---|---|
committer | Stan Cox <scox@redhat.com> | 2009-04-02 15:15:22 -0400 |
commit | a7d25c487ad74dc60bbbd93a2f689e0f0a047273 (patch) | |
tree | 9c37666bc77cc94b9b3cb3f1d3f84b3025843eab /testsuite/systemtap.base/stmt_rel.exp | |
parent | b2b336288ce9e92a21efe7dcd314f604bc97be29 (diff) | |
download | systemtap-steved-a7d25c487ad74dc60bbbd93a2f689e0f0a047273.tar.gz systemtap-steved-a7d25c487ad74dc60bbbd93a2f689e0f0a047273.tar.xz systemtap-steved-a7d25c487ad74dc60bbbd93a2f689e0f0a047273.zip |
Rewrite stmt_rel.exp to only rely on -l output.
* testsuite/systemtap.base/stmt_rel.exp: Rewrite.
Diffstat (limited to 'testsuite/systemtap.base/stmt_rel.exp')
-rw-r--r-- | testsuite/systemtap.base/stmt_rel.exp | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/testsuite/systemtap.base/stmt_rel.exp b/testsuite/systemtap.base/stmt_rel.exp index be51fef9..ec12e484 100644 --- a/testsuite/systemtap.base/stmt_rel.exp +++ b/testsuite/systemtap.base/stmt_rel.exp @@ -1,8 +1,40 @@ -# test integer limits. Set and print variables and print constants. - set test "stmt_rel" -set ::result_string {PASS bio_init -PASS line number -PASS wildcard} -stap_run2 $srcdir/$subdir/$test.stp +set line1 "" +spawn stap -l "kernel.statement(\"bio_init@fs/bio.c+2\")" +expect { + -timeout 180 + -re {[0-9][0-9][0-9]} { regexp "\[0-9\]\[0-9\]\[0-9\]" $expect_out(0,string) line1; } + timeout { fail "$test C (timeout)" } + eof { } +} + +set line2 "" +spawn stap -l "kernel.statement(\"bio_init@fs/bio.c+3\")" +expect { + -timeout 180 + -re {[0-9][0-9][0-9]} { regexp "\[0-9\]\[0-9\]\[0-9\]" $expect_out(0,string) line2; } + timeout { fail "$test C (timeout)" } + eof { } +} + +if { $line1 < $line2 } { + pass "$test line numbers" +} else { + fail "$test line numbers" +} + +set ok 0 +spawn stap -l "kernel.statement(\"bio_init@fs/bio.c:*\")" +expect { + -timeout 180 + -re {[0-9][0-9][0-9]} { incr ok; exp_continue } + timeout { fail "$test C (timeout)" } + eof { } +} + +if { $ok == 3 } { + pass "$test wildcard" +} else { + fail "$test wildcard ($ok)" +} |