diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rwxr-xr-x | tests/daqueue-persist.sh | 1 | ||||
-rwxr-xr-x | tests/diskqueue.sh | 1 | ||||
-rwxr-xr-x | tests/rs_optimizer_pri.sh | 17 | ||||
-rw-r--r-- | tests/testsuites/rs_optimizer_pri.conf | 8 |
5 files changed, 30 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index fd1dbce1..13d87dec 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -72,6 +72,7 @@ TESTS += \ rscript_prifilt.sh \ rscript_optimizer1.sh \ rscript_ruleset_call.sh \ + rs_optimizer_pri.sh \ cee_simple.sh \ cee_diskqueue.sh \ incltest.sh \ @@ -292,6 +293,8 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ testsuites/rscript_stop2.conf \ stop-localvar.sh \ testsuites/stop-localvar.conf \ + rs_optimizer_pri.sh \ + testsuites/rs_optimizer_pr.conf \ rscript_prifilt.sh \ testsuites/rscript_prifilt.conf \ rscript_optimizer1.sh \ diff --git a/tests/daqueue-persist.sh b/tests/daqueue-persist.sh index feb2a347..0781a7dc 100755 --- a/tests/daqueue-persist.sh +++ b/tests/daqueue-persist.sh @@ -2,6 +2,7 @@ # 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 +echo =============================================================================== echo \[daqueue-persist.sh\]: test data persisting at shutdown source $srcdir/daqueue-persist-drvr.sh LinkedList source $srcdir/daqueue-persist-drvr.sh FixedArray diff --git a/tests/diskqueue.sh b/tests/diskqueue.sh index b871e9eb..853a836a 100755 --- a/tests/diskqueue.sh +++ b/tests/diskqueue.sh @@ -5,6 +5,7 @@ # added 2009-04-17 by Rgerhards # This file is part of the rsyslog project, released under GPLv3 # uncomment for debugging support: +echo =============================================================================== echo \[diskqueue.sh\]: testing queue disk-only mode # uncomment for debugging support: #export RSYSLOG_DEBUG="debug nostdout noprintmutexaction" diff --git a/tests/rs_optimizer_pri.sh b/tests/rs_optimizer_pri.sh new file mode 100755 index 00000000..4d6e4637 --- /dev/null +++ b/tests/rs_optimizer_pri.sh @@ -0,0 +1,17 @@ +# Test for the RainerScript optimizer, folding of +# syslogfacility/priority-text to prifilt. Unfortunately, we cannot yet +# automatically detect if the optimizer does not correctly fold, but we +# can at least detect if it segfaults or otherwise creates incorrect code. +# This file is part of the rsyslog project, released under ASL 2.0 +# rgerhards, 2013-11-20 +echo =============================================================================== +echo \[rs_optimizer_pri.sh\]: testing RainerScript PRI optimizer +source $srcdir/diag.sh init +source $srcdir/diag.sh startup rs_optimizer_pri.conf +sleep 1 +source $srcdir/diag.sh tcpflood -m100 # correct facility +source $srcdir/diag.sh tcpflood -m100 -P175 # incorrect facility --> must be ignored +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 99 +source $srcdir/diag.sh exit diff --git a/tests/testsuites/rs_optimizer_pri.conf b/tests/testsuites/rs_optimizer_pri.conf new file mode 100644 index 00000000..9ff27dc8 --- /dev/null +++ b/tests/testsuites/rs_optimizer_pri.conf @@ -0,0 +1,8 @@ +$IncludeConfig diag-common.conf +template(name="outfmt" type="string" string="%msg:F,58:2%\n") + +module(load="../plugins/imtcp/.libs/imtcp") +input(type="imtcp" port="13514") + +if $syslogfacility-text == "local4" then + action(type="omfile" template="outfmt" file="rsyslog.out.log") |