From ee7369e533d6965f1661b9c5bc174a843b335c6e Mon Sep 17 00:00:00 2001 From: hunt Date: Tue, 10 Apr 2007 14:41:39 +0000 Subject: 2007-04-10 Martin Hunt * 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. --- testsuite/systemtap.printf/out1b.exp | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 testsuite/systemtap.printf/out1b.exp (limited to 'testsuite/systemtap.printf/out1b.exp') diff --git a/testsuite/systemtap.printf/out1b.exp b/testsuite/systemtap.printf/out1b.exp new file mode 100644 index 00000000..dafdeb27 --- /dev/null +++ b/testsuite/systemtap.printf/out1b.exp @@ -0,0 +1,40 @@ +set test "$srcdir/$subdir/out1.stp" +set TEST_NAME "$subdir/out1b" + +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}*]} + -- cgit