diff options
Diffstat (limited to 'testsuite/systemtap.printf/out1.exp')
-rw-r--r-- | testsuite/systemtap.printf/out1.exp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/systemtap.printf/out1.exp b/testsuite/systemtap.printf/out1.exp new file mode 100644 index 00000000..6a27d5be --- /dev/null +++ b/testsuite/systemtap.printf/out1.exp @@ -0,0 +1,29 @@ +set test "out1" +set tpath "$srcdir/$subdir/$test.stp" +set TEST_NAME "$subdir/$test" + +if {![installtest_p]} { untested $TEST_NAME; return } + +if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} { + puts stderr "Failed to create temporary file: $tmpfile" + untested $TEST_NAME + return +} + +if {[catch {exec stap -o $tmpfile $tpath} res]} { + untested $TEST_NAME + puts "$res" + catch {exec rm -f $tmpfile} + return +} + +if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} { + fail "$TEST_NAME failed" + puts "$res" + catch {exec rm -f $tmpfile} + return +} + +pass "$TEST_NAME passed" +catch {exec rm -f $tmpfile} + |