From cd61ecd459d7ba915ac5b31743e7ded8db62e30e Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Sun, 6 Mar 2011 15:30:57 +0100 Subject: added additional test for repeated message reduction (with valgrind) --- tests/Makefile.am | 3 +++ tests/testsuites/udp-msgreduc-orgmsg-vg.conf | 11 +++++++++++ tests/udp-msgreduc-orgmsg-vg.sh | 18 ++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 tests/testsuites/udp-msgreduc-orgmsg-vg.conf create mode 100755 tests/udp-msgreduc-orgmsg-vg.sh diff --git a/tests/Makefile.am b/tests/Makefile.am index 059f951f..1268710a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -48,6 +48,7 @@ TESTS = $(TESTRUNS) cfg.sh \ imuxsock_traillf_root.sh \ imuxsock_ccmiddle_root.sh \ udp-msgreduc-vg.sh \ + udp-msgreduc-orgmsg-vg.sh \ queue-persist.sh if ENABLE_IMPTCP @@ -204,6 +205,8 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ testsuites/imtcp-tls-basic.conf \ imtcp-multiport.sh \ testsuites/imtcp-multiport.conf \ + udp-msgreduc-orgmsg-vg.sh \ + testsuites/udp-msgreduc-orgmsg-vg.conf \ udp-msgreduc-vg.sh \ testsuites/udp-msgreduc-vg.conf \ manytcp.sh \ diff --git a/tests/testsuites/udp-msgreduc-orgmsg-vg.conf b/tests/testsuites/udp-msgreduc-orgmsg-vg.conf new file mode 100644 index 00000000..5e80e49b --- /dev/null +++ b/tests/testsuites/udp-msgreduc-orgmsg-vg.conf @@ -0,0 +1,11 @@ +# Test for queue disk mode (see .sh file for details) +# rgerhards, 2009-05-22 +$IncludeConfig diag-common.conf + +$ModLoad ../plugins/imudp/.libs/imudp +$UDPServerRun 13514 +$RepeatedMsgReduction on +$RepeatedMsgContainsOriginalMsg on + +$template outfmt,"%msg:F,58:2%\n" +*.* ./rsyslog.out.log;outfmt diff --git a/tests/udp-msgreduc-orgmsg-vg.sh b/tests/udp-msgreduc-orgmsg-vg.sh new file mode 100755 index 00000000..1594c89a --- /dev/null +++ b/tests/udp-msgreduc-orgmsg-vg.sh @@ -0,0 +1,18 @@ +# check if valgrind violations occur. Correct output is not checked. +# added 2011-03-01 by Rgerhards +# This file is part of the rsyslog project, released under GPLv3 +echo =============================================================================== +echo \[udp-msgreduc-orgmsg-vg.sh\]: testing msg reduction via udp, with org message +source $srcdir/diag.sh init +source $srcdir/diag.sh startup-vg udp-msgreduc-orgmsg-vg.conf +source $srcdir/diag.sh wait-startup +./tcpflood -t 127.0.0.1 -m 4 -r -Tudp -M "<133>2011-03-01T11:22:12Z host tag msgh ..." +./tcpflood -t 127.0.0.1 -m 1 -r -Tudp -M "<133>2011-03-01T11:22:12Z host tag msgh ...x" +source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +source $srcdir/diag.sh wait-shutdown-vg +if [ "$RSYSLOGD_EXIT" -eq "10" ] +then + echo "udp-msgreduc-orgmsg-vg.sh FAILED" + exit 1 +fi +source $srcdir/diag.sh exit -- cgit