diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-30 08:48:05 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-30 08:48:05 +0100 |
commit | 44057328a638ca03da0d6eda89fd19367178e6fc (patch) | |
tree | 3d199ac25511d08cd2a4e73299fcde7658d4534b /tests | |
parent | 1ada506e2d90377c2475e103340d8986bf8847f9 (diff) | |
download | rsyslog-44057328a638ca03da0d6eda89fd19367178e6fc.tar.gz rsyslog-44057328a638ca03da0d6eda89fd19367178e6fc.tar.xz rsyslog-44057328a638ca03da0d6eda89fd19367178e6fc.zip |
fix: testbench was broken by recent ruleset queue changes
actually, the runtime dummy was missing some global entities, these
have now been added.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/rulesetmultiqueue.sh | 17 | ||||
-rw-r--r-- | tests/runtime-dummy.c | 2 | ||||
-rw-r--r-- | tests/testsuites/rulesetmultiqueue.conf | 16 |
3 files changed, 35 insertions, 0 deletions
diff --git a/tests/rulesetmultiqueue.sh b/tests/rulesetmultiqueue.sh new file mode 100755 index 00000000..e91f0633 --- /dev/null +++ b/tests/rulesetmultiqueue.sh @@ -0,0 +1,17 @@ +# Test for disk-only queue mode +# This test checks if queue files can be correctly written +# and read back, but it does not test the transition from +# memory to disk mode for DA queues. +# added 2009-04-17 by Rgerhards +# This file is part of the rsyslog project, released under GPLv3 +# uncomment for debugging support: +echo \[diskqueue.sh\]: testing queue disk-only mode +source $srcdir/diag.sh init +source $srcdir/diag.sh startup diskqueue.conf +# 20000 messages should be enough - the disk test is slow enough ;) +sleep 4 +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 wait-shutdown +source $srcdir/diag.sh seq-check 0 19999 +source $srcdir/diag.sh exit diff --git a/tests/runtime-dummy.c b/tests/runtime-dummy.c index 38e6bba1..24431040 100644 --- a/tests/runtime-dummy.c +++ b/tests/runtime-dummy.c @@ -34,12 +34,14 @@ int repeatinterval = 30; int bActExecWhenPrevSusp = 0; int iActExecOnceInterval = 1; int MarkInterval = 30; +void *pMsgQueue = NULL; void cflineClassic(void) {}; void selectorAddList(void) {}; void selectorConstruct(void) {}; void selectorDestruct(void) {}; void getFIOPName(void) {}; +rsRetVal createMainQueue(void) { return RS_RET_ERR; } ruleset_t *pCurrRuleset; /* these are required by some dynamically loaded modules */ diff --git a/tests/testsuites/rulesetmultiqueue.conf b/tests/testsuites/rulesetmultiqueue.conf new file mode 100644 index 00000000..a992c5a5 --- /dev/null +++ b/tests/testsuites/rulesetmultiqueue.conf @@ -0,0 +1,16 @@ +# Test for queue disk mode (see .sh file for details) +# rgerhards, 2009-04-17 +$IncludeConfig diag-common.conf + +$ModLoad ../plugins/imtcp/.libs/imtcp +$MainMsgQueueTimeoutShutdown 10000 +$InputTCPServerRun 13514 + +# set spool locations and switch queue to disk-only mode +$WorkDirectory test-spool +$MainMsgQueueFilename mainq +$MainMsgQueueType disk + +$template outfmt,"%msg:F,58:2%\n" +$template dynfile,"rsyslog.out.log" # trick to use relative path names! +:msg, contains, "msgnum:" ?dynfile;outfmt |