diff options
author | hunt <hunt> | 2007-04-10 14:41:39 +0000 |
---|---|---|
committer | hunt <hunt> | 2007-04-10 14:41:39 +0000 |
commit | ee7369e533d6965f1661b9c5bc174a843b335c6e (patch) | |
tree | f9ede7a6904c883c126cd8fb5688dd5f4083b5b1 /testsuite/systemtap.printf/out2b.exp | |
parent | 3d1f0c8fa10174815920ed3568bd816bd488f62f (diff) | |
download | systemtap-steved-ee7369e533d6965f1661b9c5bc174a843b335c6e.tar.gz systemtap-steved-ee7369e533d6965f1661b9c5bc174a843b335c6e.tar.xz systemtap-steved-ee7369e533d6965f1661b9c5bc174a843b335c6e.zip |
2007-04-10 Martin Hunt <hunt@redhat.com>
* systemtap.printf/out*: New output tests to stress output
buffering and transport.
* systemtap.printf/mixed*: More output tests mixing print,
printf, and print_char.
* systemtap.printf/end*: Test that output from end probes
is all sent.
Diffstat (limited to 'testsuite/systemtap.printf/out2b.exp')
-rw-r--r-- | testsuite/systemtap.printf/out2b.exp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/testsuite/systemtap.printf/out2b.exp b/testsuite/systemtap.printf/out2b.exp new file mode 100644 index 00000000..9b8eed25 --- /dev/null +++ b/testsuite/systemtap.printf/out2b.exp @@ -0,0 +1,40 @@ +set test "$srcdir/$subdir/out2.stp" +set TEST_NAME "$subdir/out2b" + +if {![installtest_p]} { untested $TEST_NAME; return } + +if {[catch {exec which stap_merge} stap_merge_path]} { + untested "$TEST_NAME : could not find stap_merge" + return +} + +if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} { + puts stderr "Failed to create temporary file: $tmpfile" + untested "$TEST_NAME : failed to create temporary file" + return +} + +if {[catch {exec stap -b -o $tmpfile $test} res]} { + untested $TEST_NAME + puts "stap failed: $res" + catch {eval [list exec sudo /bin/rm -f] [glob ${tmpfile}*]} + return +} + +if {[catch {eval [list exec $stap_merge_path -o $tmpfile] [glob "${tmpfile}_*"]} res]} { + puts "merge failed: $res" + fail "$TEST_NAME failed" + catch {eval [list exec sudo /bin/rm -f] [glob ${tmpfile}*]} + return +} + +if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} { + puts "$res" + fail "$TEST_NAME failed" + catch {eval [list exec sudo /bin/rm -f] [glob ${tmpfile}*]} + return +} + +pass "$TEST_NAME passed" +catch {eval [list exec sudo /bin/rm -f] [glob ${tmpfile}*]} + |