summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.printf/out3.exp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.printf/out3.exp')
-rw-r--r--testsuite/systemtap.printf/out3.exp29
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/systemtap.printf/out3.exp b/testsuite/systemtap.printf/out3.exp
new file mode 100644
index 00000000..8cf63d50
--- /dev/null
+++ b/testsuite/systemtap.printf/out3.exp
@@ -0,0 +1,29 @@
+set test "out3"
+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 -DMAXACTION=100000 -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}
+