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