diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-05 14:31:37 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-05 14:31:37 +0100 |
commit | 6a99be469643ef0214729391f9cef4867b8e9fca (patch) | |
tree | 3ae549560d49a2fa2f7db507f561562f3f6a7594 /tests/pipeaction.sh | |
parent | a5cd509be736fcff3c8ae3104712d2fe85776416 (diff) | |
download | rsyslog-6a99be469643ef0214729391f9cef4867b8e9fca.tar.gz rsyslog-6a99be469643ef0214729391f9cef4867b8e9fca.tar.xz rsyslog-6a99be469643ef0214729391f9cef4867b8e9fca.zip |
added pipe action test to testbench & testbench bugfix
Diffstat (limited to 'tests/pipeaction.sh')
-rwxr-xr-x | tests/pipeaction.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/pipeaction.sh b/tests/pipeaction.sh new file mode 100755 index 00000000..26a4c22a --- /dev/null +++ b/tests/pipeaction.sh @@ -0,0 +1,33 @@ +# Test for the pipe output action. +# will create a fifo in the current directory, write to it and +# then do the usual sequence checks. +# added 2009-11-05 by RGerhards +echo =============================================================================== +echo \[pipeaction.sh\]: testing pipe output action + +# create the pipe and start a background process that copies data from +# it to the "regular" work file +source $srcdir/diag.sh init +rm -f rsyslog-testbench-fifo +mkfifo rsyslog-testbench-fifo +cp rsyslog-testbench-fifo rsyslog.out.log & +CPPROCESS=$! +echo background cp process id is $CPPROCESS + +# now do the usual run +source $srcdir/diag.sh startup pipeaction.conf +# 20000 messages should be enough +#source $srcdir/diag.sh tcpflood 127.0.0.1 13514 1 20000 +source $srcdir/diag.sh injectmsg 0 20000 +source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +source $srcdir/diag.sh wait-shutdown + +# wait for the cp process to finish, do pipe-specific cleanup +echo waiting for background cp to terminate... +wait $CPPROCESS +rm -f rsyslog-testbench-fifo +echo background cp has terminated, continue test... + +# and continue the usual checks +source $srcdir/diag.sh seq-check 0 19999 +source $srcdir/diag.sh exit |