From 0ec1af8d6f51d29ee6191a0160e934bef1dd94d3 Mon Sep 17 00:00:00 2001 From: Masami Hiramatsu Date: Wed, 16 Sep 2009 16:08:38 -0400 Subject: Add signal based file switching testcase * testsuite/systemtap.base/flightrec1.exp: Add signal file switching testcase. * testsuite/systemtap.base/flightrec4.exp: New test for signal file switching with file number limits. * testsuite/systemtap.base/flightrec5.exp: New test for signal file switching with file number limits on bulk mode. --- testsuite/systemtap.base/flightrec1.exp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'testsuite/systemtap.base/flightrec1.exp') diff --git a/testsuite/systemtap.base/flightrec1.exp b/testsuite/systemtap.base/flightrec1.exp index c32a77f2..73b6221e 100644 --- a/testsuite/systemtap.base/flightrec1.exp +++ b/testsuite/systemtap.base/flightrec1.exp @@ -30,7 +30,8 @@ expect { } wait -exec kill -TERM $pid +# switch file +exec kill -USR2 $pid # check output file if {[catch {exec rm $test.out}]} { @@ -40,4 +41,13 @@ if {[catch {exec rm $test.out}]} { pass "$test (output file)" } +exec kill -TERM $pid + +# check switched output file +if {[catch {exec rm $test.out.1}]} { + fail "$test (failed to switch output file)" + return -1 +} else { + pass "$test (switch output file)" +} -- cgit