summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-03-11 10:24:58 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-03-11 10:24:58 +0100
commit6c3ef4dacfa0a0fb0099299e30335c788704fe2a (patch)
treecb43da8a6fd9508f872059d6dada70ed02348b10 /tests
parentcd61ecd459d7ba915ac5b31743e7ded8db62e30e (diff)
parentfd26a42bdc04eaf497cafd9ef806a54f3de1a7e9 (diff)
downloadrsyslog-6c3ef4dacfa0a0fb0099299e30335c788704fe2a.tar.gz
rsyslog-6c3ef4dacfa0a0fb0099299e30335c788704fe2a.tar.xz
rsyslog-6c3ef4dacfa0a0fb0099299e30335c788704fe2a.zip
Merge branch 'v5-beta'
Conflicts: ChangeLog configure.ac doc/manual.html plugins/omlibdbi/omlibdbi.c tests/Makefile.am tests/diag.sh
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am60
-rwxr-xr-xtests/diag.sh7
-rwxr-xr-xtests/discard-allmark-vg.sh13
-rwxr-xr-xtests/discard-allmark.sh10
-rwxr-xr-xtests/discard-rptdmsg-vg.sh13
-rwxr-xr-xtests/discard-rptdmsg.sh10
-rwxr-xr-xtests/imtcp_conndrop.sh4
-rwxr-xr-xtests/libdbi-asyn.sh13
-rwxr-xr-xtests/libdbi-basic-vg.sh16
-rwxr-xr-xtests/libdbi-basic.sh13
-rwxr-xr-xtests/mysql-asyn-vg.sh14
-rwxr-xr-xtests/mysql-asyn.sh13
-rwxr-xr-xtests/mysql-basic-vg.sh14
-rwxr-xr-xtests/mysql-basic.sh13
-rw-r--r--tests/rt-init.c1
-rwxr-xr-xtests/tcp-msgreduc-vg.sh16
-rw-r--r--tests/testconfgen.c72
-rw-r--r--tests/testsuites/discard-allmark.conf15
-rw-r--r--tests/testsuites/discard-rptdmsg.conf15
-rw-r--r--tests/testsuites/libdbi-asyn.conf12
-rw-r--r--tests/testsuites/libdbi-basic.conf9
-rw-r--r--tests/testsuites/mysql-asyn.conf5
-rw-r--r--tests/testsuites/mysql-basic.conf4
-rw-r--r--tests/testsuites/mysql-select-msg.sql2
-rw-r--r--tests/testsuites/mysql-truncate.sql2
-rw-r--r--tests/testsuites/tcp-msgreduc-vg.conf10
26 files changed, 370 insertions, 6 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1268710a..8a42cc59 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,9 +1,11 @@
if ENABLE_TESTBENCH
TESTRUNS = rt_init rscript
check_PROGRAMS = $(TESTRUNS) ourtail nettester tcpflood chkseq msleep randomgen diagtalker uxsockrcvr syslog_caller syslog_inject
-TESTS = $(TESTRUNS) cfg.sh \
+TESTS = $(TESTRUNS) cfg.sh
+
+if ENABLE_IMDIAG
+TESTS += \
arrayqueue.sh \
- linkedlistqueue.sh \
da-mainmsg-q.sh \
validation-run.sh \
imtcp-multiport.sh \
@@ -50,6 +52,37 @@ TESTS = $(TESTRUNS) cfg.sh \
udp-msgreduc-vg.sh \
udp-msgreduc-orgmsg-vg.sh \
queue-persist.sh
+ discard-rptdmsg.sh \
+ discard-allmark.sh \
+ discard.sh \
+ queue-persist.sh \
+ linkedlistqueue.sh
+endif
+
+if HAVE_VALGRIND
+TESTS += \
+ discard-rptdmsg-vg.sh \
+ discard-allmark-vg.sh \
+ tcp-msgreduc-vg.sh
+endif
+
+
+if ENABLE_MYSQL_TESTS
+TESTS += \
+ mysql-basic.sh \
+ mysql-asyn.sh
+if ENABLE_OMLIBDBI
+TESTS += \
+ libdbi-basic.sh \
+ libdbi-asyn.sh
+endif
+if HAVE_VALGRIND
+TESTS += \
+ mysql-basic-vg.sh \
+ mysql-asyn-vg.sh
+endif
+endif
+
if ENABLE_IMPTCP
TESTS += \
@@ -81,7 +114,6 @@ TESTS += omod-if-array.sh \
inputname.sh \
threadingmq.sh \
threadingmqaq.sh \
- discard.sh \
badqi.sh \
tabescape_dflt.sh \
tabescape_off.sh \
@@ -89,9 +121,11 @@ TESTS += omod-if-array.sh \
endif
if ENABLE_OMRULESET
+if ENABLE_IMDIAG
TESTS += omruleset.sh \
omruleset-queue.sh
endif
+endif
if ENABLE_EXTENDED_TESTS
TESTS += random.sh
@@ -223,6 +257,8 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
testsuites/imtcp_conndrop.conf \
imtcp_addtlframedelim.sh \
testsuites/imtcp_addtlframedelim.conf \
+ tcp-msgreduc-vg.sh \
+ testsuites/./tcp-msgreduc-vg.conf \
inputname.sh \
testsuites/inputname_imtcp.conf \
testsuites/1.inputname_imtcp_12514 \
@@ -231,6 +267,12 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
omod-if-array.sh \
discard.sh \
testsuites/discard.conf \
+ discard-rptdmsg.sh \
+ discard-rptdmsg-vg.sh \
+ testsuites/discard-rptdmsg.conf \
+ discard-allmark.sh \
+ discard-allmark-vg.sh \
+ testsuites/discard-allmark.conf \
diag.sh \
testsuites/diag-common.conf \
testsuites/diag-common2.conf \
@@ -344,6 +386,18 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
imuxsock_ccmiddle_root.sh \
testsuites/imuxsock_ccmiddle_root.conf \
resultdata/imuxsock_ccmiddle.log \
+ testsuites/mysql-truncate.sql \
+ testsuites/mysql-select-msg.sql \
+ libdbi-basic.sh \
+ testsuites/libdbi-basic.conf \
+ libdbi-asyn.sh \
+ testsuites/libdbi-asyn.conf \
+ mysql-basic.sh \
+ mysql-basic-vg.sh \
+ testsuites/mysql-basic.conf \
+ mysql-asyn.sh \
+ mysql-asyn-vg.sh \
+ testsuites/mysql-asyn.conf \
cfg.sh
ourtail_SOURCES = ourtail.c
diff --git a/tests/diag.sh b/tests/diag.sh
index 64b507e6..e8e3ce1c 100755
--- a/tests/diag.sh
+++ b/tests/diag.sh
@@ -75,6 +75,13 @@ case $1 in
exit 1
fi
;;
+ 'check-exit-vg') # wait for main message queue to be empty. $2 is the instance.
+ if [ "$RSYSLOGD_EXIT" -eq "10" ]
+ then
+ echo "valgrind run FAILED with exceptions - terminating"
+ exit 1
+ fi
+ ;;
'wait-queueempty') # wait for main message queue to be empty. $2 is the instance.
if [ "$2" == "2" ]
then
diff --git a/tests/discard-allmark-vg.sh b/tests/discard-allmark-vg.sh
new file mode 100755
index 00000000..57ce8e3e
--- /dev/null
+++ b/tests/discard-allmark-vg.sh
@@ -0,0 +1,13 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[discard-allmark.sh\]: testing discard-allmark functionality
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup-vg discard-allmark.conf
+source $srcdir/diag.sh tcpflood -m10 -i1
+# we need to give rsyslog a little time to settle the receiver
+./msleep 1500
+source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
+source $srcdir/diag.sh wait-shutdown-vg
+source $srcdir/diag.sh check-exit-vg
+source $srcdir/diag.sh seq-check 2 10
+source $srcdir/diag.sh exit
diff --git a/tests/discard-allmark.sh b/tests/discard-allmark.sh
new file mode 100755
index 00000000..eb46ae70
--- /dev/null
+++ b/tests/discard-allmark.sh
@@ -0,0 +1,10 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[discard-allmark.sh\]: testing discard-allmark functionality
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup discard-allmark.conf
+source $srcdir/diag.sh tcpflood -m10 -i1
+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 2 10
+source $srcdir/diag.sh exit
diff --git a/tests/discard-rptdmsg-vg.sh b/tests/discard-rptdmsg-vg.sh
new file mode 100755
index 00000000..f56ac597
--- /dev/null
+++ b/tests/discard-rptdmsg-vg.sh
@@ -0,0 +1,13 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[discard-rptdmsg.sh\]: testing discard-rptdmsg functionality
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup-vg discard-rptdmsg.conf
+source $srcdir/diag.sh tcpflood -m10 -i1
+# we need to give rsyslog a little time to settle the receiver
+./msleep 1500
+source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
+source $srcdir/diag.sh wait-shutdown-vg
+source $srcdir/diag.sh check-exit-vg
+source $srcdir/diag.sh seq-check 2 10
+source $srcdir/diag.sh exit
diff --git a/tests/discard-rptdmsg.sh b/tests/discard-rptdmsg.sh
new file mode 100755
index 00000000..a8be110c
--- /dev/null
+++ b/tests/discard-rptdmsg.sh
@@ -0,0 +1,10 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[discard-rptdmsg.sh\]: testing discard-rptdmsg functionality
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup discard-rptdmsg.conf
+source $srcdir/diag.sh tcpflood -m10 -i1
+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 2 10
+source $srcdir/diag.sh exit
diff --git a/tests/imtcp_conndrop.sh b/tests/imtcp_conndrop.sh
index 2caa0ce2..0bfcd99c 100755
--- a/tests/imtcp_conndrop.sh
+++ b/tests/imtcp_conndrop.sh
@@ -6,10 +6,10 @@ echo ===========================================================================
echo TEST: \[imtcp_conndrop.sh\]: test imtcp with random connection drops
cat rsyslog.action.1.include
source $srcdir/diag.sh init
-source $srcdir/diag.sh startup imptcp_large.conf
+source $srcdir/diag.sh startup imtcp_conndrop.conf
# 100 byte messages to gain more practical data use
source $srcdir/diag.sh tcpflood -c20 -m50000 -r -d100 -P129 -D
-sleep 4 # due to large messages, we need this time for the tcp receiver to settle...
+sleep 10 # due to large messages, we need this time for the tcp receiver to settle...
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
source $srcdir/diag.sh wait-shutdown # and wait for it to terminate
source $srcdir/diag.sh seq-check 0 49999 -E
diff --git a/tests/libdbi-asyn.sh b/tests/libdbi-asyn.sh
new file mode 100755
index 00000000..0076da9c
--- /dev/null
+++ b/tests/libdbi-asyn.sh
@@ -0,0 +1,13 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[libdbi-asyn.sh\]: asyn test for libdbi functionality
+source $srcdir/diag.sh init
+mysql --user=rsyslog --password=testbench < testsuites/mysql-truncate.sql
+source $srcdir/diag.sh startup libdbi-asyn.conf
+source $srcdir/diag.sh injectmsg 0 50000
+source $srcdir/diag.sh shutdown-when-empty
+source $srcdir/diag.sh wait-shutdown
+# note "-s" is requried to suppress the select "field header"
+mysql -s --user=rsyslog --password=testbench < testsuites/mysql-select-msg.sql > rsyslog.out.log
+source $srcdir/diag.sh seq-check 0 49999
+source $srcdir/diag.sh exit
diff --git a/tests/libdbi-basic-vg.sh b/tests/libdbi-basic-vg.sh
new file mode 100755
index 00000000..75d12857
--- /dev/null
+++ b/tests/libdbi-basic-vg.sh
@@ -0,0 +1,16 @@
+# This file is part of the rsyslog project, released under GPLv3
+# this test is currently not included in the testbench as libdbi
+# itself seems to have a memory leak
+echo ===============================================================================
+echo \[libdbi-basic.sh\]: basic test for libdbi-basic functionality via mysql
+source $srcdir/diag.sh init
+mysql --user=rsyslog --password=testbench < testsuites/mysql-truncate.sql
+source $srcdir/diag.sh startup-vg libdbi-basic.conf
+source $srcdir/diag.sh injectmsg 0 5000
+source $srcdir/diag.sh shutdown-when-empty
+source $srcdir/diag.sh wait-shutdown-vg
+source $srcdir/diag.sh check-exit-vg
+# note "-s" is requried to suppress the select "field header"
+mysql -s --user=rsyslog --password=testbench < testsuites/mysql-select-msg.sql > rsyslog.out.log
+source $srcdir/diag.sh seq-check 0 4999
+source $srcdir/diag.sh exit
diff --git a/tests/libdbi-basic.sh b/tests/libdbi-basic.sh
new file mode 100755
index 00000000..a854a565
--- /dev/null
+++ b/tests/libdbi-basic.sh
@@ -0,0 +1,13 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[libdbi-basic.sh\]: basic test for libdbi-basic functionality via mysql
+source $srcdir/diag.sh init
+mysql --user=rsyslog --password=testbench < testsuites/mysql-truncate.sql
+source $srcdir/diag.sh startup libdbi-basic.conf
+source $srcdir/diag.sh injectmsg 0 5000
+source $srcdir/diag.sh shutdown-when-empty
+source $srcdir/diag.sh wait-shutdown
+# note "-s" is requried to suppress the select "field header"
+mysql -s --user=rsyslog --password=testbench < testsuites/mysql-select-msg.sql > rsyslog.out.log
+source $srcdir/diag.sh seq-check 0 4999
+source $srcdir/diag.sh exit
diff --git a/tests/mysql-asyn-vg.sh b/tests/mysql-asyn-vg.sh
new file mode 100755
index 00000000..dfe68665
--- /dev/null
+++ b/tests/mysql-asyn-vg.sh
@@ -0,0 +1,14 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[mysql-asyn.sh\]: asyn test for mysql functionality
+source $srcdir/diag.sh init
+mysql --user=rsyslog --password=testbench < testsuites/mysql-truncate.sql
+source $srcdir/diag.sh startup-vg mysql-asyn.conf
+source $srcdir/diag.sh injectmsg 0 50000
+source $srcdir/diag.sh shutdown-when-empty
+source $srcdir/diag.sh wait-shutdown-vg
+source $srcdir/diag.sh check-exit-vg
+# note "-s" is requried to suppress the select "field header"
+mysql -s --user=rsyslog --password=testbench < testsuites/mysql-select-msg.sql > rsyslog.out.log
+source $srcdir/diag.sh seq-check 0 49999
+source $srcdir/diag.sh exit
diff --git a/tests/mysql-asyn.sh b/tests/mysql-asyn.sh
new file mode 100755
index 00000000..de6d6fde
--- /dev/null
+++ b/tests/mysql-asyn.sh
@@ -0,0 +1,13 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[mysql-asyn.sh\]: asyn test for mysql functionality
+source $srcdir/diag.sh init
+mysql --user=rsyslog --password=testbench < testsuites/mysql-truncate.sql
+source $srcdir/diag.sh startup mysql-asyn.conf
+source $srcdir/diag.sh injectmsg 0 50000
+source $srcdir/diag.sh shutdown-when-empty
+source $srcdir/diag.sh wait-shutdown
+# note "-s" is requried to suppress the select "field header"
+mysql -s --user=rsyslog --password=testbench < testsuites/mysql-select-msg.sql > rsyslog.out.log
+source $srcdir/diag.sh seq-check 0 49999
+source $srcdir/diag.sh exit
diff --git a/tests/mysql-basic-vg.sh b/tests/mysql-basic-vg.sh
new file mode 100755
index 00000000..215f41f0
--- /dev/null
+++ b/tests/mysql-basic-vg.sh
@@ -0,0 +1,14 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[mysql-basic-vg.sh\]: basic test for mysql-basic functionality/valgrind
+source $srcdir/diag.sh init
+mysql --user=rsyslog --password=testbench < testsuites/mysql-truncate.sql
+source $srcdir/diag.sh startup-vg mysql-basic.conf
+source $srcdir/diag.sh injectmsg 0 5000
+source $srcdir/diag.sh shutdown-when-empty
+source $srcdir/diag.sh wait-shutdown-vg
+source $srcdir/diag.sh check-exit-vg
+# note "-s" is requried to suppress the select "field header"
+mysql -s --user=rsyslog --password=testbench < testsuites/mysql-select-msg.sql > rsyslog.out.log
+source $srcdir/diag.sh seq-check 0 4999
+source $srcdir/diag.sh exit
diff --git a/tests/mysql-basic.sh b/tests/mysql-basic.sh
new file mode 100755
index 00000000..ba9d00f2
--- /dev/null
+++ b/tests/mysql-basic.sh
@@ -0,0 +1,13 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[mysql-basic.sh\]: basic test for mysql-basic functionality
+source $srcdir/diag.sh init
+mysql --user=rsyslog --password=testbench < testsuites/mysql-truncate.sql
+source $srcdir/diag.sh startup mysql-basic.conf
+source $srcdir/diag.sh injectmsg 0 5000
+source $srcdir/diag.sh shutdown-when-empty
+source $srcdir/diag.sh wait-shutdown
+# note "-s" is requried to suppress the select "field header"
+mysql -s --user=rsyslog --password=testbench < testsuites/mysql-select-msg.sql > rsyslog.out.log
+source $srcdir/diag.sh seq-check 0 4999
+source $srcdir/diag.sh exit
diff --git a/tests/rt-init.c b/tests/rt-init.c
index dbe94b4a..2d43943f 100644
--- a/tests/rt-init.c
+++ b/tests/rt-init.c
@@ -28,7 +28,6 @@
MODULE_TYPE_TESTBENCH
-
BEGINInit
CODESTARTInit
ENDInit
diff --git a/tests/tcp-msgreduc-vg.sh b/tests/tcp-msgreduc-vg.sh
new file mode 100755
index 00000000..cd8534e4
--- /dev/null
+++ b/tests/tcp-msgreduc-vg.sh
@@ -0,0 +1,16 @@
+# 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 \[tcp-msgreduc-vg.sh\]: testing msg reduction via UDP
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup-vg tcp-msgreduc-vg.conf
+source $srcdir/diag.sh wait-startup
+./tcpflood -t 127.0.0.1 -m 4 -r -M "<133>2011-03-01T11:22:12Z host tag msgh ..."
+./tcpflood -t 127.0.0.1 -m 1 -r -M "<133>2011-03-01T11:22:12Z host tag msgh ...x"
+# we need to give rsyslog a little time to settle the receiver
+./msleep 1500
+source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
+source $srcdir/diag.sh wait-shutdown-vg
+source $srcdir/diag.sh check-exit-vg
+source $srcdir/diag.sh exit
diff --git a/tests/testconfgen.c b/tests/testconfgen.c
new file mode 100644
index 00000000..9f191cc7
--- /dev/null
+++ b/tests/testconfgen.c
@@ -0,0 +1,72 @@
+/* a testcase generator
+ * THis program reads stdin, which must consist of (name,stmt) tupels
+ * where name is a part of the config name (small!) and stmt is an actual
+ * config statement. These tupels must be encoded as
+ * name<SP>stmt<LF>
+ * on stdin. After all tupels are read, the power set of all possible
+ * configurations is generated.
+ * Copyright (C) 2011 by Rainer Gerhards and Adiscon GmbH
+ * Released under the GPLv3 as part of the rsyslog project.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+static int arr[128];
+static char *name[128];
+static char *stmt[128];
+
+void output(int n)
+{
+ int i;
+
+ printf("name:");
+ for(i = 0 ; i < n ; ++i) {
+ if(arr[i]) {
+ printf("-%s", name[i]);
+ }
+ }
+ printf("\n");
+}
+
+void pows(int n, int i)
+{
+ if(i == 0) {
+ output(n);
+ } else {
+ --i;
+ arr[i] = 0;
+ pows(n, i);
+ arr[i] = 1;
+ pows(n, i);
+ }
+}
+
+
+int main(int argc, char *argv[])
+{
+ int n;
+ char iname[512];
+ char istmt[2048];
+ int nscanned;
+
+ n = 0;
+ while(!feof(stdin)) {
+ nscanned = scanf("%s %[^\n]s\n", iname, istmt);
+ if(nscanned == EOF)
+ break;
+ else if(nscanned != 2) {
+ fprintf(stderr, "problem scanning entry %d, scanned %d\n",
+ n, nscanned);
+ exit(1);
+ }
+ name[n] = strdup(iname);
+ stmt[n] = strdup(istmt);
+ n++;
+ printf("name: %s, stmt: %s\n", iname, istmt);
+ }
+ /* n is on to high for an index, but just right as the actual number! */
+
+ printf("read %d entries\n", n);
+ pows(n, n);
+}
diff --git a/tests/testsuites/discard-allmark.conf b/tests/testsuites/discard-allmark.conf
new file mode 100644
index 00000000..8a4983c1
--- /dev/null
+++ b/tests/testsuites/discard-allmark.conf
@@ -0,0 +1,15 @@
+# Test for discard functionality
+# rgerhards, 2009-07-30
+$IncludeConfig diag-common.conf
+
+$ModLoad ../plugins/imtcp/.libs/imtcp
+$MainMsgQueueTimeoutShutdown 10000
+$InputTCPServerRun 13514
+
+$ActionWriteAllMarkMessages on
+
+:msg, contains, "00000001" ~
+
+$template outfmt,"%msg:F,58:2%\n"
+$template dynfile,"rsyslog.out.log" # trick to use relative path names!
+:msg, contains, "msgnum:" ?dynfile;outfmt
diff --git a/tests/testsuites/discard-rptdmsg.conf b/tests/testsuites/discard-rptdmsg.conf
new file mode 100644
index 00000000..74060e31
--- /dev/null
+++ b/tests/testsuites/discard-rptdmsg.conf
@@ -0,0 +1,15 @@
+# Test for discard functionality
+# rgerhards, 2009-07-30
+$IncludeConfig diag-common.conf
+
+$ModLoad ../plugins/imtcp/.libs/imtcp
+$MainMsgQueueTimeoutShutdown 10000
+$InputTCPServerRun 13514
+
+$RepeatedMsgReduction on
+
+:msg, contains, "00000001" ~
+
+$template outfmt,"%msg:F,58:2%\n"
+$template dynfile,"rsyslog.out.log" # trick to use relative path names!
+:msg, contains, "msgnum:" ?dynfile;outfmt
diff --git a/tests/testsuites/libdbi-asyn.conf b/tests/testsuites/libdbi-asyn.conf
new file mode 100644
index 00000000..39b01fbc
--- /dev/null
+++ b/tests/testsuites/libdbi-asyn.conf
@@ -0,0 +1,12 @@
+$IncludeConfig diag-common.conf
+
+$ModLoad ../plugins/omlibdbi/.libs/omlibdbi
+
+$ActionQueueType LinkedList
+
+$ActionLibdbiDriver mysql
+$ActionLibdbiHost 127.0.0.1
+$ActionLibdbiUserName root
+$ActionLibdbiPassword pass
+$ActionLibdbiDBName Syslog
+:msg, contains, "msgnum:" :omlibdbi:
diff --git a/tests/testsuites/libdbi-basic.conf b/tests/testsuites/libdbi-basic.conf
new file mode 100644
index 00000000..212225cc
--- /dev/null
+++ b/tests/testsuites/libdbi-basic.conf
@@ -0,0 +1,9 @@
+$IncludeConfig diag-common.conf
+
+$ModLoad ../plugins/omlibdbi/.libs/omlibdbi
+$ActionLibdbiDriver mysql
+$ActionLibdbiHost 127.0.0.1
+$ActionLibdbiUserName root
+$ActionLibdbiPassword pass
+$ActionLibdbiDBName Syslog
+:msg, contains, "msgnum:" :omlibdbi:
diff --git a/tests/testsuites/mysql-asyn.conf b/tests/testsuites/mysql-asyn.conf
new file mode 100644
index 00000000..acdf9bbd
--- /dev/null
+++ b/tests/testsuites/mysql-asyn.conf
@@ -0,0 +1,5 @@
+$IncludeConfig diag-common.conf
+
+$ModLoad ../plugins/ommysql/.libs/ommysql
+$ActionQueueType LinkedList
+:msg, contains, "msgnum:" :ommysql:127.0.0.1,Syslog,rsyslog,testbench;
diff --git a/tests/testsuites/mysql-basic.conf b/tests/testsuites/mysql-basic.conf
new file mode 100644
index 00000000..070094f5
--- /dev/null
+++ b/tests/testsuites/mysql-basic.conf
@@ -0,0 +1,4 @@
+$IncludeConfig diag-common.conf
+
+$ModLoad ../plugins/ommysql/.libs/ommysql
+:msg, contains, "msgnum:" :ommysql:127.0.0.1,Syslog,rsyslog,testbench;
diff --git a/tests/testsuites/mysql-select-msg.sql b/tests/testsuites/mysql-select-msg.sql
new file mode 100644
index 00000000..2d27a331
--- /dev/null
+++ b/tests/testsuites/mysql-select-msg.sql
@@ -0,0 +1,2 @@
+use Syslog;
+select substring(Message,9,8) from SystemEvents;
diff --git a/tests/testsuites/mysql-truncate.sql b/tests/testsuites/mysql-truncate.sql
new file mode 100644
index 00000000..ca852beb
--- /dev/null
+++ b/tests/testsuites/mysql-truncate.sql
@@ -0,0 +1,2 @@
+use Syslog;
+truncate table SystemEvents;
diff --git a/tests/testsuites/tcp-msgreduc-vg.conf b/tests/testsuites/tcp-msgreduc-vg.conf
new file mode 100644
index 00000000..72420f04
--- /dev/null
+++ b/tests/testsuites/tcp-msgreduc-vg.conf
@@ -0,0 +1,10 @@
+# Test for queue disk mode (see .sh file for details)
+# rgerhards, 2009-05-22
+$IncludeConfig diag-common.conf
+
+$ModLoad ../plugins/imtcp/.libs/imtcp
+$InputTCPServerRun 13514
+$RepeatedMsgReduction on
+
+$template outfmt,"%msg:F,58:2%\n"
+*.* ./rsyslog.out.log;outfmt