diff options
author | Michael Biebl <biebl@debian.org> | 2014-04-03 03:08:50 +0200 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2014-04-03 03:08:50 +0200 |
commit | 9374a46543e9c43c009f80def8c3b2506b0b377e (patch) | |
tree | 8853fd40ee8d55ff24304ff8a4421640f3493c58 /tests/testsuites | |
parent | 209e193f14ec562df5aad945f04cd88b227cc602 (diff) | |
download | rsyslog-9374a46543e9c43c009f80def8c3b2506b0b377e.tar.gz |
Imported Upstream version 8.2.0upstream/8.2.0
Diffstat (limited to 'tests/testsuites')
-rw-r--r-- | tests/testsuites/execonlywhenprevsuspended.conf | 1 | ||||
-rw-r--r-- | tests/testsuites/execonlywhenprevsuspended_multiwrkr.conf | 12 | ||||
-rw-r--r-- | tests/testsuites/global_vars.conf | 17 | ||||
-rw-r--r-- | tests/testsuites/rulesetmultiqueue-v6.conf | 34 | ||||
-rw-r--r-- | tests/testsuites/sndrcv_relp_rcvr.conf | 9 | ||||
-rw-r--r-- | tests/testsuites/sndrcv_relp_sender.conf | 8 | ||||
-rw-r--r-- | tests/testsuites/stop.conf | 11 |
7 files changed, 92 insertions, 0 deletions
diff --git a/tests/testsuites/execonlywhenprevsuspended.conf b/tests/testsuites/execonlywhenprevsuspended.conf index 04dc6b5..8f9263d 100644 --- a/tests/testsuites/execonlywhenprevsuspended.conf +++ b/tests/testsuites/execonlywhenprevsuspended.conf @@ -1,5 +1,6 @@ # See main .sh file for info # rgerhards, 2010-06-23 +main_queue(queue.workerthreads="1") $IncludeConfig diag-common.conf # omtesting provides the ability to cause "SUSPENDED" action state diff --git a/tests/testsuites/execonlywhenprevsuspended_multiwrkr.conf b/tests/testsuites/execonlywhenprevsuspended_multiwrkr.conf new file mode 100644 index 0000000..7af2536 --- /dev/null +++ b/tests/testsuites/execonlywhenprevsuspended_multiwrkr.conf @@ -0,0 +1,12 @@ +main_queue(queue.dequeueBatchSize="10" queue.workerthreads="3" queue.workerthreadminimummessages="100") +$IncludeConfig diag-common.conf + +# omtesting provides the ability to cause "SUSPENDED" action state +$ModLoad ../plugins/omtesting/.libs/omtesting + +$MainMsgQueueTimeoutShutdown 100000 +$template outfmt,"%msg:F,58:2%\n" + +:msg, contains, "msgnum:" :omtesting:fail 2 0 +$ActionExecOnlyWhenPreviousIsSuspended on +& ./rsyslog.out.log;outfmt diff --git a/tests/testsuites/global_vars.conf b/tests/testsuites/global_vars.conf new file mode 100644 index 0000000..0d1a3cb --- /dev/null +++ b/tests/testsuites/global_vars.conf @@ -0,0 +1,17 @@ +$IncludeConfig diag-common.conf + +$MainMsgQueueTimeoutShutdown 10000 + +module(load="../plugins/imtcp/.libs/imtcp") +input(type="imtcp" port="13514") + +template(name="outfmt" type="string" string="%$/msgnum%\n") +template(name="dynfile" type="string" string="rsyslog.out.log") /* trick to use relative path names! */ + +if $/msgnum == "" then + set $/msgnum = 0; + +if $msg contains "msgnum:" then { + action(type="omfile" dynaFile="dynfile" template="outfmt") + set $/msgnum = $/msgnum + 1; +} diff --git a/tests/testsuites/rulesetmultiqueue-v6.conf b/tests/testsuites/rulesetmultiqueue-v6.conf new file mode 100644 index 0000000..3aeaa33 --- /dev/null +++ b/tests/testsuites/rulesetmultiqueue-v6.conf @@ -0,0 +1,34 @@ +# Test for multiple ruleset queues (see .sh file for details) +# rgerhards, 2009-10-30 +$IncludeConfig diag-common.conf +$ModLoad ../plugins/imtcp/.libs/imtcp +$MainMsgQueueTimeoutShutdown 10000 + +# general definition +$template outfmt,"%msg:F,58:2%\n" + +# create the individual rulesets +$template dynfile1,"rsyslog.out1.log" # trick to use relative path names! +ruleset(name="file1" queue.type="linkedList") { + :msg, contains, "msgnum:" ?dynfile1;outfmt +} + +$template dynfile2,"rsyslog.out2.log" # trick to use relative path names! +ruleset(name="file2" queue.type="linkedList") { + :msg, contains, "msgnum:" ?dynfile2;outfmt +} + +$template dynfile3,"rsyslog.out3.log" # trick to use relative path names! +ruleset(name="file3" queue.type="linkedList") { + :msg, contains, "msgnum:" ?dynfile3;outfmt +} + +# start listeners and bind them to rulesets +$InputTCPServerBindRuleset file1 +$InputTCPServerRun 13514 + +$InputTCPServerBindRuleset file2 +$InputTCPServerRun 13515 + +$InputTCPServerBindRuleset file3 +$InputTCPServerRun 13516 diff --git a/tests/testsuites/sndrcv_relp_rcvr.conf b/tests/testsuites/sndrcv_relp_rcvr.conf new file mode 100644 index 0000000..d79f714 --- /dev/null +++ b/tests/testsuites/sndrcv_relp_rcvr.conf @@ -0,0 +1,9 @@ +# rgerhards, 2013-12-10 +$IncludeConfig diag-common.conf + +module(load="../plugins/imrelp/.libs/imrelp") +# then SENDER sends to this port (not tcpflood!) +input(type="imrelp" port="13515") + +$template outfmt,"%msg:F,58:2%\n" +:msg, contains, "msgnum:" action(type="omfile" file="rsyslog.out.log" template="outfmt") diff --git a/tests/testsuites/sndrcv_relp_sender.conf b/tests/testsuites/sndrcv_relp_sender.conf new file mode 100644 index 0000000..7706622 --- /dev/null +++ b/tests/testsuites/sndrcv_relp_sender.conf @@ -0,0 +1,8 @@ +# rgerhards, 2013-12-10 +$IncludeConfig diag-common2.conf + +module(load="../plugins/omrelp/.libs/omrelp") +module(load="../plugins/imptcp/.libs/imptcp") +input(type="imptcp" port="13514") /* this port for tcpflood! */ + +action(type="omrelp" protocol="tcp" target="127.0.0.1" port="13515") diff --git a/tests/testsuites/stop.conf b/tests/testsuites/stop.conf new file mode 100644 index 0000000..84beab8 --- /dev/null +++ b/tests/testsuites/stop.conf @@ -0,0 +1,11 @@ +$IncludeConfig diag-common.conf + +module(load="../plugins/imtcp/.libs/imtcp") +input(type="imtcp" port="13514") + +if $msg contains "00000001" then + stop + +template(name="outfmt" type="string" string="%msg:F,58:2%\n") +if $msg contains "msgnum:" then + action(type="omfile" file="rsyslog.out.log" template="outfmt") |