diff options
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rwxr-xr-x | tests/rfc5424parser.sh | 12 | ||||
-rw-r--r-- | tests/testsuites/rfc5424parser.conf | 10 |
3 files changed, 25 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 23da9696..a0decacc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -7,6 +7,7 @@ TESTS = $(TESTRUNS) if ENABLE_IMDIAG TESTS += \ stop-localvar.sh \ + rfc5424parser.sh \ arrayqueue.sh \ da-mainmsg-q.sh \ validation-run.sh \ @@ -298,6 +299,8 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ testsuites/rscript_stop2.conf \ stop-localvar.sh \ testsuites/stop-localvar.conf \ + rfc5424parser.sh \ + testsuites/rfc5424parser.conf \ rs_optimizer_pri.sh \ testsuites/rs_optimizer_pr.conf \ rscript_prifilt.sh \ diff --git a/tests/rfc5424parser.sh b/tests/rfc5424parser.sh new file mode 100755 index 00000000..3f5be497 --- /dev/null +++ b/tests/rfc5424parser.sh @@ -0,0 +1,12 @@ +# This file is part of the rsyslog project, released under ASL 2.0 +# rgerhards, 2013-11-22 +echo =============================================================================== +echo \[rfc5424parser.sh\]: testing mmpstrucdata +source $srcdir/diag.sh init +source $srcdir/diag.sh startup rfc5424parser.conf +sleep 1 +source $srcdir/diag.sh tcpflood -m100 -y +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/rfc5424parser.conf b/tests/testsuites/rfc5424parser.conf new file mode 100644 index 00000000..cd90d120 --- /dev/null +++ b/tests/testsuites/rfc5424parser.conf @@ -0,0 +1,10 @@ +$IncludeConfig diag-common.conf + +module(load="../plugins/imtcp/.libs/imtcp") + +template(name="outfmt" type="string" string="%msg:F,58:2%\n") + +input(type="imtcp" port="13514") + +if $msg contains "msgnum" then + action(type="omfile" template="outfmt" file="rsyslog.out.log") |