diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-26 14:09:15 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-26 14:09:15 +0200 |
commit | d22f240bc3525f7e112ce44aea6b9f87f8a51c8a (patch) | |
tree | 338334b847fdf1a199a55bdf73d9a1dad02498ed /tests | |
parent | c7b309a662a4310a8b878c036d9440e0b2e345a8 (diff) | |
parent | 6be06d50e328c4b8c79b263e176e6b4e384a03f9 (diff) | |
download | rsyslog-d22f240bc3525f7e112ce44aea6b9f87f8a51c8a.tar.gz rsyslog-d22f240bc3525f7e112ce44aea6b9f87f8a51c8a.tar.xz rsyslog-d22f240bc3525f7e112ce44aea6b9f87f8a51c8a.zip |
Merge branch 'master' into v5-devel
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 6 | ||||
-rw-r--r-- | tests/testsuites/threadingmq.conf | 20 | ||||
-rw-r--r-- | tests/testsuites/threadingmqaq.conf | 24 | ||||
-rwxr-xr-x | tests/threadingmq.sh | 15 | ||||
-rwxr-xr-x | tests/threadingmqaq.sh | 15 |
5 files changed, 80 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index f6bb0587..cbbca074 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -18,6 +18,8 @@ TESTS += omod-if-array.sh \ parsertest.sh \ timestamp.sh \ inputname.sh \ + threadingmq.sh \ + threadingmqaq.sh \ fieldtest.sh endif @@ -116,6 +118,10 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ queue-persist.sh \ queue-persist-drvr.sh \ testsuites/queue-persist.conf \ + threadingmq.sh \ + testsuites/threadingmq.conf \ + threadingmqaq.sh \ + testsuites/threadingmqaq.conf \ DiagTalker.java \ cfg.sh diff --git a/tests/testsuites/threadingmq.conf b/tests/testsuites/threadingmq.conf new file mode 100644 index 00000000..aa5197bb --- /dev/null +++ b/tests/testsuites/threadingmq.conf @@ -0,0 +1,20 @@ +# Threading test, we run a tcp flood to via an +# engine instructed to use multiple threads +# rgerhards, 2009-06-26 +$IncludeConfig diag-common.conf + +$ModLoad ../plugins/imtcp/.libs/imtcp +$MainMsgQueueTimeoutShutdown 10000 +$MaxOpenFiles 2000 +$InputTCPMaxSessions 1100 +$InputTCPServerRun 13514 + +$MainMsgQueueWorkerThreadMinimumMessages 10 +$MainMsgQueueWorkerThreads 5 + +$template outfmt,"%msg:F,58:2%\n" +$template dynfile,"rsyslog.out.log" # trick to use relative path names! +# write quickly to the output file: +$OMFileFlushOnTXEnd off +$OMFileIOBufferSize 256k +:msg, contains, "msgnum:" ?dynfile;outfmt diff --git a/tests/testsuites/threadingmqaq.conf b/tests/testsuites/threadingmqaq.conf new file mode 100644 index 00000000..f1bb72df --- /dev/null +++ b/tests/testsuites/threadingmqaq.conf @@ -0,0 +1,24 @@ +# Threading test, we run a tcp flood to via an +# engine instructed to use multiple threads +# rgerhards, 2009-06-26 +$IncludeConfig diag-common.conf + +$ModLoad ../plugins/imtcp/.libs/imtcp +$MainMsgQueueTimeoutShutdown 10000 +$MaxOpenFiles 2000 +$InputTCPMaxSessions 1100 +$InputTCPServerRun 13514 + +$MainMsgQueueWorkerThreadMinimumMessages 10 +$MainMsgQueueWorkerThreads 5 + +$template outfmt,"%msg:F,58:2%\n" +$template dynfile,"rsyslog.out.log" # trick to use relative path names! +# write quickly to the output file: +$OMFileFlushOnTXEnd off +$OMFileIOBufferSize 256k +# This time, also run the action queue detached +$ActionQueueWorkerThreadMinimumMessages 10 +$ActionQueueWorkerThreads 5 +$ActionQueueType LinkedList +:msg, contains, "msgnum:" ?dynfile;outfmt diff --git a/tests/threadingmq.sh b/tests/threadingmq.sh new file mode 100755 index 00000000..5c29ec60 --- /dev/null +++ b/tests/threadingmq.sh @@ -0,0 +1,15 @@ +# test many concurrent tcp connections +# we send 100,000 messages in the hopes that his puts at least a little bit +# of pressure on the threading subsystem. To really prove it, we would need to +# push messages for several minutes, but that takes too long during the +# automatted tests (hint: do this manually after suspect changes). Thankfully, +# in practice many threading bugs result in an abort rather quickly and these +# should be covered by this test here. +# rgerhards, 2009-06-26 +echo TEST: threadingmq.sh - main queue concurrency +source $srcdir/diag.sh init +source $srcdir/diag.sh startup threadingmq.conf +source $srcdir/diag.sh tcpflood 127.0.0.1 13514 2 100000 +source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +source $srcdir/diag.sh seq-check 0 99999 +source $srcdir/diag.sh exit diff --git a/tests/threadingmqaq.sh b/tests/threadingmqaq.sh new file mode 100755 index 00000000..009551fd --- /dev/null +++ b/tests/threadingmqaq.sh @@ -0,0 +1,15 @@ +# test many concurrent tcp connections +# we send 100,000 messages in the hopes that his puts at least a little bit +# of pressure on the threading subsystem. To really prove it, we would need to +# push messages for several minutes, but that takes too long during the +# automatted tests (hint: do this manually after suspect changes). Thankfully, +# in practice many threading bugs result in an abort rather quickly and these +# should be covered by this test here. +# rgerhards, 2009-06-26 +echo TEST: threadingmqaq.sh - main/action queue concurrency +source $srcdir/diag.sh init +source $srcdir/diag.sh startup threadingmqaq.conf +source $srcdir/diag.sh tcpflood 127.0.0.1 13514 2 100000 +source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +source $srcdir/diag.sh seq-check 0 99999 +source $srcdir/diag.sh exit |