summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2011-03-26 19:16:55 +0100
committerMichael Biebl <biebl@debian.org>2011-03-26 19:16:55 +0100
commitdea543841bb1f1c46586a68da21d55b44c6bf158 (patch)
tree46dd88ab15d5da40adae5ca8748f73e079df979a /tests
parenta362b3333f84518889cefc1706d4e6adaa92888c (diff)
downloadrsyslog-dea543841bb1f1c46586a68da21d55b44c6bf158.tar.gz
Imported Upstream version 5.7.9upstream/5.7.9
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am74
-rw-r--r--tests/Makefile.in107
-rwxr-xr-xtests/arrayqueue.sh18
-rwxr-xr-xtests/diag.sh4
-rwxr-xr-xtests/discard-allmark-vg.sh13
-rwxr-xr-xtests/discard-allmark.sh10
-rwxr-xr-xtests/failover-basic-vg.sh13
-rwxr-xr-xtests/failover-basic.sh12
-rwxr-xr-xtests/failover-no-basic-vg.sh20
-rwxr-xr-xtests/failover-no-basic.sh19
-rwxr-xr-xtests/failover-no-rptd-vg.sh20
-rwxr-xr-xtests/failover-no-rptd.sh19
-rwxr-xr-xtests/failover-rptd-vg.sh13
-rwxr-xr-xtests/failover-rptd.sh12
-rwxr-xr-xtests/imfile-basic-vg.sh15
-rwxr-xr-xtests/imfile-basic.sh14
-rw-r--r--tests/inputfilegen.c23
-rwxr-xr-xtests/libdbi-asyn.sh13
-rwxr-xr-xtests/libdbi-basic.sh13
-rwxr-xr-xtests/linkedlistqueue.sh17
-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
-rwxr-xr-xtests/random.sh4
-rwxr-xr-xtests/tcp-msgreduc-vg.sh2
-rw-r--r--tests/tcpflood.c4
-rw-r--r--tests/testsuites/discard-allmark.conf15
-rw-r--r--tests/testsuites/failover-basic.conf8
-rw-r--r--tests/testsuites/failover-no-basic.conf9
-rw-r--r--tests/testsuites/failover-no-rptd.conf9
-rw-r--r--tests/testsuites/failover-rptd.conf10
-rw-r--r--tests/testsuites/imfile-basic.conf12
-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
39 files changed, 583 insertions, 27 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a720c0c..ebbe0cf 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,12 +1,11 @@
if ENABLE_TESTBENCH
TESTRUNS = rt_init rscript
-check_PROGRAMS = $(TESTRUNS) ourtail nettester tcpflood chkseq msleep randomgen diagtalker uxsockrcvr syslog_caller syslog_inject
+check_PROGRAMS = $(TESTRUNS) ourtail nettester tcpflood chkseq msleep randomgen diagtalker uxsockrcvr syslog_caller syslog_inject inputfilegen
TESTS = $(TESTRUNS) cfg.sh
if ENABLE_IMDIAG
TESTS += \
arrayqueue.sh \
- linkedlistqueue.sh \
da-mainmsg-q.sh \
validation-run.sh \
imtcp-multiport.sh \
@@ -51,18 +50,45 @@ TESTS += \
imuxsock_traillf_root.sh \
imuxsock_ccmiddle_root.sh \
discard-rptdmsg.sh \
+ discard-allmark.sh \
discard.sh \
+ failover-basic.sh \
+ failover-rptd.sh \
+ failover-no-rptd.sh \
+ failover-no-basic.sh \
+ queue-persist.sh
queue-persist.sh \
- arrayqueue.sh \
linkedlistqueue.sh
endif
if HAVE_VALGRIND
TESTS += \
discard-rptdmsg-vg.sh \
+ discard-allmark-vg.sh \
+ failover-basic-vg.sh \
+ failover-rptd-vg.sh \
+ failover-no-basic-vg.sh \
+ failover-no-rptd-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 += \
manyptcp.sh \
@@ -105,6 +131,13 @@ if ENABLE_EXTENDED_TESTS
TESTS += random.sh
endif
+if ENABLE_IMFILE
+TESTS += imfile-basic.sh
+if HAVE_VALGRIND
+TESTS += imfile-basic-vg.sh
+endif
+endif
+
endif # if ENABLE_TESTBENCH
TESTS_ENVIRONMENT = RSYSLOG_MODDIR='$(abs_top_builddir)'/runtime/.libs/
@@ -201,7 +234,9 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
testsuites/rsf_getenv.conf \
diskqueue.sh \
testsuites/diskqueue.conf \
+ arrayqueue.sh \
testsuites/arrayqueue.conf \
+ linkedlistqueue.sh \
testsuites/linkedlistqueue.conf \
da-mainmsg-q.sh \
testsuites/da-mainmsg-q.conf \
@@ -233,9 +268,24 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
omod-if-array.sh \
discard.sh \
testsuites/discard.conf \
+ failover-no-rptd.sh \
+ failover-no-rptd-vg.sh \
+ testsuites/failover-no-rptd.conf \
+ failover-no-basic.sh \
+ failover-no-basic-vg.sh \
+ testsuites/failover-no-basic.conf \
+ failover-rptd.sh \
+ failover-rptd-vg.sh \
+ testsuites/failover-rptd.conf \
+ failover-basic.sh \
+ failover-basic-vg.sh \
+ testsuites/failover-basic.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 \
@@ -299,6 +349,9 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
testsuites/complex1.conf \
random.sh \
testsuites/random.conf \
+ imfile-basic.sh \
+ imfile-basic-vg.sh \
+ testsuites/imfile-basic.conf \
dynfile_invld_async.sh \
dynfile_invld_sync.sh \
dynfile_cachemiss.sh \
@@ -349,6 +402,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
@@ -373,6 +438,9 @@ diagtalker_LDADD = $(SOL_LIBS)
randomgen_SOURCES = randomgen.c
randomgen_LDADD = $(SOL_LIBS)
+inputfilegen_SOURCES = inputfilegen.c
+inputfilegen_LDADD = $(SOL_LIBS)
+
nettester_SOURCES = nettester.c getline.c
nettester_LDADD = $(SOL_LIBS)
diff --git a/tests/Makefile.in b/tests/Makefile.in
index c168707..32472e8 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -39,15 +39,17 @@ host_triplet = @host@
@ENABLE_TESTBENCH_TRUE@ msleep$(EXEEXT) randomgen$(EXEEXT) \
@ENABLE_TESTBENCH_TRUE@ diagtalker$(EXEEXT) uxsockrcvr$(EXEEXT) \
@ENABLE_TESTBENCH_TRUE@ syslog_caller$(EXEEXT) \
-@ENABLE_TESTBENCH_TRUE@ syslog_inject$(EXEEXT)
+@ENABLE_TESTBENCH_TRUE@ syslog_inject$(EXEEXT) \
+@ENABLE_TESTBENCH_TRUE@ inputfilegen$(EXEEXT)
@ENABLE_TESTBENCH_TRUE@TESTS = $(am__EXEEXT_1) cfg.sh $(am__append_1) \
@ENABLE_TESTBENCH_TRUE@ $(am__append_2) $(am__append_3) \
@ENABLE_TESTBENCH_TRUE@ $(am__append_4) $(am__append_5) \
@ENABLE_TESTBENCH_TRUE@ $(am__append_6) $(am__append_7) \
-@ENABLE_TESTBENCH_TRUE@ $(am__append_8)
+@ENABLE_TESTBENCH_TRUE@ $(am__append_8) $(am__append_9) \
+@ENABLE_TESTBENCH_TRUE@ $(am__append_10) $(am__append_11) \
+@ENABLE_TESTBENCH_TRUE@ $(am__append_12) $(am__append_13)
@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_1 = \
@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ arrayqueue.sh \
-@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ linkedlistqueue.sh \
@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ da-mainmsg-q.sh \
@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ validation-run.sh \
@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ imtcp-multiport.sh \
@@ -92,26 +94,46 @@ host_triplet = @host@
@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ imuxsock_traillf_root.sh \
@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ imuxsock_ccmiddle_root.sh \
@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ discard-rptdmsg.sh \
+@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ discard-allmark.sh \
@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ discard.sh \
-@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ queue-persist.sh \
-@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ arrayqueue.sh \
-@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ linkedlistqueue.sh
+@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ failover-basic.sh \
+@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ failover-rptd.sh \
+@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ failover-no-rptd.sh \
+@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ failover-no-basic.sh \
+@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ queue-persist.sh
@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@am__append_2 = \
@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ discard-rptdmsg-vg.sh \
+@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ discard-allmark-vg.sh \
+@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ failover-basic-vg.sh \
+@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ failover-rptd-vg.sh \
+@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ failover-no-basic-vg.sh \
+@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ failover-no-rptd-vg.sh \
@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ tcp-msgreduc-vg.sh
-@ENABLE_IMPTCP_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_3 = \
+@ENABLE_MYSQL_TESTS_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_3 = \
+@ENABLE_MYSQL_TESTS_TRUE@@ENABLE_TESTBENCH_TRUE@ mysql-basic.sh \
+@ENABLE_MYSQL_TESTS_TRUE@@ENABLE_TESTBENCH_TRUE@ mysql-asyn.sh
+
+@ENABLE_MYSQL_TESTS_TRUE@@ENABLE_OMLIBDBI_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_4 = \
+@ENABLE_MYSQL_TESTS_TRUE@@ENABLE_OMLIBDBI_TRUE@@ENABLE_TESTBENCH_TRUE@ libdbi-basic.sh \
+@ENABLE_MYSQL_TESTS_TRUE@@ENABLE_OMLIBDBI_TRUE@@ENABLE_TESTBENCH_TRUE@ libdbi-asyn.sh
+
+@ENABLE_MYSQL_TESTS_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@am__append_5 = \
+@ENABLE_MYSQL_TESTS_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ mysql-basic-vg.sh \
+@ENABLE_MYSQL_TESTS_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ mysql-asyn-vg.sh
+
+@ENABLE_IMPTCP_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_6 = \
@ENABLE_IMPTCP_TRUE@@ENABLE_TESTBENCH_TRUE@ manyptcp.sh \
@ENABLE_IMPTCP_TRUE@@ENABLE_TESTBENCH_TRUE@ imptcp_large.sh \
@ENABLE_IMPTCP_TRUE@@ENABLE_TESTBENCH_TRUE@ imptcp_addtlframedelim.sh \
@ENABLE_IMPTCP_TRUE@@ENABLE_TESTBENCH_TRUE@ imptcp_conndrop.sh
-@ENABLE_OMUXSOCK_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_4 = uxsock_simple.sh
-@ENABLE_OMUDPSPOOF_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_5 = sndrcv_omudpspoof.sh \
+@ENABLE_OMUXSOCK_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_7 = uxsock_simple.sh
+@ENABLE_OMUDPSPOOF_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_8 = sndrcv_omudpspoof.sh \
@ENABLE_OMUDPSPOOF_TRUE@@ENABLE_TESTBENCH_TRUE@ sndrcv_omudpspoof_nonstdpt.sh
-@ENABLE_OMSTDOUT_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_6 = omod-if-array.sh \
+@ENABLE_OMSTDOUT_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_9 = omod-if-array.sh \
@ENABLE_OMSTDOUT_TRUE@@ENABLE_TESTBENCH_TRUE@ proprepltest.sh \
@ENABLE_OMSTDOUT_TRUE@@ENABLE_TESTBENCH_TRUE@ parsertest.sh \
@ENABLE_OMSTDOUT_TRUE@@ENABLE_TESTBENCH_TRUE@ timestamp.sh \
@@ -123,10 +145,12 @@ host_triplet = @host@
@ENABLE_OMSTDOUT_TRUE@@ENABLE_TESTBENCH_TRUE@ tabescape_off.sh \
@ENABLE_OMSTDOUT_TRUE@@ENABLE_TESTBENCH_TRUE@ fieldtest.sh
-@ENABLE_IMDIAG_TRUE@@ENABLE_OMRULESET_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_7 = omruleset.sh \
+@ENABLE_IMDIAG_TRUE@@ENABLE_OMRULESET_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_10 = omruleset.sh \
@ENABLE_IMDIAG_TRUE@@ENABLE_OMRULESET_TRUE@@ENABLE_TESTBENCH_TRUE@ omruleset-queue.sh
-@ENABLE_EXTENDED_TESTS_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_8 = random.sh
+@ENABLE_EXTENDED_TESTS_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_11 = random.sh
+@ENABLE_IMFILE_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_12 = imfile-basic.sh
+@ENABLE_IMFILE_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@am__append_13 = imfile-basic-vg.sh
subdir = tests
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
INSTALL
@@ -154,6 +178,9 @@ am_diagtalker_OBJECTS = diagtalker.$(OBJEXT)
diagtalker_OBJECTS = $(am_diagtalker_OBJECTS)
am__DEPENDENCIES_1 =
diagtalker_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_inputfilegen_OBJECTS = inputfilegen.$(OBJEXT)
+inputfilegen_OBJECTS = $(am_inputfilegen_OBJECTS)
+inputfilegen_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_msleep_OBJECTS = msleep.$(OBJEXT)
msleep_OBJECTS = $(am_msleep_OBJECTS)
msleep_LDADD = $(LDADD)
@@ -221,16 +248,18 @@ am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = $(chkseq_SOURCES) $(diagtalker_SOURCES) $(msleep_SOURCES) \
- $(nettester_SOURCES) $(ourtail_SOURCES) $(randomgen_SOURCES) \
- $(rscript_SOURCES) $(rt_init_SOURCES) $(syslog_caller_SOURCES) \
+SOURCES = $(chkseq_SOURCES) $(diagtalker_SOURCES) \
+ $(inputfilegen_SOURCES) $(msleep_SOURCES) $(nettester_SOURCES) \
+ $(ourtail_SOURCES) $(randomgen_SOURCES) $(rscript_SOURCES) \
+ $(rt_init_SOURCES) $(syslog_caller_SOURCES) \
$(syslog_inject_SOURCES) $(tcpflood_SOURCES) \
$(uxsockrcvr_SOURCES)
DIST_SOURCES = $(chkseq_SOURCES) $(diagtalker_SOURCES) \
- $(msleep_SOURCES) $(nettester_SOURCES) $(ourtail_SOURCES) \
- $(randomgen_SOURCES) $(rscript_SOURCES) $(rt_init_SOURCES) \
- $(syslog_caller_SOURCES) $(syslog_inject_SOURCES) \
- $(tcpflood_SOURCES) $(uxsockrcvr_SOURCES)
+ $(inputfilegen_SOURCES) $(msleep_SOURCES) $(nettester_SOURCES) \
+ $(ourtail_SOURCES) $(randomgen_SOURCES) $(rscript_SOURCES) \
+ $(rt_init_SOURCES) $(syslog_caller_SOURCES) \
+ $(syslog_inject_SOURCES) $(tcpflood_SOURCES) \
+ $(uxsockrcvr_SOURCES)
ETAGS = etags
CTAGS = ctags
am__tty_colors = \
@@ -478,7 +507,9 @@ EXTRA_DIST = 1.rstest 2.rstest 3.rstest err1.rstest \
testsuites/rsf_getenv.conf \
diskqueue.sh \
testsuites/diskqueue.conf \
+ arrayqueue.sh \
testsuites/arrayqueue.conf \
+ linkedlistqueue.sh \
testsuites/linkedlistqueue.conf \
da-mainmsg-q.sh \
testsuites/da-mainmsg-q.conf \
@@ -510,9 +541,24 @@ EXTRA_DIST = 1.rstest 2.rstest 3.rstest err1.rstest \
omod-if-array.sh \
discard.sh \
testsuites/discard.conf \
+ failover-no-rptd.sh \
+ failover-no-rptd-vg.sh \
+ testsuites/failover-no-rptd.conf \
+ failover-no-basic.sh \
+ failover-no-basic-vg.sh \
+ testsuites/failover-no-basic.conf \
+ failover-rptd.sh \
+ failover-rptd-vg.sh \
+ testsuites/failover-rptd.conf \
+ failover-basic.sh \
+ failover-basic-vg.sh \
+ testsuites/failover-basic.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 \
@@ -576,6 +622,9 @@ EXTRA_DIST = 1.rstest 2.rstest 3.rstest err1.rstest \
testsuites/complex1.conf \
random.sh \
testsuites/random.conf \
+ imfile-basic.sh \
+ imfile-basic-vg.sh \
+ testsuites/imfile-basic.conf \
dynfile_invld_async.sh \
dynfile_invld_sync.sh \
dynfile_cachemiss.sh \
@@ -626,6 +675,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
@@ -643,6 +704,8 @@ diagtalker_SOURCES = diagtalker.c
diagtalker_LDADD = $(SOL_LIBS)
randomgen_SOURCES = randomgen.c
randomgen_LDADD = $(SOL_LIBS)
+inputfilegen_SOURCES = inputfilegen.c
+inputfilegen_LDADD = $(SOL_LIBS)
nettester_SOURCES = nettester.c getline.c
nettester_LDADD = $(SOL_LIBS)
rt_init_SOURCES = rt-init.c $(test_files)
@@ -702,6 +765,9 @@ chkseq$(EXEEXT): $(chkseq_OBJECTS) $(chkseq_DEPENDENCIES)
diagtalker$(EXEEXT): $(diagtalker_OBJECTS) $(diagtalker_DEPENDENCIES)
@rm -f diagtalker$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(diagtalker_OBJECTS) $(diagtalker_LDADD) $(LIBS)
+inputfilegen$(EXEEXT): $(inputfilegen_OBJECTS) $(inputfilegen_DEPENDENCIES)
+ @rm -f inputfilegen$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(inputfilegen_OBJECTS) $(inputfilegen_LDADD) $(LIBS)
msleep$(EXEEXT): $(msleep_OBJECTS) $(msleep_DEPENDENCIES)
@rm -f msleep$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(msleep_OBJECTS) $(msleep_LDADD) $(LIBS)
@@ -742,6 +808,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chkseq.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diagtalker.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getline.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inputfilegen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msleep.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nettester.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ourtail.Po@am__quote@
@@ -1159,6 +1226,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am
+@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ queue-persist.sh \
+@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ linkedlistqueue.sh
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/tests/arrayqueue.sh b/tests/arrayqueue.sh
new file mode 100755
index 0000000..71e1cc2
--- /dev/null
+++ b/tests/arrayqueue.sh
@@ -0,0 +1,18 @@
+# Test for fixedArray queue mode
+# added 2009-05-20 by rgerhards
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[arrayqueue.sh\]: testing queue fixedArray queue mode
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup arrayqueue.conf
+
+# 40000 messages should be enough
+source $srcdir/diag.sh injectmsg 0 40000
+
+# terminate *now* (don't wait for queue to drain!)
+kill `cat rsyslog.pid`
+
+# now wait until rsyslog.pid is gone (and the process finished)
+source $srcdir/diag.sh wait-shutdown
+source $srcdir/diag.sh seq-check 0 39999
+source $srcdir/diag.sh exit
diff --git a/tests/diag.sh b/tests/diag.sh
index e8e3ce1..8fbe42e 100755
--- a/tests/diag.sh
+++ b/tests/diag.sh
@@ -10,7 +10,7 @@
#valgrind="valgrind --tool=helgrind --log-fd=1"
#valgrind="valgrind --tool=exp-ptrcheck --log-fd=1"
#set -o xtrace
-#export RSYSLOG_DEBUG="debug nostdout"
+#export RSYSLOG_DEBUG="debug nologfuncflow nostdout"
#export RSYSLOG_DEBUGLOG="log"
case $1 in
'init') $srcdir/killrsyslog.sh # kill rsyslogd if it runs for some reason
@@ -22,6 +22,7 @@ case $1 in
rm -f work rsyslog.out.log rsyslog2.out.log rsyslog.out.log.save # common work files
rm -rf test-spool test-logdir
rm -f rsyslog.out.*.log work-presort rsyslog.pipe
+ rm -f rsyslog.input
rm -f core.* vgcore.*
mkdir test-spool
;;
@@ -30,6 +31,7 @@ case $1 in
rm -f work rsyslog.out.log rsyslog2.out.log rsyslog.out.log.save # common work files
rm -rf test-spool test-logdir
rm -f rsyslog.out.*.log rsyslog.random.data work-presort rsyslog.pipe
+ rm -f rsyslog.input stat-file1
echo -------------------------------------------------------------------------------
;;
'startup') # start rsyslogd with default params. $2 is the config file name to use
diff --git a/tests/discard-allmark-vg.sh b/tests/discard-allmark-vg.sh
new file mode 100755
index 0000000..57ce8e3
--- /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 0000000..eb46ae7
--- /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/failover-basic-vg.sh b/tests/failover-basic-vg.sh
new file mode 100755
index 0000000..0eb77ca
--- /dev/null
+++ b/tests/failover-basic-vg.sh
@@ -0,0 +1,13 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[failover-basic.sh\]: basic test for failover functionality
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup-vg failover-basic.conf
+source $srcdir/diag.sh injectmsg 0 5000
+echo doing shutdown
+source $srcdir/diag.sh shutdown-when-empty
+echo wait on shutdown
+source $srcdir/diag.sh wait-shutdown-vg
+source $srcdir/diag.sh check-exit-vg
+source $srcdir/diag.sh seq-check 0 4999
+source $srcdir/diag.sh exit
diff --git a/tests/failover-basic.sh b/tests/failover-basic.sh
new file mode 100755
index 0000000..031ea25
--- /dev/null
+++ b/tests/failover-basic.sh
@@ -0,0 +1,12 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[failover-basic.sh\]: basic test for failover functionality
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup failover-basic.conf
+source $srcdir/diag.sh injectmsg 0 5000
+echo doing shutdown
+source $srcdir/diag.sh shutdown-when-empty
+echo wait on shutdown
+source $srcdir/diag.sh wait-shutdown
+source $srcdir/diag.sh seq-check 0 4999
+source $srcdir/diag.sh exit
diff --git a/tests/failover-no-basic-vg.sh b/tests/failover-no-basic-vg.sh
new file mode 100755
index 0000000..266163d
--- /dev/null
+++ b/tests/failover-no-basic-vg.sh
@@ -0,0 +1,20 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[failover-no-basic.sh\]: basic test for failover functionality - no failover
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup-vg failover-no-basic.conf
+source $srcdir/diag.sh injectmsg 0 5000
+echo doing shutdown
+source $srcdir/diag.sh shutdown-when-empty
+echo wait on shutdown
+source $srcdir/diag.sh wait-shutdown-vg
+source $srcdir/diag.sh check-exit-vg
+# now we need our custom logic to see if the result file is empty
+# (what it should be!)
+cmp rsyslog.out.log /dev/null
+if [ $? -eq 1 ]
+then
+ echo "ERROR, output file not empty"
+ exit 1
+fi
+source $srcdir/diag.sh exit
diff --git a/tests/failover-no-basic.sh b/tests/failover-no-basic.sh
new file mode 100755
index 0000000..6177e10
--- /dev/null
+++ b/tests/failover-no-basic.sh
@@ -0,0 +1,19 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[failover-no-basic.sh\]: basic test for failover functionality - no failover
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup failover-no-basic.conf
+source $srcdir/diag.sh injectmsg 0 5000
+echo doing shutdown
+source $srcdir/diag.sh shutdown-when-empty
+echo wait on shutdown
+source $srcdir/diag.sh wait-shutdown
+# now we need our custom logic to see if the result file is empty
+# (what it should be!)
+cmp rsyslog.out.log /dev/null
+if [ $? -eq 1 ]
+then
+ echo "ERROR, output file not empty"
+ exit 1
+fi
+source $srcdir/diag.sh exit
diff --git a/tests/failover-no-rptd-vg.sh b/tests/failover-no-rptd-vg.sh
new file mode 100755
index 0000000..3b77a0a
--- /dev/null
+++ b/tests/failover-no-rptd-vg.sh
@@ -0,0 +1,20 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[failover-no-rptd.sh\]: rptd test for failover functionality - no failover
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup-vg failover-no-rptd.conf
+source $srcdir/diag.sh injectmsg 0 5000
+echo doing shutdown
+source $srcdir/diag.sh shutdown-when-empty
+echo wait on shutdown
+source $srcdir/diag.sh wait-shutdown-vg
+source $srcdir/diag.sh check-exit-vg
+# now we need our custom logic to see if the result file is empty
+# (what it should be!)
+cmp rsyslog.out.log /dev/null
+if [ $? -eq 1 ]
+then
+ echo "ERROR, output file not empty"
+ exit 1
+fi
+source $srcdir/diag.sh exit
diff --git a/tests/failover-no-rptd.sh b/tests/failover-no-rptd.sh
new file mode 100755
index 0000000..6abeba4
--- /dev/null
+++ b/tests/failover-no-rptd.sh
@@ -0,0 +1,19 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[failover-no-rptd.sh\]: rptd test for failover functionality - no failover
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup failover-no-rptd.conf
+source $srcdir/diag.sh injectmsg 0 5000
+echo doing shutdown
+source $srcdir/diag.sh shutdown-when-empty
+echo wait on shutdown
+source $srcdir/diag.sh wait-shutdown
+# now we need our custom logic to see if the result file is empty
+# (what it should be!)
+cmp rsyslog.out.log /dev/null
+if [ $? -eq 1 ]
+then
+ echo "ERROR, output file not empty"
+ exit 1
+fi
+source $srcdir/diag.sh exit
diff --git a/tests/failover-rptd-vg.sh b/tests/failover-rptd-vg.sh
new file mode 100755
index 0000000..d208003
--- /dev/null
+++ b/tests/failover-rptd-vg.sh
@@ -0,0 +1,13 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[failover-rptd.sh\]: rptd test for failover functionality
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup-vg failover-rptd.conf
+source $srcdir/diag.sh injectmsg 0 5000
+echo doing shutdown
+source $srcdir/diag.sh shutdown-when-empty
+echo wait on shutdown
+source $srcdir/diag.sh wait-shutdown-vg
+source $srcdir/diag.sh check-exit-vg
+source $srcdir/diag.sh seq-check 0 4999
+source $srcdir/diag.sh exit
diff --git a/tests/failover-rptd.sh b/tests/failover-rptd.sh
new file mode 100755
index 0000000..8a313e9
--- /dev/null
+++ b/tests/failover-rptd.sh
@@ -0,0 +1,12 @@
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo \[failover-rptd.sh\]: rptd test for failover functionality
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup failover-rptd.conf
+source $srcdir/diag.sh injectmsg 0 5000
+echo doing shutdown
+source $srcdir/diag.sh shutdown-when-empty
+echo wait on shutdown
+source $srcdir/diag.sh wait-shutdown
+source $srcdir/diag.sh seq-check 0 4999
+source $srcdir/diag.sh exit
diff --git a/tests/imfile-basic-vg.sh b/tests/imfile-basic-vg.sh
new file mode 100755
index 0000000..92cfc7f
--- /dev/null
+++ b/tests/imfile-basic-vg.sh
@@ -0,0 +1,15 @@
+# This is part of the rsyslog testbench, licensed under GPLv3
+echo [imfile-basic.sh]
+source $srcdir/diag.sh init
+# generate input file first. Note that rsyslog processes it as
+# soon as it start up (so the file should exist at that point).
+./inputfilegen 50000 > rsyslog.input
+ls -l rsyslog.input
+source $srcdir/diag.sh startup-vg imfile-basic.conf
+# sleep a little to give rsyslog a chance to begin processing
+sleep 1
+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 0 49999
+source $srcdir/diag.sh exit
diff --git a/tests/imfile-basic.sh b/tests/imfile-basic.sh
new file mode 100755
index 0000000..ca6a5d3
--- /dev/null
+++ b/tests/imfile-basic.sh
@@ -0,0 +1,14 @@
+# This is part of the rsyslog testbench, licensed under GPLv3
+echo [imfile-basic.sh]
+source $srcdir/diag.sh init
+# generate input file first. Note that rsyslog processes it as
+# soon as it start up (so the file should exist at that point).
+./inputfilegen 50000 > rsyslog.input
+ls -l rsyslog.input
+source $srcdir/diag.sh startup imfile-basic.conf
+# sleep a little to give rsyslog a chance to begin processing
+sleep 1
+source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
+source $srcdir/diag.sh wait-shutdown # we need to wait until rsyslogd is finished!
+source $srcdir/diag.sh seq-check 0 49999
+source $srcdir/diag.sh exit
diff --git a/tests/inputfilegen.c b/tests/inputfilegen.c
new file mode 100644
index 0000000..26fb79a
--- /dev/null
+++ b/tests/inputfilegen.c
@@ -0,0 +1,23 @@
+/* generate an input file suitable for use by the testbench
+ * Copyright (C) 2011 by Rainer Gerhards and Adiscon GmbH.
+ * Part of rsyslog, licensed under GPLv3
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+int main(int argc, char* argv[])
+{
+ int nmsgs;
+ int i;
+
+ if(argc != 2) {
+ fprintf(stderr, "usage: inputfilegen num-messages\n");
+ return 1;
+ }
+
+ nmsgs = atoi(argv[1]);
+ for(i = 0 ; i < nmsgs ; ++i) {
+ printf("msgnum:%8.8d:\n", i);
+ }
+ return 0;
+}
diff --git a/tests/libdbi-asyn.sh b/tests/libdbi-asyn.sh
new file mode 100755
index 0000000..0076da9
--- /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.sh b/tests/libdbi-basic.sh
new file mode 100755
index 0000000..a854a56
--- /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/linkedlistqueue.sh b/tests/linkedlistqueue.sh
new file mode 100755
index 0000000..e6d48a6
--- /dev/null
+++ b/tests/linkedlistqueue.sh
@@ -0,0 +1,17 @@
+# Test for Linkedlist queue mode
+# added 2009-05-20 by rgerhards
+# This file is part of the rsyslog project, released under GPLv3
+echo \[linkedlistqueue.sh\]: testing queue Linkedlist queue mode
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup linkedlistqueue.conf
+
+# 40000 messages should be enough
+source $srcdir/diag.sh injectmsg 0 40000
+
+# terminate *now* (don't wait for queue to drain)
+kill `cat rsyslog.pid`
+
+# now wait until rsyslog.pid is gone (and the process finished)
+source $srcdir/diag.sh wait-shutdown
+source $srcdir/diag.sh seq-check 0 39999
+source $srcdir/diag.sh exit
diff --git a/tests/mysql-asyn-vg.sh b/tests/mysql-asyn-vg.sh
new file mode 100755
index 0000000..dfe6866
--- /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 0000000..de6d6fd
--- /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 0000000..215f41f
--- /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 0000000..ba9d00f
--- /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/random.sh b/tests/random.sh
index d1f392d..969d720 100755
--- a/tests/random.sh
+++ b/tests/random.sh
@@ -5,9 +5,6 @@
echo ===============================================================================
echo TEST: \[random.sh\]: testing random data
source $srcdir/diag.sh init
-# uncomment for debugging support:
-#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction"
-#export RSYSLOG_DEBUGLOG="log"
source $srcdir/diag.sh startup random.conf
# generate random data
./randomgen -f rsyslog.random.data -s 100000
@@ -17,4 +14,5 @@ source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done proces
source $srcdir/diag.sh wait-shutdown # and wait for it to terminate
# we do not check anything yet, the point is if rsyslog survived ;)
# TODO: check for exit message, but we'll notice an abort anyhow, so not that important
+rm -f random.data
source $srcdir/diag.sh exit
diff --git a/tests/tcp-msgreduc-vg.sh b/tests/tcp-msgreduc-vg.sh
index 7e38836..cd8534e 100755
--- a/tests/tcp-msgreduc-vg.sh
+++ b/tests/tcp-msgreduc-vg.sh
@@ -12,5 +12,5 @@ source $srcdir/diag.sh wait-startup
./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 wait-shutdown-vg
+source $srcdir/diag.sh check-exit-vg
source $srcdir/diag.sh exit
diff --git a/tests/tcpflood.c b/tests/tcpflood.c
index a37845a..3e7053c 100644
--- a/tests/tcpflood.c
+++ b/tests/tcpflood.c
@@ -355,6 +355,7 @@ int main(int argc, char *argv[])
int ret = 0;
int opt;
struct sigaction sigAct;
+ struct rlimit maxFiles;
static char buf[1024];
srand(time(NULL)); /* seed is good enough for our needs */
@@ -431,6 +432,9 @@ int main(int argc, char *argv[])
maxFiles.rlim_max = numConnections + 20;
if(setrlimit(RLIMIT_NOFILE, &maxFiles) < 0) {
perror("setrlimit to increase file handles failed");
+ fprintf(stderr,
+ "could net set sufficiently large number of "
+ "open files for required connection count!\n");
exit(1);
}
}
diff --git a/tests/testsuites/discard-allmark.conf b/tests/testsuites/discard-allmark.conf
new file mode 100644
index 0000000..8a4983c
--- /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/failover-basic.conf b/tests/testsuites/failover-basic.conf
new file mode 100644
index 0000000..a858769
--- /dev/null
+++ b/tests/testsuites/failover-basic.conf
@@ -0,0 +1,8 @@
+# see the equally-named .sh file for details
+$IncludeConfig diag-common.conf
+
+$template outfmt,"%msg:F,58:2%\n"
+# note: the target server shall not be available!
+:msg, contains, "msgnum:" @@127.0.0.1:13514
+$ActionExecOnlyWhenPreviousIsSuspended on
+& ./rsyslog.out.log;outfmt
diff --git a/tests/testsuites/failover-no-basic.conf b/tests/testsuites/failover-no-basic.conf
new file mode 100644
index 0000000..b40ef7d
--- /dev/null
+++ b/tests/testsuites/failover-no-basic.conf
@@ -0,0 +1,9 @@
+# see the equally-named .sh file for details
+$IncludeConfig diag-common.conf
+
+$RepeatedMsgReduction off
+
+# second action should never execute
+:msg, contains, "msgnum:" /dev/null
+$ActionExecOnlyWhenPreviousIsSuspended on
+& ./rsyslog.out.log
diff --git a/tests/testsuites/failover-no-rptd.conf b/tests/testsuites/failover-no-rptd.conf
new file mode 100644
index 0000000..a46ce11
--- /dev/null
+++ b/tests/testsuites/failover-no-rptd.conf
@@ -0,0 +1,9 @@
+# see the equally-named .sh file for details
+$IncludeConfig diag-common.conf
+
+$RepeatedMsgReduction on
+
+# second action should never execute
+:msg, contains, "msgnum:" /dev/null
+$ActionExecOnlyWhenPreviousIsSuspended on
+& ./rsyslog.out.log
diff --git a/tests/testsuites/failover-rptd.conf b/tests/testsuites/failover-rptd.conf
new file mode 100644
index 0000000..d3553db
--- /dev/null
+++ b/tests/testsuites/failover-rptd.conf
@@ -0,0 +1,10 @@
+# see the equally-named .sh file for details
+$IncludeConfig diag-common.conf
+
+$RepeatedMsgReduction on
+
+$template outfmt,"%msg:F,58:2%\n"
+# note: the target server shall not be available!
+:msg, contains, "msgnum:" @@127.0.0.1:13514
+$ActionExecOnlyWhenPreviousIsSuspended on
+& ./rsyslog.out.log;outfmt
diff --git a/tests/testsuites/imfile-basic.conf b/tests/testsuites/imfile-basic.conf
new file mode 100644
index 0000000..9fb9b5c
--- /dev/null
+++ b/tests/testsuites/imfile-basic.conf
@@ -0,0 +1,12 @@
+$IncludeConfig diag-common.conf
+
+$ModLoad ../plugins/imfile/.libs/imfile
+$InputFileName ./rsyslog.input
+$InputFileTag file:
+$InputFileStateFile stat-file1
+$InputFileSeverity error
+$InputFileFacility local7
+$InputRunFileMonitor
+
+$template outfmt,"%msg:F,58:2%\n"
+:msg, contains, "msgnum:" ./rsyslog.out.log;outfmt
diff --git a/tests/testsuites/libdbi-asyn.conf b/tests/testsuites/libdbi-asyn.conf
new file mode 100644
index 0000000..39b01fb
--- /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 0000000..212225c
--- /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 0000000..acdf9bb
--- /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 0000000..070094f
--- /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 0000000..2d27a33
--- /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 0000000..ca852be
--- /dev/null
+++ b/tests/testsuites/mysql-truncate.sql
@@ -0,0 +1,2 @@
+use Syslog;
+truncate table SystemEvents;