diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-05-27 12:00:14 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-05-27 12:00:14 +0200 |
commit | 33316de49b7775ac40dd0ec0f4b7ff6256ccde78 (patch) | |
tree | edeec9b609baf2011838f7dbfcb6fc3bd82f29e7 /tests | |
parent | aa9426f683fa6af9280bc63050ee0187ba4c57e1 (diff) | |
parent | 35ea061f62cf0cbae074b2df47dc6b462da4fd20 (diff) | |
download | rsyslog-33316de49b7775ac40dd0ec0f4b7ff6256ccde78.tar.gz rsyslog-33316de49b7775ac40dd0ec0f4b7ff6256ccde78.tar.xz rsyslog-33316de49b7775ac40dd0ec0f4b7ff6256ccde78.zip |
Merge branch 'master' into ultra-reliable
Conflicts:
tests/Makefile.am
tests/diskqueue.sh
tests/imtcp-multiport.sh
tests/manytcp.sh
tests/memq-persist.sh
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 11 | ||||
-rwxr-xr-x | tests/diag.sh | 82 | ||||
-rwxr-xr-x | tests/diskqueue.sh | 30 | ||||
-rwxr-xr-x | tests/imtcp-multiport.sh | 78 | ||||
-rwxr-xr-x | tests/manytcp.sh | 27 | ||||
-rwxr-xr-x | tests/memq-persist.sh | 47 | ||||
-rwxr-xr-x | tests/queue-persist-drvr.sh | 28 | ||||
-rwxr-xr-x | tests/queue-persist.sh | 11 | ||||
-rw-r--r-- | tests/testsuites/diag-common.conf | 16 | ||||
-rw-r--r-- | tests/testsuites/diskqueue.conf | 7 | ||||
-rw-r--r-- | tests/testsuites/imtcp-multiport.conf | 7 | ||||
-rw-r--r-- | tests/testsuites/manytcp.conf | 7 | ||||
-rw-r--r-- | tests/testsuites/memq-persist2.conf | 20 | ||||
-rw-r--r-- | tests/testsuites/queue-persist.conf (renamed from tests/testsuites/memq-persist1.conf) | 12 | ||||
-rwxr-xr-x | tests/waitqueueempty.sh | 5 |
15 files changed, 184 insertions, 204 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index d422debc..279158cf 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,7 +2,7 @@ TESTRUNS = rt_init rscript check_PROGRAMS = $(TESTRUNS) ourtail nettester tcpflood chkseq TESTS = $(TESTRUNS) cfg.sh arrayqueue.sh linkedlistqueue.sh da-mainmsg-q.sh \ diskqueue.sh manytcp.sh \ - memq-persist.sh + queue-persist.sh if ENABLE_OMSTDOUT TESTS += omod-if-array.sh parsertest.sh inputname.sh fieldtest.sh @@ -12,7 +12,6 @@ DISTCLEANFILES=rsyslog.pid '$(abs_top_builddir)'/DiagTalker.class test_files = testbench.h runtime-dummy.c check_JAVA = DiagTalker.java -#dist_java_JAVA = DiagTalker.java EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ cfg1.cfgtest \ @@ -65,10 +64,10 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ testsuites/1.inputname_imtcp_12515 \ testsuites/1.inputname_imtcp_12516 \ omod-if-array.sh \ - waitqueueempty.sh \ - memq-persist.sh \ - testsuites/memq-persist1.sh \ - testsuites/memq-persist2.sh \ + diag.sh \ + queue-persist.sh \ + queue-persist-drvr.sh \ + testsuites/queue-persist.conf \ DiagTalker.java \ cfg.sh diff --git a/tests/diag.sh b/tests/diag.sh new file mode 100755 index 00000000..a8f9b1b4 --- /dev/null +++ b/tests/diag.sh @@ -0,0 +1,82 @@ +# this shell script provides commands to the common diag system. It enables +# test scripts to wait for certain conditions and initiate certain actions. +# needs support in config file. +# NOTE: this file should be included with "source diag.sh", as it otherwise is +# not always able to convey back states to the upper-level test driver +# begun 2009-05-27 by rgerhards +# This file is part of the rsyslog project, released under GPLv3 +#set -o xtrace +#export RSYSLOG_DEBUG="debug nostdout" +#export RSYSLOG_DEBUGLOG="log" +case $1 in + 'init') $srcdir/killrsyslog.sh # kill rsyslogd if it runs for some reason + rm -f rsyslogd.started work-*.conf + rm -f work rsyslog.out.log rsyslog.out.log.save # common work files + rm -rf test-spool + mkdir test-spool + ;; + 'exit') rm -f rsyslogd.started work-*.conf + rm -f work rsyslog.out.log rsyslog.out.log.save # common work files + rm -rf test-spool + ;; + 'startup') # start rsyslogd with default params. $2 is the config file name to use + # returns only after successful startup + ../tools/rsyslogd -c4 -u2 -n -irsyslog.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/$2 & + $srcdir/diag.sh wait-startup + ;; + 'wait-startup') # wait for rsyslogd startup + while test ! -f rsyslogd.started; do + true + done + echo "rsyslogd started with pid " `cat rsyslog.pid` + ;; + 'wait-shutdown') # actually, we wait for rsyslog.pid to be deleted + while test -f rsyslog.pid; do + true + done + ;; + 'wait-queueempty') # wait for main message queue to be empty + echo WaitMainQueueEmpty | java -classpath $abs_top_builddir DiagTalker + ;; + 'shutdown-when-empty') # shut rsyslogd down when main queue is empty + $srcdir/diag.sh wait-queueempty + kill `cat rsyslog.pid` + # note: we do not wait for the actual termination! + ;; + 'shutdown-immediate') # shut rsyslogd down without emptying the queue + kill `cat rsyslog.pid` + # note: we do not wait for the actual termination! + ;; + 'tcpflood') # do a tcpflood run and check if it worked params are passed to tcpflood + ./tcpflood $2 $3 $4 $5 $6 $7 $8 + if [ "$?" -ne "0" ]; then + echo "error during tcpflood! see rsyslog.out.log.save for what was written" + cp rsyslog.out.log rsyslog.out.log.save + exit 1 + fi + ;; + 'injectmsg') # inject messages via our inject interface (imdiag) + echo injectmsg $2 $3 $4 $5 | java -classpath $abs_top_builddir DiagTalker + # TODO: some return state checking? (does it really make sense here?) + ;; + 'check-mainq-spool') # check if mainqueue spool files exist, if not abort (we just check .qi) + echo There must exist some files now: + ls -l test-spool + if test ! -f test-spool/mainq.qi; then + echo "error: mainq.qi does not exist where expected to do so!" + ls -l test-spool + exit 1 + fi + ;; + 'seq-check') # do the usual sequence check to see if everything was properly received + rm -f work + sort < rsyslog.out.log > work + ./chkseq -fwork -e$2 $3 + if [ "$?" -ne "0" ]; then + rm -f work rsyslog.out.log + echo "sequence error detected" + exit 1 + fi + ;; + *) echo "invalid argument" $1 +esac diff --git a/tests/diskqueue.sh b/tests/diskqueue.sh index 42018b15..bf1a46fd 100755 --- a/tests/diskqueue.sh +++ b/tests/diskqueue.sh @@ -9,28 +9,10 @@ #export RSYSLOG_DEBUG="debug nostdout" #export RSYSLOG_DEBUGLOG="tmp" echo testing queue disk-only mode -rm -rf test-spool -mkdir test-spool -# enable this, if you need debug output: export RSYSLOG_DEBUG="debug" -rm -f work rsyslog.out.log rsyslog.out.log.save # work files -../tools/rsyslogd -c4 -u2 -n -irsyslog.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/diskqueue.conf & -sleep 1 -echo "rsyslogd started with pid " `cat rsyslog.pid` +source $srcdir/diag.sh init +source $srcdir/diag.sh startup diskqueue.conf # 20000 messages should be enough - the disk test is slow enough ;) -./tcpflood 127.0.0.1 13514 1 20000 -if [ "$?" -ne "0" ]; then - echo "error during tcpflood! see rsyslog.out.log.save for what was written" - cp rsyslog.out.log rsyslog.out.log.save -fi -$srcdir/waitqueueempty.sh # wait until rsyslogd is done processing messages -kill `cat rsyslog.pid` -rm -f work -sort < rsyslog.out.log > work -./chkseq -fwork -e19999 -if [ "$?" -ne "0" ]; then - # rm -f work rsyslog.out.log - echo "sequence error detected" - exit 1 -fi -rm -f work rsyslog.out.log -rm -rf test-spool +source $srcdir/diag.sh tcpflood 127.0.0.1 13514 1 20000 +source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +source $srcdir/diag.sh seq-check 0 19999 +source $srcdir/diag.sh exit diff --git a/tests/imtcp-multiport.sh b/tests/imtcp-multiport.sh index 73ab9558..702f8834 100755 --- a/tests/imtcp-multiport.sh +++ b/tests/imtcp-multiport.sh @@ -8,73 +8,31 @@ # added 2009-05-22 by Rgerhards # This file is part of the rsyslog project, released under GPLv3 echo testing imtcp multiple listeners -rm -f work rsyslog.out.log rsyslog.out.log.save # work files -../tools/rsyslogd -c4 -u2 -n -irsyslog.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/imtcp-multiport.conf & -sleep 1 -echo "rsyslogd started with pid " `cat rsyslog.pid` -./tcpflood 127.0.0.1 13514 1 10000 -if [ "$?" -ne "0" ]; then - echo "error during tcpflood! see rsyslog.out.log.save for what was written" - cp rsyslog.out.log rsyslog.out.log.save -fi -$srcdir/waitqueueempty.sh # wait until rsyslogd is done processing messages -kill `cat rsyslog.pid` -rm -f work -sort < rsyslog.out.log > work -./chkseq -fwork -e9999 -if [ "$?" -ne "0" ]; then - # rm -f work rsyslog.out.log - echo "sequence error detected" - exit 1 -fi -rm -f work rsyslog.out.log +source $srcdir/diag.sh init +source $srcdir/diag.sh startup imtcp-multiport.conf +source $srcdir/diag.sh tcpflood 127.0.0.1 13514 1 10000 +source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +source $srcdir/diag.sh seq-check 0 9999 +source $srcdir/diag.sh exit # # # ### now complete new cycle with other port ### # # -rm -f work rsyslog.out.log rsyslog.out.log.save # work files -../tools/rsyslogd -c4 -u2 -n -irsyslog.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/imtcp-multiport.conf & -sleep 1 -echo "rsyslogd started with pid " `cat rsyslog.pid` -./tcpflood 127.0.0.1 13515 1 10000 -if [ "$?" -ne "0" ]; then - echo "error during tcpflood! see rsyslog.out.log.save for what was written" - cp rsyslog.out.log rsyslog.out.log.save -fi -$srcdir/waitqueueempty.sh # wait until rsyslogd is done processing messages -kill `cat rsyslog.pid` -rm -f work -sort < rsyslog.out.log > work -./chkseq -fwork -e9999 -if [ "$?" -ne "0" ]; then - # rm -f work rsyslog.out.log - echo "sequence error detected" - exit 1 -fi -rm -f work rsyslog.out.log +source $srcdir/diag.sh init +source $srcdir/diag.sh startup imtcp-multiport.conf +source $srcdir/diag.sh tcpflood 127.0.0.1 13515 1 10000 +source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +source $srcdir/diag.sh seq-check 0 9999 +source $srcdir/diag.sh exit # # # ### now complete new cycle with other port ### # # -rm -f work rsyslog.out.log rsyslog.out.log.save # work files -../tools/rsyslogd -c4 -u2 -n -irsyslog.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/imtcp-multiport.conf & -sleep 1 -echo "rsyslogd started with pid " `cat rsyslog.pid` -./tcpflood 127.0.0.1 13516 1 10000 -if [ "$?" -ne "0" ]; then - echo "error during tcpflood! see rsyslog.out.log.save for what was written" - cp rsyslog.out.log rsyslog.out.log.save -fi -$srcdir/waitqueueempty.sh # wait until rsyslogd is done processing messages -kill `cat rsyslog.pid` -rm -f work -sort < rsyslog.out.log > work -./chkseq -fwork -e9999 -if [ "$?" -ne "0" ]; then - # rm -f work rsyslog.out.log - echo "sequence error detected" - exit 1 -fi -rm -f work rsyslog.out.log +source $srcdir/diag.sh init +source $srcdir/diag.sh startup imtcp-multiport.conf +source $srcdir/diag.sh tcpflood 127.0.0.1 13516 1 10000 +source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +source $srcdir/diag.sh seq-check 0 9999 +source $srcdir/diag.sh exit diff --git a/tests/manytcp.sh b/tests/manytcp.sh index 861f12ff..c55eb9c0 100755 --- a/tests/manytcp.sh +++ b/tests/manytcp.sh @@ -1,21 +1,8 @@ -rm -f work rsyslog.out.log rsyslog.out.log.save # work files -../tools/rsyslogd -c4 -u2 -n -irsyslog.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/manytcp.conf & -sleep 1 -echo "rsyslogd started with pid " `cat rsyslog.pid` +# test many concurrent tcp connections +source $srcdir/diag.sh init +source $srcdir/diag.sh startup manytcp.conf # the config file specifies exactly 1100 connections -./tcpflood 127.0.0.1 13514 1000 40000 -if [ "$?" -ne "0" ]; then - echo "error during tcpflood! see rsyslog.out.log.save for what was written" - cp rsyslog.out.log rsyslog.out.log.save -fi -$srcdir/waitqueueempty.sh # wait until rsyslogd is done processing messages -kill `cat rsyslog.pid` -rm -f work -sort < rsyslog.out.log > work -./chkseq -fwork -e39999 -if [ "$?" -ne "0" ]; then - rm -f work rsyslog.out.log - echo "sequence error detected" - exit 1 -fi -rm -f work rsyslog.out.log +source $srcdir/diag.sh tcpflood 127.0.0.1 13514 1000 40000 +source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +source $srcdir/diag.sh seq-check 0 39999 +source $srcdir/diag.sh exit diff --git a/tests/memq-persist.sh b/tests/memq-persist.sh deleted file mode 100755 index e935d8db..00000000 --- a/tests/memq-persist.sh +++ /dev/null @@ -1,47 +0,0 @@ -# Test for memory queue which is persisted at shutdown. The -# plan is to start an instance, emit some data, do a relatively -# fast shutdown and then re-start the engine to process the -# remaining data. -# added 2009-05-25 by Rgerhards -# This file is part of the rsyslog project, released under GPLv3 -# uncomment for debugging support: -#set -o xtrace -#export RSYSLOG_DEBUG="debug nostdout" -#export RSYSLOG_DEBUGLOG="log" -echo testing memory queue persisting to disk -$srcdir/killrsyslog.sh # kill rsyslogd if it runs for some reason -rm -f core.* -rm -rf test-spool -mkdir test-spool -rm -f work rsyslog.out.log rsyslog.out.log.save # work files -#valgrind ../tools/rsyslogd -c4 -u2 -n -irsyslog.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/memq-persist1.conf & -../tools/rsyslogd -c4 -u2 -n -irsyslog.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/memq-persist1.conf & -sleep 1 -echo "rsyslogd started with pid " `cat rsyslog.pid` -# 20000 messages should be enough -./tcpflood 127.0.0.1 13514 1 10000 -if [ "$?" -ne "0" ]; then - echo "error during tcpflood! see rsyslog.out.log.save for what was written" - cp rsyslog.out.log rsyslog.out.log.save -fi -sleep 4 # we need to wait to ensure everything is received (less 1 second would be better) -kill `cat rsyslog.pid` -echo wait for shutdown -$srcdir/waitqueueempty.sh # wait until rsyslogd is done processing messages -echo There must exist some files now: -ls -l test-spool -# restart engine and have rest processed -../tools/rsyslogd -c4 -u2 -n -irsyslog.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/memq-persist2.conf & -sleep 1 -$srcdir/waitqueueempty.sh # wait until rsyslogd is done processing messages -kill `cat rsyslog.pid` -rm -f work -sort < rsyslog.out.log > work -./chkseq -fwork -e9999 -d -if [ "$?" -ne "0" ]; then - rm -f work rsyslog.out.log - echo "sequence error detected" - exit 1 -fi -rm -f work rsyslog.out.log -rm -rf test-spool diff --git a/tests/queue-persist-drvr.sh b/tests/queue-persist-drvr.sh new file mode 100755 index 00000000..ea5386a7 --- /dev/null +++ b/tests/queue-persist-drvr.sh @@ -0,0 +1,28 @@ +# Test for queue data persisting at shutdown. The +# plan is to start an instance, emit some data, do a relatively +# fast shutdown and then re-start the engine to process the +# remaining data. +# added 2009-05-27 by Rgerhards +# This file is part of the rsyslog project, released under GPLv3 +# uncomment for debugging support: +echo testing memory queue persisting to disk, mode $1 +source $srcdir/diag.sh init + +# prepare config +echo \$MainMsgQueueType $1 > work-queuemode.conf +echo "*.* :omtesting:sleep 0 1000" > work-delay.conf + +# inject 5000 msgs, so that we do not hit the high watermark +source $srcdir/diag.sh startup queue-persist.conf +source $srcdir/diag.sh injectmsg 0 5000 +$srcdir/diag.sh shutdown-immediate +$srcdir/diag.sh wait-shutdown +source $srcdir/diag.sh check-mainq-spool + +# restart engine and have rest processed +#remove delay +echo "#" > work-delay.conf +source $srcdir/diag.sh startup queue-persist.conf +source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +source $srcdir/diag.sh seq-check 0 4999 +source $srcdir/diag.sh exit diff --git a/tests/queue-persist.sh b/tests/queue-persist.sh new file mode 100755 index 00000000..999655b1 --- /dev/null +++ b/tests/queue-persist.sh @@ -0,0 +1,11 @@ +# Test for queue data persisting at shutdown. We use the actual driver +# to carry out multiple tests with different queue modes +# added 2009-05-27 by Rgerhards +# This file is part of the rsyslog project, released under GPLv3 +source $srcdir/queue-persist-drvr.sh LinkedList +source $srcdir/queue-persist-drvr.sh FixedArray +# the disk test should not fail, however, the config is extreme and using +# it more or less is a config error +source $srcdir/queue-persist-drvr.sh Disk +# we do not test Direct mode because this absolute can not work in direct mode +# (maybe we should do a fail-type of test?) diff --git a/tests/testsuites/diag-common.conf b/tests/testsuites/diag-common.conf new file mode 100644 index 00000000..9e9e28fe --- /dev/null +++ b/tests/testsuites/diag-common.conf @@ -0,0 +1,16 @@ +# This is a config include file. It sets up rsyslog so that the +# diag system can successfully be used. Also, it generates a file +# "rsyslogd.started" after rsyslogd is initialized. This config file +# should be included in all tests that intend to use common code for +# controlling the daemon. +# NOTE: we assume that rsyslogd's current working directory is +# ./tests (or the distcheck equivalent), in particlular that this +# config file resides in the testsuites subdirectory. +# rgerhards, 2009-05-27 +$ModLoad ../plugins/imdiag/.libs/imdiag +$IMDiagServerRun 13500 + +$template startupfile,"rsyslogd.started" # trick to use relative path names! +:syslogtag, contains, "rsyslogd" ?startupfile + +$ErrorMessagesToStderr off diff --git a/tests/testsuites/diskqueue.conf b/tests/testsuites/diskqueue.conf index 017ee96d..d7f323bc 100644 --- a/tests/testsuites/diskqueue.conf +++ b/tests/testsuites/diskqueue.conf @@ -1,14 +1,11 @@ # Test for queue disk mode (see .sh file for details) # rgerhards, 2009-04-17 +$IncludeConfig testsuites/diag-common.conf + $ModLoad ../plugins/imtcp/.libs/imtcp $MainMsgQueueTimeoutShutdown 10000 $InputTCPServerRun 13514 -$ModLoad ../plugins/imdiag/.libs/imdiag -$IMDiagServerRun 13500 - -$ErrorMessagesToStderr off - # set spool locations and switch queue to disk-only mode $WorkDirectory test-spool $MainMsgQueueFilename mainq diff --git a/tests/testsuites/imtcp-multiport.conf b/tests/testsuites/imtcp-multiport.conf index ec059fe4..9146f6e0 100644 --- a/tests/testsuites/imtcp-multiport.conf +++ b/tests/testsuites/imtcp-multiport.conf @@ -1,16 +1,13 @@ # Test for queue disk mode (see .sh file for details) # rgerhards, 2009-05-22 +$IncludeConfig testsuites/diag-common.conf + $ModLoad ../plugins/imtcp/.libs/imtcp $MainMsgQueueTimeoutShutdown 10000 $InputTCPServerRun 13514 $InputTCPServerRun 13515 $InputTCPServerRun 13516 -$ModLoad ../plugins/imdiag/.libs/imdiag -$IMDiagServerRun 13500 - -$ErrorMessagesToStderr off - $template outfmt,"%msg:F,58:2%\n" $template dynfile,"rsyslog.out.log" # trick to use relative path names! :msg, contains, "msgnum:" ?dynfile;outfmt diff --git a/tests/testsuites/manytcp.conf b/tests/testsuites/manytcp.conf index 3867da46..772ec9ce 100644 --- a/tests/testsuites/manytcp.conf +++ b/tests/testsuites/manytcp.conf @@ -1,16 +1,13 @@ # Test for tcp "flood" testing # rgerhards, 2009-04-08 +$IncludeConfig testsuites/diag-common.conf + $ModLoad ../plugins/imtcp/.libs/imtcp $MainMsgQueueTimeoutShutdown 10000 $MaxOpenFiles 2000 $InputTCPMaxSessions 1100 $InputTCPServerRun 13514 -$ModLoad ../plugins/imdiag/.libs/imdiag -$IMDiagServerRun 13500 - -$ErrorMessagesToStderr off - $template outfmt,"%msg:F,58:2%\n" $template dynfile,"rsyslog.out.log" # trick to use relative path names! :msg, contains, "msgnum:" ?dynfile;outfmt diff --git a/tests/testsuites/memq-persist2.conf b/tests/testsuites/memq-persist2.conf deleted file mode 100644 index 23e29e2f..00000000 --- a/tests/testsuites/memq-persist2.conf +++ /dev/null @@ -1,20 +0,0 @@ -# Test for persisting messages to disk on shutdown -# rgerhards, 2009-04-17 -$ModLoad ../plugins/imtcp/.libs/imtcp -$MainMsgQueueTimeoutShutdown 10000 -$MainMsgQueueSaveOnShutdown on -$InputTCPServerRun 13514 - -$ModLoad ../plugins/imdiag/.libs/imdiag -$IMDiagServerRun 13500 - -$ErrorMessagesToStderr off - -# set spool locations and switch queue to disk-only mode -$WorkDirectory test-spool -$MainMsgQueueFilename mainq -$MainMsgQueueType LinkedList - -$template outfmt,"%msg:F,58:2%\n" -$template dynfile,"rsyslog.out.log" # trick to use relative path names! -:msg, contains, "msgnum:" ?dynfile;outfmt diff --git a/tests/testsuites/memq-persist1.conf b/tests/testsuites/queue-persist.conf index 5240090f..80f8ba30 100644 --- a/tests/testsuites/memq-persist1.conf +++ b/tests/testsuites/queue-persist.conf @@ -1,13 +1,12 @@ -# Test for persisting messages to disk on shutdown +# Test for persisting messages on shutdown # rgerhards, 2009-04-17 +$IncludeConfig testsuites/diag-common.conf + $ModLoad ../plugins/imtcp/.libs/imtcp $MainMsgQueueTimeoutShutdown 1 $MainMsgQueueSaveOnShutdown on $InputTCPServerRun 13514 -$ModLoad ../plugins/imdiag/.libs/imdiag -$IMDiagServerRun 13500 - $ModLoad ../plugins/omtesting/.libs/omtesting $ErrorMessagesToStderr off @@ -15,11 +14,10 @@ $ErrorMessagesToStderr off # set spool locations and switch queue to disk-only mode $WorkDirectory test-spool $MainMsgQueueFilename mainq -$MainMsgQueueType LinkedList +$IncludeConfig work-queuemode.conf $template outfmt,"%msg:F,58:2%\n" $template dynfile,"rsyslog.out.log" # trick to use relative path names! :msg, contains, "msgnum:" ?dynfile;outfmt -# delay execution so that a queue can build up: -*.* :omtesting:sleep 0 1000 +$IncludeConfig work-delay.conf diff --git a/tests/waitqueueempty.sh b/tests/waitqueueempty.sh deleted file mode 100755 index 4825853a..00000000 --- a/tests/waitqueueempty.sh +++ /dev/null @@ -1,5 +0,0 @@ -# wait until main message queue is empty. This is currently done in -# a separate shell script so that we can change the implementation -# at some later point. -- rgerhards, 2009-05-25 -#echo WaitMainQueueEmpty | nc 127.0.0.1 13500 -echo WaitMainQueueEmpty | java -classpath $abs_top_builddir DiagTalker |