summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-03-06 15:30:57 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-03-06 15:30:57 +0100
commitcd61ecd459d7ba915ac5b31743e7ded8db62e30e (patch)
treee2aa93561263af1cdbd9adc9c36920d98567d034 /tests
parentbe146bf818a12d71c4ddce1d9278b9ae0c27329f (diff)
downloadrsyslog-cd61ecd459d7ba915ac5b31743e7ded8db62e30e.tar.gz
rsyslog-cd61ecd459d7ba915ac5b31743e7ded8db62e30e.tar.xz
rsyslog-cd61ecd459d7ba915ac5b31743e7ded8db62e30e.zip
added additional test for repeated message reduction (with valgrind)
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am3
-rw-r--r--tests/testsuites/udp-msgreduc-orgmsg-vg.conf11
-rwxr-xr-xtests/udp-msgreduc-orgmsg-vg.sh18
3 files changed, 32 insertions, 0 deletions
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