From 5b0595cc98c012dfa5ac0f214dbc543a11c982cb Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 10 Oct 2012 06:45:13 +0200 Subject: Imported Upstream version 7.1.9 --- tests/INSTALL | 0 tests/Makefile.am | 106 +++++++-- tests/Makefile.in | 342 +++++++++++++-------------- tests/cee_diskqueue.sh | 14 ++ tests/cee_simple.sh | 13 + tests/cfg.sh | 4 +- tests/diag.sh | 6 +- tests/imtcp-tls-basic-vg.sh | 15 ++ tests/imtcp-tls-basic.sh | 14 ++ tests/imtcp_conndrop.sh | 1 - tests/imtcp_conndrop_tls-vg.sh | 17 ++ tests/imtcp_conndrop_tls.sh | 16 ++ tests/imuxsock_ccmiddle_root.sh | 3 + tests/imuxsock_logger_root.sh | 3 + tests/imuxsock_traillf_root.sh | 3 + tests/inputfilegen.c | 1 + tests/manytcp-too-few-tls.sh | 17 ++ tests/mysql-basic-cnf6.sh | 13 + tests/rscript.c | 263 -------------------- tests/rscript_contains.sh | 13 + tests/rscript_field.sh | 13 + tests/rscript_optimizer1.sh | 13 + tests/rscript_prifilt.sh | 13 + tests/rscript_stop.sh | 13 + tests/rscript_stop2.sh | 13 + tests/rt-init.c | 43 ---- tests/runtime-dummy.c | 46 ---- tests/sndrcv_drvr.sh | 1 - tests/sndrcv_omudpspoof.sh | 4 + tests/sndrcv_omudpspoof_nonstdpt.sh | 4 + tests/sndrcv_udp.sh | 3 + tests/tcpflood.c | 12 +- tests/testbench.h | 103 -------- tests/testsuites/cee_diskqueue.conf | 9 + tests/testsuites/cee_simple.conf | 6 + tests/testsuites/imfile-basic.conf | 1 + tests/testsuites/imtcp-tls-basic.conf | 21 ++ tests/testsuites/imtcp_conndrop.conf | 1 - tests/testsuites/manytcp-too-few-tls.conf | 22 ++ tests/testsuites/mysql-basic-cnf6.conf | 7 + tests/testsuites/rscript_contains.conf | 4 + tests/testsuites/rscript_field.conf | 11 + tests/testsuites/rscript_optimizer1.conf | 12 + tests/testsuites/rscript_prifilt.conf | 10 + tests/testsuites/rscript_stop.conf | 13 + tests/testsuites/rscript_stop2.conf | 18 ++ tests/testsuites/udp-msgreduc-orgmsg-vg.conf | 11 + tests/testsuites/udp-msgreduc-vg.conf | 11 + tests/testsuites/x.509/ca-key.pem | 15 ++ tests/testsuites/x.509/ca.pem | 17 ++ tests/testsuites/x.509/client-cert.pem | 16 ++ tests/testsuites/x.509/client-key.pem | 15 ++ tests/testsuites/x.509/machine-cert.pem | 18 ++ tests/testsuites/x.509/machine-key.pem | 15 ++ tests/udp-msgreduc-orgmsg-vg.sh | 18 ++ tests/udp-msgreduc-vg.sh | 18 ++ tests/validation-run.sh | 3 + 57 files changed, 776 insertions(+), 661 deletions(-) delete mode 100644 tests/INSTALL create mode 100755 tests/cee_diskqueue.sh create mode 100755 tests/cee_simple.sh create mode 100755 tests/imtcp-tls-basic-vg.sh create mode 100755 tests/imtcp-tls-basic.sh create mode 100755 tests/imtcp_conndrop_tls-vg.sh create mode 100755 tests/imtcp_conndrop_tls.sh create mode 100755 tests/manytcp-too-few-tls.sh create mode 100755 tests/mysql-basic-cnf6.sh delete mode 100644 tests/rscript.c create mode 100755 tests/rscript_contains.sh create mode 100755 tests/rscript_field.sh create mode 100755 tests/rscript_optimizer1.sh create mode 100755 tests/rscript_prifilt.sh create mode 100755 tests/rscript_stop.sh create mode 100755 tests/rscript_stop2.sh delete mode 100644 tests/rt-init.c delete mode 100644 tests/runtime-dummy.c delete mode 100644 tests/testbench.h create mode 100644 tests/testsuites/cee_diskqueue.conf create mode 100644 tests/testsuites/cee_simple.conf create mode 100644 tests/testsuites/imtcp-tls-basic.conf create mode 100644 tests/testsuites/manytcp-too-few-tls.conf create mode 100644 tests/testsuites/mysql-basic-cnf6.conf create mode 100644 tests/testsuites/rscript_contains.conf create mode 100644 tests/testsuites/rscript_field.conf create mode 100644 tests/testsuites/rscript_optimizer1.conf create mode 100644 tests/testsuites/rscript_prifilt.conf create mode 100644 tests/testsuites/rscript_stop.conf create mode 100644 tests/testsuites/rscript_stop2.conf create mode 100644 tests/testsuites/udp-msgreduc-orgmsg-vg.conf create mode 100644 tests/testsuites/udp-msgreduc-vg.conf create mode 100644 tests/testsuites/x.509/ca-key.pem create mode 100644 tests/testsuites/x.509/ca.pem create mode 100644 tests/testsuites/x.509/client-cert.pem create mode 100644 tests/testsuites/x.509/client-key.pem create mode 100644 tests/testsuites/x.509/machine-cert.pem create mode 100644 tests/testsuites/x.509/machine-key.pem create mode 100755 tests/udp-msgreduc-orgmsg-vg.sh create mode 100755 tests/udp-msgreduc-vg.sh (limited to 'tests') diff --git a/tests/INSTALL b/tests/INSTALL deleted file mode 100644 index e69de29..0000000 diff --git a/tests/Makefile.am b/tests/Makefile.am index 77381d2..715c024 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,8 @@ if ENABLE_TESTBENCH -TESTRUNS = rt_init rscript +# TODO: reenable TESTRUNS = rt_init rscript check_PROGRAMS = $(TESTRUNS) ourtail nettester tcpflood chkseq msleep randomgen diagtalker uxsockrcvr syslog_caller syslog_inject inputfilegen -TESTS = $(TESTRUNS) cfg.sh +TESTS = $(TESTRUNS) +#TESTS = $(TESTRUNS) cfg.sh if ENABLE_IMDIAG TESTS += \ @@ -50,6 +51,9 @@ TESTS += \ imuxsock_logger_root.sh \ imuxsock_traillf_root.sh \ imuxsock_ccmiddle_root.sh \ + udp-msgreduc-vg.sh \ + udp-msgreduc-orgmsg-vg.sh \ + queue-persist.sh discard-rptdmsg.sh \ discard-allmark.sh \ discard.sh \ @@ -60,8 +64,15 @@ TESTS += \ failover-no-rptd.sh \ failover-no-basic.sh \ rcvr_fail_restore.sh \ + rscript_contains.sh \ + rscript_field.sh \ + rscript_stop.sh \ + rscript_stop2.sh \ + rscript_prifilt.sh \ + rscript_optimizer1.sh \ + cee_simple.sh \ + cee_diskqueue.sh \ linkedlistqueue.sh -endif if HAVE_VALGRIND TESTS += \ @@ -72,12 +83,14 @@ TESTS += \ failover-no-basic-vg.sh \ failover-no-rptd-vg.sh \ tcp-msgreduc-vg.sh -endif +endif # HAVE_VALGRIND +endif # ENABLE_IMDIAG if ENABLE_MYSQL_TESTS TESTS += \ mysql-basic.sh \ + mysql-basic-cnf6.sh \ mysql-asyn.sh if ENABLE_OMLIBDBI TESTS += \ @@ -100,9 +113,15 @@ TESTS += \ endif if ENABLE_GNUTLS +# TODO: re-enable in newer version +#TESTS += \ + #sndrcv_tls_anon.sh \ + #sndrcv_tls_anon_rebind.sh \ + #imtcp-tls-basic.sh if HAVE_VALGRIND -# This test does not work on v5 as we keep DH params -#TESTS += manytcp-too-few-tls.sh +TESTS += imtcp-tls-basic-vg.sh \ + imtcp_conndrop_tls-vg.sh + manytcp-too-few-tls-vg.sh endif endif @@ -137,7 +156,9 @@ endif endif if ENABLE_EXTENDED_TESTS -TESTS += random.sh +# random.sh is temporarily disabled as it needs some work +# to rsyslog core to complete in reasonable time +#TESTS += random.sh endif if ENABLE_IMFILE @@ -155,6 +176,12 @@ test_files = testbench.h runtime-dummy.c EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ validation-run.sh \ + testsuites/x.509/ca.pem \ + testsuites/x.509/ca-key.pem \ + testsuites/x.509/client-cert.pem \ + testsuites/x.509/client-key.pem \ + testsuites/x.509/machine-cert.pem \ + testsuites/x.509/machine-key.pem \ testsuites/invalid.conf \ testsuites/valid.conf \ cfg.sh \ @@ -245,14 +272,39 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ testsuites/diskqueue.conf \ arrayqueue.sh \ testsuites/arrayqueue.conf \ + rscript_contains.sh \ + testsuites/rscript_contains.conf \ + rscript_field.sh \ + testsuites/rscript_field.conf \ + rscript_stop.sh \ + testsuites/rscript_stop.conf \ + rscript_stop2.sh \ + testsuites/rscript_stop2.conf \ + rscript_prifilt.sh \ + testsuites/rscript_prifilt.conf \ + rscript_optimizer1.sh \ + testsuites/rscript_optimizer1.conf \ + cee_simple.sh \ + testsuites/cee_simple.conf \ + cee_diskqueue.sh \ + testsuites/cee_diskqueue.conf \ linkedlistqueue.sh \ testsuites/linkedlistqueue.conf \ da-mainmsg-q.sh \ testsuites/da-mainmsg-q.conf \ diskqueue-fsync.sh \ testsuites/diskqueue-fsync.conf \ + imtcp-tls-basic.sh \ + imtcp-tls-basic-vg.sh \ + 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-too-few-tls.sh \ + testsuites/manytcp-too-few-tls.conf \ manytcp.sh \ testsuites/manytcp.conf \ manyptcp.sh \ @@ -265,6 +317,9 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ testsuites/imptcp_conndrop.conf \ imtcp_conndrop.sh \ testsuites/imtcp_conndrop.conf \ + imtcp_conndrop_tls.sh \ + imtcp_conndrop_tls-vg.sh \ + testsuites/imtcp_conndrop.conf \ imtcp_addtlframedelim.sh \ testsuites/imtcp_addtlframedelim.conf \ tcp-msgreduc-vg.sh \ @@ -429,13 +484,24 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ libdbi-asyn.sh \ testsuites/libdbi-asyn.conf \ mysql-basic.sh \ + mysql-basic-cnf6.sh \ mysql-basic-vg.sh \ testsuites/mysql-basic.conf \ + testsuites/mysql-basic-cnf6.conf \ mysql-asyn.sh \ mysql-asyn-vg.sh \ testsuites/mysql-asyn.conf \ cfg.sh +# TODO: re-enable +#sndrcv_tls_anon_rebind.sh \ +#testsuites/sndrcv_tls_anon_rebind_sender.conf \ +#testsuites/sndrcv_tls_anon_rebind_rcvr.conf \ +#sndrcv_tls_anon.sh \ +#testsuites/sndrcv_tls_anon_sender.conf \ +#testsuites/sndrcv_tls_anon_rcvr.conf \ +# + ourtail_SOURCES = ourtail.c msleep_SOURCES = msleep.c chkseq_SOURCES = chkseq.c @@ -444,8 +510,11 @@ uxsockrcvr_SOURCES = uxsockrcvr.c uxsockrcvr_LDADD = $(SOL_LIBS) tcpflood_SOURCES = tcpflood.c -tcpflood_CPPFLAGS = $(PTHREADS_CFLAGS) -tcpflood_LDADD = $(SOL_LIBS) $(PTHREADS_LIBS) +tcpflood_CPPFLAGS = $(PTHREADS_CFLAGS) $(GNUTLS_CFLAGS) +tcpflood_LDADD = $(SOL_LIBS) $(PTHREADS_LIBS) $(GNUTLS_LIBS) +if ENABLE_GNUTLS +tcpflood_LDADD += -lgcrypt +endif syslog_caller_SOURCES = syslog_caller.c syslog_caller_LDADD = $(SOL_LIBS) @@ -465,12 +534,15 @@ inputfilegen_LDADD = $(SOL_LIBS) nettester_SOURCES = nettester.c getline.c nettester_LDADD = $(SOL_LIBS) -rt_init_SOURCES = rt-init.c $(test_files) -rt_init_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) -rt_init_LDADD = $(RSRT_LIBS) $(ZLIB_LIBS) $(PTHREADS_LIBS) $(SOL_LIBS) -rt_init_LDFLAGS = -export-dynamic +# rtinit tests disabled for the moment - also questionable if they +# really provide value (after all, everything fails if rtinit fails...) +#rt_init_SOURCES = rt-init.c $(test_files) +#rt_init_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) +#rt_init_LDADD = $(RSRT_LIBS) $(ZLIB_LIBS) $(PTHREADS_LIBS) $(SOL_LIBS) +#rt_init_LDFLAGS = -export-dynamic -rscript_SOURCES = rscript.c getline.c $(test_files) -rscript_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) -rscript_LDADD = $(RSRT_LIBS) $(ZLIB_LIBS) $(PTHREADS_LIBS) $(SOL_LIBS) -rscript_LDFLAGS = -export-dynamic +# same for basic rscript tests +#rscript_SOURCES = rscript.c getline.c $(test_files) +#rscript_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) +#rscript_LDADD = $(RSRT_LIBS) $(ZLIB_LIBS) $(PTHREADS_LIBS) $(SOL_LIBS) +#rscript_LDFLAGS = -export-dynamic diff --git a/tests/Makefile.in b/tests/Makefile.in index 9acbda9..1c8d364 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -33,21 +33,22 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@ENABLE_TESTBENCH_TRUE@check_PROGRAMS = $(am__EXEEXT_1) \ -@ENABLE_TESTBENCH_TRUE@ ourtail$(EXEEXT) nettester$(EXEEXT) \ -@ENABLE_TESTBENCH_TRUE@ tcpflood$(EXEEXT) chkseq$(EXEEXT) \ -@ENABLE_TESTBENCH_TRUE@ msleep$(EXEEXT) randomgen$(EXEEXT) \ -@ENABLE_TESTBENCH_TRUE@ diagtalker$(EXEEXT) uxsockrcvr$(EXEEXT) \ +@ENABLE_TESTBENCH_TRUE@check_PROGRAMS = ourtail$(EXEEXT) \ +@ENABLE_TESTBENCH_TRUE@ nettester$(EXEEXT) tcpflood$(EXEEXT) \ +@ENABLE_TESTBENCH_TRUE@ chkseq$(EXEEXT) msleep$(EXEEXT) \ +@ENABLE_TESTBENCH_TRUE@ randomgen$(EXEEXT) diagtalker$(EXEEXT) \ +@ENABLE_TESTBENCH_TRUE@ uxsockrcvr$(EXEEXT) \ @ENABLE_TESTBENCH_TRUE@ syslog_caller$(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) $(am__append_9) \ -@ENABLE_TESTBENCH_TRUE@ $(am__append_10) $(am__append_11) \ -@ENABLE_TESTBENCH_TRUE@ $(am__append_12) $(am__append_13) +@ENABLE_TESTBENCH_TRUE@TESTS = $(am__append_1) $(am__append_2) \ +@ENABLE_TESTBENCH_TRUE@ $(am__append_3) $(am__append_4) \ +@ENABLE_TESTBENCH_TRUE@ $(am__append_5) $(am__append_6) \ +@ENABLE_TESTBENCH_TRUE@ $(am__append_7) $(am__append_8) \ +@ENABLE_TESTBENCH_TRUE@ $(am__append_9) $(am__append_10) \ +@ENABLE_TESTBENCH_TRUE@ $(am__append_11) $(am__append_12) \ +@ENABLE_TESTBENCH_TRUE@ $(am__append_13) +#TESTS = $(TESTRUNS) cfg.sh @ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_1 = \ @ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ arrayqueue.sh \ @ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ da-mainmsg-q.sh \ @@ -94,29 +95,22 @@ host_triplet = @host@ @ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ imuxsock_logger_root.sh \ @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@ failover-async.sh \ -@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ failover-double.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@ rcvr_fail_restore.sh \ -@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ linkedlistqueue.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_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ udp-msgreduc-vg.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ udp-msgreduc-orgmsg-vg.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ queue-persist.sh + +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@am__append_2 = \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ discard-rptdmsg-vg.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ discard-allmark-vg.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ failover-basic-vg.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ failover-rptd-vg.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ failover-no-basic-vg.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ failover-no-rptd-vg.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ tcp-msgreduc-vg.sh @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-basic-cnf6.sh \ @ENABLE_MYSQL_TESTS_TRUE@@ENABLE_TESTBENCH_TRUE@ mysql-asyn.sh @ENABLE_MYSQL_TESTS_TRUE@@ENABLE_OMLIBDBI_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_4 = \ @@ -134,13 +128,19 @@ host_triplet = @host@ @ENABLE_IMPTCP_TRUE@@ENABLE_TESTBENCH_TRUE@ imptcp_conndrop.sh -# This test does not work on v5 as we keep DH params -#TESTS += manytcp-too-few-tls.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 \ +# TODO: re-enable in newer version +#TESTS += \ +# #sndrcv_tls_anon.sh \ +# #sndrcv_tls_anon_rebind.sh \ +# #imtcp-tls-basic.sh +@ENABLE_GNUTLS_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@am__append_7 = imtcp-tls-basic-vg.sh \ +@ENABLE_GNUTLS_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ imtcp_conndrop_tls-vg.sh + +@ENABLE_OMUXSOCK_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_8 = uxsock_simple.sh +@ENABLE_OMUDPSPOOF_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_9 = sndrcv_omudpspoof.sh \ @ENABLE_OMUDPSPOOF_TRUE@@ENABLE_TESTBENCH_TRUE@ sndrcv_omudpspoof_nonstdpt.sh -@ENABLE_OMSTDOUT_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_9 = omod-if-array.sh \ +@ENABLE_OMSTDOUT_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_10 = 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 \ @@ -152,29 +152,26 @@ 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_10 = omruleset.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_OMRULESET_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_11 = omruleset.sh \ @ENABLE_IMDIAG_TRUE@@ENABLE_OMRULESET_TRUE@@ENABLE_TESTBENCH_TRUE@ omruleset-queue.sh -@ENABLE_EXTENDED_TESTS_TRUE@@ENABLE_TESTBENCH_TRUE@am__append_11 = random.sh + +# random.sh is temporarily disabled as it needs some work +# to rsyslog core to complete in reasonable time +#TESTS += 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 +@ENABLE_GNUTLS_TRUE@am__append_14 = -lgcrypt subdir = tests -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - INSTALL +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/atomic_operations.m4 \ - $(top_srcdir)/m4/atomic_operations_64bit.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -@ENABLE_TESTBENCH_TRUE@am__EXEEXT_1 = rt_init$(EXEEXT) \ -@ENABLE_TESTBENCH_TRUE@ rscript$(EXEEXT) am_chkseq_OBJECTS = chkseq.$(OBJEXT) chkseq_OBJECTS = $(am_chkseq_OBJECTS) chkseq_LDADD = $(LDADD) @@ -200,23 +197,6 @@ ourtail_LDADD = $(LDADD) am_randomgen_OBJECTS = randomgen.$(OBJEXT) randomgen_OBJECTS = $(am_randomgen_OBJECTS) randomgen_DEPENDENCIES = $(am__DEPENDENCIES_1) -am__objects_1 = rscript-runtime-dummy.$(OBJEXT) -am_rscript_OBJECTS = rscript-rscript.$(OBJEXT) \ - rscript-getline.$(OBJEXT) $(am__objects_1) -rscript_OBJECTS = $(am_rscript_OBJECTS) -rscript_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -rscript_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(rscript_LDFLAGS) $(LDFLAGS) -o $@ -am__objects_2 = rt_init-runtime-dummy.$(OBJEXT) -am_rt_init_OBJECTS = rt_init-rt-init.$(OBJEXT) $(am__objects_2) -rt_init_OBJECTS = $(am_rt_init_OBJECTS) -rt_init_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -rt_init_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(rt_init_LDFLAGS) $(LDFLAGS) -o $@ am_syslog_caller_OBJECTS = syslog_caller.$(OBJEXT) syslog_caller_OBJECTS = $(am_syslog_caller_OBJECTS) syslog_caller_DEPENDENCIES = $(am__DEPENDENCIES_1) @@ -225,7 +205,8 @@ syslog_inject_OBJECTS = $(am_syslog_inject_OBJECTS) syslog_inject_DEPENDENCIES = $(am__DEPENDENCIES_1) am_tcpflood_OBJECTS = tcpflood-tcpflood.$(OBJEXT) tcpflood_OBJECTS = $(am_tcpflood_OBJECTS) -tcpflood_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +tcpflood_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_uxsockrcvr_OBJECTS = uxsockrcvr.$(OBJEXT) uxsockrcvr_OBJECTS = $(am_uxsockrcvr_OBJECTS) uxsockrcvr_DEPENDENCIES = $(am__DEPENDENCIES_1) @@ -257,16 +238,14 @@ am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; 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) + $(ourtail_SOURCES) $(randomgen_SOURCES) \ + $(syslog_caller_SOURCES) $(syslog_inject_SOURCES) \ + $(tcpflood_SOURCES) $(uxsockrcvr_SOURCES) DIST_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) + $(ourtail_SOURCES) $(randomgen_SOURCES) \ + $(syslog_caller_SOURCES) $(syslog_inject_SOURCES) \ + $(tcpflood_SOURCES) $(uxsockrcvr_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ @@ -285,7 +264,11 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ CYGPATH_W = @CYGPATH_W@ +CZMQ_CFLAGS = @CZMQ_CFLAGS@ +CZMQ_LIBS = @CZMQ_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DL_LIBS = @DL_LIBS@ @@ -301,27 +284,48 @@ GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ GNUTLS_LIBS = @GNUTLS_LIBS@ GREP = @GREP@ GSS_LIBS = @GSS_LIBS@ -HAVE_JAVAC = @HAVE_JAVAC@ +HAVE_CURL_CONFIG = @HAVE_CURL_CONFIG@ HAVE_MYSQL_CONFIG = @HAVE_MYSQL_CONFIG@ HAVE_ORACLE_CONFIG = @HAVE_ORACLE_CONFIG@ HAVE_PGSQL_CONFIG = @HAVE_PGSQL_CONFIG@ +HIREDIS_CFLAGS = @HIREDIS_CFLAGS@ +HIREDIS_LIBS = @HIREDIS_LIBS@ IMUDP_LIBS = @IMUDP_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JSON_CFLAGS = @JSON_CFLAGS@ +JSON_C_CFLAGS = @JSON_C_CFLAGS@ +JSON_C_LIBS = @JSON_C_LIBS@ +JSON_LIBS = @JSON_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBDBI_CFLAGS = @LIBDBI_CFLAGS@ LIBDBI_LIBS = @LIBDBI_LIBS@ +LIBEE_CFLAGS = @LIBEE_CFLAGS@ +LIBEE_LIBS = @LIBEE_LIBS@ +LIBESTR_CFLAGS = @LIBESTR_CFLAGS@ +LIBESTR_LIBS = @LIBESTR_LIBS@ LIBLOGGING_CFLAGS = @LIBLOGGING_CFLAGS@ LIBLOGGING_LIBS = @LIBLOGGING_LIBS@ +LIBLOGNORM_CFLAGS = @LIBLOGNORM_CFLAGS@ +LIBLOGNORM_LIBS = @LIBLOGNORM_LIBS@ +LIBMONGO_CLIENT_CFLAGS = @LIBMONGO_CLIENT_CFLAGS@ +LIBMONGO_CLIENT_LIBS = @LIBMONGO_CLIENT_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBUUID_CFLAGS = @LIBUUID_CFLAGS@ +LIBUUID_LIBS = @LIBUUID_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ +LOGNORM_CFLAGS = @LOGNORM_CFLAGS@ +LOGNORM_LIBS = @LOGNORM_LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ @@ -354,7 +358,9 @@ RANLIB = @RANLIB@ RELP_CFLAGS = @RELP_CFLAGS@ RELP_LIBS = @RELP_LIBS@ RSRT_CFLAGS = @RSRT_CFLAGS@ +RSRT_CFLAGS1 = @RSRT_CFLAGS1@ RSRT_LIBS = @RSRT_LIBS@ +RSRT_LIBS1 = @RSRT_LIBS1@ RT_LIBS = @RT_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -366,6 +372,8 @@ STRIP = @STRIP@ UDPSPOOF_CFLAGS = @UDPSPOOF_CFLAGS@ UDPSPOOF_LIBS = @UDPSPOOF_LIBS@ VERSION = @VERSION@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ @@ -404,6 +412,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moddirs = @moddirs@ @@ -421,12 +430,17 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -@ENABLE_TESTBENCH_TRUE@TESTRUNS = rt_init rscript TESTS_ENVIRONMENT = RSYSLOG_MODDIR='$(abs_top_builddir)'/runtime/.libs/ DISTCLEANFILES = rsyslog.pid test_files = testbench.h runtime-dummy.c EXTRA_DIST = 1.rstest 2.rstest 3.rstest err1.rstest \ validation-run.sh \ + testsuites/x.509/ca.pem \ + testsuites/x.509/ca-key.pem \ + testsuites/x.509/client-cert.pem \ + testsuites/x.509/client-key.pem \ + testsuites/x.509/machine-cert.pem \ + testsuites/x.509/machine-key.pem \ testsuites/invalid.conf \ testsuites/valid.conf \ cfg.sh \ @@ -517,14 +531,39 @@ EXTRA_DIST = 1.rstest 2.rstest 3.rstest err1.rstest \ testsuites/diskqueue.conf \ arrayqueue.sh \ testsuites/arrayqueue.conf \ + rscript_contains.sh \ + testsuites/rscript_contains.conf \ + rscript_field.sh \ + testsuites/rscript_field.conf \ + rscript_stop.sh \ + testsuites/rscript_stop.conf \ + rscript_stop2.sh \ + testsuites/rscript_stop2.conf \ + rscript_prifilt.sh \ + testsuites/rscript_prifilt.conf \ + rscript_optimizer1.sh \ + testsuites/rscript_optimizer1.conf \ + cee_simple.sh \ + testsuites/cee_simple.conf \ + cee_diskqueue.sh \ + testsuites/cee_diskqueue.conf \ linkedlistqueue.sh \ testsuites/linkedlistqueue.conf \ da-mainmsg-q.sh \ testsuites/da-mainmsg-q.conf \ diskqueue-fsync.sh \ testsuites/diskqueue-fsync.conf \ + imtcp-tls-basic.sh \ + imtcp-tls-basic-vg.sh \ + 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-too-few-tls.sh \ + testsuites/manytcp-too-few-tls.conf \ manytcp.sh \ testsuites/manytcp.conf \ manyptcp.sh \ @@ -537,6 +576,9 @@ EXTRA_DIST = 1.rstest 2.rstest 3.rstest err1.rstest \ testsuites/imptcp_conndrop.conf \ imtcp_conndrop.sh \ testsuites/imtcp_conndrop.conf \ + imtcp_conndrop_tls.sh \ + imtcp_conndrop_tls-vg.sh \ + testsuites/imtcp_conndrop.conf \ imtcp_addtlframedelim.sh \ testsuites/imtcp_addtlframedelim.conf \ tcp-msgreduc-vg.sh \ @@ -701,21 +743,33 @@ EXTRA_DIST = 1.rstest 2.rstest 3.rstest err1.rstest \ libdbi-asyn.sh \ testsuites/libdbi-asyn.conf \ mysql-basic.sh \ + mysql-basic-cnf6.sh \ mysql-basic-vg.sh \ testsuites/mysql-basic.conf \ + testsuites/mysql-basic-cnf6.conf \ mysql-asyn.sh \ mysql-asyn-vg.sh \ testsuites/mysql-asyn.conf \ cfg.sh + +# TODO: re-enable +#sndrcv_tls_anon_rebind.sh \ +#testsuites/sndrcv_tls_anon_rebind_sender.conf \ +#testsuites/sndrcv_tls_anon_rebind_rcvr.conf \ +#sndrcv_tls_anon.sh \ +#testsuites/sndrcv_tls_anon_sender.conf \ +#testsuites/sndrcv_tls_anon_rcvr.conf \ +# ourtail_SOURCES = ourtail.c msleep_SOURCES = msleep.c chkseq_SOURCES = chkseq.c uxsockrcvr_SOURCES = uxsockrcvr.c uxsockrcvr_LDADD = $(SOL_LIBS) tcpflood_SOURCES = tcpflood.c -tcpflood_CPPFLAGS = $(PTHREADS_CFLAGS) -tcpflood_LDADD = $(SOL_LIBS) $(PTHREADS_LIBS) +tcpflood_CPPFLAGS = $(PTHREADS_CFLAGS) $(GNUTLS_CFLAGS) +tcpflood_LDADD = $(SOL_LIBS) $(PTHREADS_LIBS) $(GNUTLS_LIBS) \ + $(am__append_14) syslog_caller_SOURCES = syslog_caller.c syslog_caller_LDADD = $(SOL_LIBS) syslog_inject_SOURCES = syslog_inject.c @@ -728,14 +782,6 @@ 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) -rt_init_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) -rt_init_LDADD = $(RSRT_LIBS) $(ZLIB_LIBS) $(PTHREADS_LIBS) $(SOL_LIBS) -rt_init_LDFLAGS = -export-dynamic -rscript_SOURCES = rscript.c getline.c $(test_files) -rscript_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) -rscript_LDADD = $(RSRT_LIBS) $(ZLIB_LIBS) $(PTHREADS_LIBS) $(SOL_LIBS) -rscript_LDFLAGS = -export-dynamic all: all-am .SUFFIXES: @@ -800,12 +846,6 @@ ourtail$(EXEEXT): $(ourtail_OBJECTS) $(ourtail_DEPENDENCIES) randomgen$(EXEEXT): $(randomgen_OBJECTS) $(randomgen_DEPENDENCIES) @rm -f randomgen$(EXEEXT) $(AM_V_CCLD)$(LINK) $(randomgen_OBJECTS) $(randomgen_LDADD) $(LIBS) -rscript$(EXEEXT): $(rscript_OBJECTS) $(rscript_DEPENDENCIES) - @rm -f rscript$(EXEEXT) - $(AM_V_CCLD)$(rscript_LINK) $(rscript_OBJECTS) $(rscript_LDADD) $(LIBS) -rt_init$(EXEEXT): $(rt_init_OBJECTS) $(rt_init_DEPENDENCIES) - @rm -f rt_init$(EXEEXT) - $(AM_V_CCLD)$(rt_init_LINK) $(rt_init_OBJECTS) $(rt_init_LDADD) $(LIBS) syslog_caller$(EXEEXT): $(syslog_caller_OBJECTS) $(syslog_caller_DEPENDENCIES) @rm -f syslog_caller$(EXEEXT) $(AM_V_CCLD)$(LINK) $(syslog_caller_OBJECTS) $(syslog_caller_LDADD) $(LIBS) @@ -833,11 +873,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nettester.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ourtail.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/randomgen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rscript-getline.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rscript-rscript.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rscript-runtime-dummy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_init-rt-init.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_init-runtime-dummy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syslog_caller.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syslog_inject.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpflood-tcpflood.Po@am__quote@ @@ -867,86 +902,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< -rscript-rscript.o: rscript.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rscript_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rscript-rscript.o -MD -MP -MF $(DEPDIR)/rscript-rscript.Tpo -c -o rscript-rscript.o `test -f 'rscript.c' || echo '$(srcdir)/'`rscript.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rscript-rscript.Tpo $(DEPDIR)/rscript-rscript.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rscript.c' object='rscript-rscript.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rscript_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rscript-rscript.o `test -f 'rscript.c' || echo '$(srcdir)/'`rscript.c - -rscript-rscript.obj: rscript.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rscript_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rscript-rscript.obj -MD -MP -MF $(DEPDIR)/rscript-rscript.Tpo -c -o rscript-rscript.obj `if test -f 'rscript.c'; then $(CYGPATH_W) 'rscript.c'; else $(CYGPATH_W) '$(srcdir)/rscript.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rscript-rscript.Tpo $(DEPDIR)/rscript-rscript.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rscript.c' object='rscript-rscript.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rscript_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rscript-rscript.obj `if test -f 'rscript.c'; then $(CYGPATH_W) 'rscript.c'; else $(CYGPATH_W) '$(srcdir)/rscript.c'; fi` - -rscript-getline.o: getline.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rscript_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rscript-getline.o -MD -MP -MF $(DEPDIR)/rscript-getline.Tpo -c -o rscript-getline.o `test -f 'getline.c' || echo '$(srcdir)/'`getline.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rscript-getline.Tpo $(DEPDIR)/rscript-getline.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getline.c' object='rscript-getline.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rscript_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rscript-getline.o `test -f 'getline.c' || echo '$(srcdir)/'`getline.c - -rscript-getline.obj: getline.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rscript_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rscript-getline.obj -MD -MP -MF $(DEPDIR)/rscript-getline.Tpo -c -o rscript-getline.obj `if test -f 'getline.c'; then $(CYGPATH_W) 'getline.c'; else $(CYGPATH_W) '$(srcdir)/getline.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rscript-getline.Tpo $(DEPDIR)/rscript-getline.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getline.c' object='rscript-getline.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rscript_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rscript-getline.obj `if test -f 'getline.c'; then $(CYGPATH_W) 'getline.c'; else $(CYGPATH_W) '$(srcdir)/getline.c'; fi` - -rscript-runtime-dummy.o: runtime-dummy.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rscript_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rscript-runtime-dummy.o -MD -MP -MF $(DEPDIR)/rscript-runtime-dummy.Tpo -c -o rscript-runtime-dummy.o `test -f 'runtime-dummy.c' || echo '$(srcdir)/'`runtime-dummy.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rscript-runtime-dummy.Tpo $(DEPDIR)/rscript-runtime-dummy.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime-dummy.c' object='rscript-runtime-dummy.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rscript_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rscript-runtime-dummy.o `test -f 'runtime-dummy.c' || echo '$(srcdir)/'`runtime-dummy.c - -rscript-runtime-dummy.obj: runtime-dummy.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rscript_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rscript-runtime-dummy.obj -MD -MP -MF $(DEPDIR)/rscript-runtime-dummy.Tpo -c -o rscript-runtime-dummy.obj `if test -f 'runtime-dummy.c'; then $(CYGPATH_W) 'runtime-dummy.c'; else $(CYGPATH_W) '$(srcdir)/runtime-dummy.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rscript-runtime-dummy.Tpo $(DEPDIR)/rscript-runtime-dummy.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime-dummy.c' object='rscript-runtime-dummy.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rscript_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rscript-runtime-dummy.obj `if test -f 'runtime-dummy.c'; then $(CYGPATH_W) 'runtime-dummy.c'; else $(CYGPATH_W) '$(srcdir)/runtime-dummy.c'; fi` - -rt_init-rt-init.o: rt-init.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rt_init_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rt_init-rt-init.o -MD -MP -MF $(DEPDIR)/rt_init-rt-init.Tpo -c -o rt_init-rt-init.o `test -f 'rt-init.c' || echo '$(srcdir)/'`rt-init.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rt_init-rt-init.Tpo $(DEPDIR)/rt_init-rt-init.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rt-init.c' object='rt_init-rt-init.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rt_init_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rt_init-rt-init.o `test -f 'rt-init.c' || echo '$(srcdir)/'`rt-init.c - -rt_init-rt-init.obj: rt-init.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rt_init_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rt_init-rt-init.obj -MD -MP -MF $(DEPDIR)/rt_init-rt-init.Tpo -c -o rt_init-rt-init.obj `if test -f 'rt-init.c'; then $(CYGPATH_W) 'rt-init.c'; else $(CYGPATH_W) '$(srcdir)/rt-init.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rt_init-rt-init.Tpo $(DEPDIR)/rt_init-rt-init.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rt-init.c' object='rt_init-rt-init.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rt_init_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rt_init-rt-init.obj `if test -f 'rt-init.c'; then $(CYGPATH_W) 'rt-init.c'; else $(CYGPATH_W) '$(srcdir)/rt-init.c'; fi` - -rt_init-runtime-dummy.o: runtime-dummy.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rt_init_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rt_init-runtime-dummy.o -MD -MP -MF $(DEPDIR)/rt_init-runtime-dummy.Tpo -c -o rt_init-runtime-dummy.o `test -f 'runtime-dummy.c' || echo '$(srcdir)/'`runtime-dummy.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rt_init-runtime-dummy.Tpo $(DEPDIR)/rt_init-runtime-dummy.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime-dummy.c' object='rt_init-runtime-dummy.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rt_init_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rt_init-runtime-dummy.o `test -f 'runtime-dummy.c' || echo '$(srcdir)/'`runtime-dummy.c - -rt_init-runtime-dummy.obj: runtime-dummy.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rt_init_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rt_init-runtime-dummy.obj -MD -MP -MF $(DEPDIR)/rt_init-runtime-dummy.Tpo -c -o rt_init-runtime-dummy.obj `if test -f 'runtime-dummy.c'; then $(CYGPATH_W) 'runtime-dummy.c'; else $(CYGPATH_W) '$(srcdir)/runtime-dummy.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rt_init-runtime-dummy.Tpo $(DEPDIR)/rt_init-runtime-dummy.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime-dummy.c' object='rt_init-runtime-dummy.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rt_init_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rt_init-runtime-dummy.obj `if test -f 'runtime-dummy.c'; then $(CYGPATH_W) 'runtime-dummy.c'; else $(CYGPATH_W) '$(srcdir)/runtime-dummy.c'; fi` - tcpflood-tcpflood.o: tcpflood.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tcpflood_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tcpflood-tcpflood.o -MD -MP -MF $(DEPDIR)/tcpflood-tcpflood.Tpo -c -o tcpflood-tcpflood.o `test -f 'tcpflood.c' || echo '$(srcdir)/'`tcpflood.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tcpflood-tcpflood.Tpo $(DEPDIR)/tcpflood-tcpflood.Po @@ -1262,6 +1217,39 @@ uninstall-am: mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am +@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@ failover-async.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ failover-double.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@ rcvr_fail_restore.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ rscript_contains.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ rscript_field.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ rscript_stop.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ rscript_stop2.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ rscript_prifilt.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ rscript_optimizer1.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ cee_simple.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ cee_diskqueue.sh \ +@ENABLE_IMDIAG_TRUE@@ENABLE_TESTBENCH_TRUE@ linkedlistqueue.sh +@ENABLE_GNUTLS_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ manytcp-too-few-tls-vg.sh + +# rtinit tests disabled for the moment - also questionable if they +# really provide value (after all, everything fails if rtinit fails...) +#rt_init_SOURCES = rt-init.c $(test_files) +#rt_init_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) +#rt_init_LDADD = $(RSRT_LIBS) $(ZLIB_LIBS) $(PTHREADS_LIBS) $(SOL_LIBS) +#rt_init_LDFLAGS = -export-dynamic + +# same for basic rscript tests +#rscript_SOURCES = rscript.c getline.c $(test_files) +#rscript_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) +#rscript_LDADD = $(RSRT_LIBS) $(ZLIB_LIBS) $(PTHREADS_LIBS) $(SOL_LIBS) +#rscript_LDFLAGS = -export-dynamic # 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/cee_diskqueue.sh b/tests/cee_diskqueue.sh new file mode 100755 index 0000000..4e19855 --- /dev/null +++ b/tests/cee_diskqueue.sh @@ -0,0 +1,14 @@ +# check if CEE properties are properly saved & restored to/from disk queue +# added 2012-09-19 by rgerhards +# This file is part of the rsyslog project, released under ASL 2.0 +echo =============================================================================== +echo \[cee_diskqueue.sh\]: CEE and diskqueue test +source $srcdir/diag.sh init +source $srcdir/diag.sh startup cee_diskqueue.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/cee_simple.sh b/tests/cee_simple.sh new file mode 100755 index 0000000..32f5639 --- /dev/null +++ b/tests/cee_simple.sh @@ -0,0 +1,13 @@ +# added 2012-09-19 by rgerhards +# This file is part of the rsyslog project, released under ASL 2.0 +echo =============================================================================== +echo \[cee_simple.sh\]: basic CEE property test +source $srcdir/diag.sh init +source $srcdir/diag.sh startup cee_simple.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/cfg.sh b/tests/cfg.sh index f850c4d..7610407 100755 --- a/tests/cfg.sh +++ b/tests/cfg.sh @@ -37,7 +37,7 @@ echo "local directory" # # check empty config file # -../tools/rsyslogd -c4 -N1 -f/dev/null 2>&1 |./ourtail |head -2 > tmp +../tools/rsyslogd -c4 -N1 -f/dev/null -M../runtime/.libs:../.libs 2>&1 |./ourtail |head -2 > tmp cmp tmp $srcdir/DevNull.cfgtest if [ ! $? -eq 0 ]; then echo "DevNull.cfgtest failed" @@ -52,7 +52,7 @@ fi; # # check missing config file # -../tools/rsyslogd -c4 -N1 -f/This/does/not/exist 2>&1 |./ourtail |head -2 > tmp +../tools/rsyslogd -c4 -N1 -M../runtime/.libs:../.libs -f/This/does/not/exist 2>&1 |./ourtail |head -2 > tmp cmp tmp $srcdir/NoExistFile.cfgtest if [ ! $? -eq 0 ]; then echo "NoExistFile.cfgtest failed" diff --git a/tests/diag.sh b/tests/diag.sh index 3e0263c..b278d2c 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 nologfuncflow noprintmutexaction stdout" +#export RSYSLOG_DEBUG="debug nologfuncflow noprintmutexaction nostdout" #export RSYSLOG_DEBUGLOG="log" case $1 in 'init') $srcdir/killrsyslog.sh # kill rsyslogd if it runs for some reason @@ -31,7 +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 stat-file1 rm -f rsyslog.out.*.log rsyslog.random.data work-presort rsyslog.pipe - rm -f rsyslog.input stat-file1 #rsyslog.empty + rm -f rsyslog.input rsyslog.conf.tlscert stat-file1 rsyslog.empty echo ------------------------------------------------------------------------------- ;; 'startup') # start rsyslogd with default params. $2 is the config file name to use @@ -41,7 +41,7 @@ case $1 in ;; 'startup-vg') # start rsyslogd with default params under valgrind control. $2 is the config file name to use # returns only after successful startup, $3 is the instance (blank or 2!) - valgrind --error-exitcode=10 --malloc-fill=ff --free-fill=fe --leak-check=full ../tools/rsyslogd -c6 -u2 -n -irsyslog$3.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/$2 & + valgrind --log-fd=1 --error-exitcode=10 --malloc-fill=ff --free-fill=fe --leak-check=full ../tools/rsyslogd -c6 -u2 -n -irsyslog$3.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/$2 & $srcdir/diag.sh wait-startup $3 ;; 'wait-startup') # wait for rsyslogd startup ($2 is the instance) diff --git a/tests/imtcp-tls-basic-vg.sh b/tests/imtcp-tls-basic-vg.sh new file mode 100755 index 0000000..960a14d --- /dev/null +++ b/tests/imtcp-tls-basic-vg.sh @@ -0,0 +1,15 @@ +# added 2011-02-28 by Rgerhards +# This file is part of the rsyslog project, released under GPLv3 +echo =============================================================================== +echo \[imtcp-tls-basic-vg.sh\]: testing imtcp in TLS mode - basic test +source $srcdir/diag.sh init +echo \$DefaultNetstreamDriverCAFile $srcdir/tls-certs/ca.pem >rsyslog.conf.tlscert +echo \$DefaultNetstreamDriverCertFile $srcdir/tls-certs/cert.pem >>rsyslog.conf.tlscert +echo \$DefaultNetstreamDriverKeyFile $srcdir/tls-certs/key.pem >>rsyslog.conf.tlscert +source $srcdir/diag.sh startup-vg imtcp-tls-basic.conf +source $srcdir/diag.sh tcpflood -p13514 -m50000 -Ttls -Z$srcdir/tls-certs/cert.pem -z$srcdir/tls-certs/key.pem +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/imtcp-tls-basic.sh b/tests/imtcp-tls-basic.sh new file mode 100755 index 0000000..bfe2488 --- /dev/null +++ b/tests/imtcp-tls-basic.sh @@ -0,0 +1,14 @@ +# added 2011-02-28 by Rgerhards +# This file is part of the rsyslog project, released under GPLv3 +echo =============================================================================== +echo \[imtcp-tls-basic.sh\]: testing imtcp in TLS mode - basic test +source $srcdir/diag.sh init +echo \$DefaultNetstreamDriverCAFile $srcdir/tls-certs/ca.pem >rsyslog.conf.tlscert +echo \$DefaultNetstreamDriverCertFile $srcdir/tls-certs/cert.pem >>rsyslog.conf.tlscert +echo \$DefaultNetstreamDriverKeyFile $srcdir/tls-certs/key.pem >>rsyslog.conf.tlscert +source $srcdir/diag.sh startup imtcp-tls-basic.conf +source $srcdir/diag.sh tcpflood -p13514 -m50000 -Ttls -Z$srcdir/tls-certs/cert.pem -z$srcdir/tls-certs/key.pem +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 49999 +source $srcdir/diag.sh exit diff --git a/tests/imtcp_conndrop.sh b/tests/imtcp_conndrop.sh index 0bfcd99..c507392 100755 --- a/tests/imtcp_conndrop.sh +++ b/tests/imtcp_conndrop.sh @@ -4,7 +4,6 @@ # This file is part of the rsyslog project, released under GPLv3 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 imtcp_conndrop.conf # 100 byte messages to gain more practical data use diff --git a/tests/imtcp_conndrop_tls-vg.sh b/tests/imtcp_conndrop_tls-vg.sh new file mode 100755 index 0000000..21f6876 --- /dev/null +++ b/tests/imtcp_conndrop_tls-vg.sh @@ -0,0 +1,17 @@ +# Test imtcp/TLS with many dropping connections +# added 2011-06-09 by Rgerhards +# +# This file is part of the rsyslog project, released under GPLv3 +echo ==================================================================================== +echo TEST: \[imtcp_conndrop_tls-vg.sh\]: test imtcp/tls with random connection drops +cat rsyslog.action.1.include +source $srcdir/diag.sh init +source $srcdir/diag.sh startup-vg imtcp_conndrop.conf +# 100 byte messages to gain more practical data use +source $srcdir/diag.sh tcpflood -c20 -m50000 -r -d100 -P129 -D +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-vg # and wait for it to terminate +source $srcdir/diag.sh check-exit-vg +source $srcdir/diag.sh seq-check 0 49999 -E +source $srcdir/diag.sh exit diff --git a/tests/imtcp_conndrop_tls.sh b/tests/imtcp_conndrop_tls.sh new file mode 100755 index 0000000..31a3477 --- /dev/null +++ b/tests/imtcp_conndrop_tls.sh @@ -0,0 +1,16 @@ +# Test imtcp/TLS with many dropping connections +# added 2011-06-09 by Rgerhards +# +# This file is part of the rsyslog project, released under GPLv3 +echo ==================================================================================== +echo TEST: \[imtcp_conndrop_tls.sh\]: test imtcp/tls with random connection drops +cat rsyslog.action.1.include +source $srcdir/diag.sh init +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 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 +source $srcdir/diag.sh exit diff --git a/tests/imuxsock_ccmiddle_root.sh b/tests/imuxsock_ccmiddle_root.sh index b487611..7f255bd 100755 --- a/tests/imuxsock_ccmiddle_root.sh +++ b/tests/imuxsock_ccmiddle_root.sh @@ -2,6 +2,9 @@ # carry out this test echo \[imuxsock_ccmiddle_root.sh\]: test trailing LF handling in imuxsock echo This test must be run as root with no other active syslogd +if [ "$EUID" -ne 0 ]; then + exit 77 # Not root, skip this test +fi source $srcdir/diag.sh init source $srcdir/diag.sh startup imuxsock_ccmiddle_root.conf # send a message with trailing LF diff --git a/tests/imuxsock_logger_root.sh b/tests/imuxsock_logger_root.sh index 377999f..0902d79 100755 --- a/tests/imuxsock_logger_root.sh +++ b/tests/imuxsock_logger_root.sh @@ -2,6 +2,9 @@ # carry out this test. echo \[imuxsock_logger_root.sh\]: test trailing LF handling in imuxsock echo This test must be run as root with no other active syslogd +if [ "$EUID" -ne 0 ]; then + exit 77 # Not root, skip this test +fi source $srcdir/diag.sh init source $srcdir/diag.sh startup imuxsock_logger_root.conf # send a message with trailing LF diff --git a/tests/imuxsock_traillf_root.sh b/tests/imuxsock_traillf_root.sh index 1b821ee..0141a62 100755 --- a/tests/imuxsock_traillf_root.sh +++ b/tests/imuxsock_traillf_root.sh @@ -2,6 +2,9 @@ # carry out this test echo \[imuxsock_traillf_root.sh\]: test trailing LF handling in imuxsock echo This test must be run as root with no other active syslogd +if [ "$EUID" -ne 0 ]; then + exit 77 # Not root, skip this test +fi source $srcdir/diag.sh init source $srcdir/diag.sh startup imuxsock_traillf_root.conf # send a message with trailing LF diff --git a/tests/inputfilegen.c b/tests/inputfilegen.c index 26fb79a..0ff8d04 100644 --- a/tests/inputfilegen.c +++ b/tests/inputfilegen.c @@ -1,5 +1,6 @@ /* generate an input file suitable for use by the testbench * Copyright (C) 2011 by Rainer Gerhards and Adiscon GmbH. + * usage: ./inputfilegen num-lines > file * Part of rsyslog, licensed under GPLv3 */ #include diff --git a/tests/manytcp-too-few-tls.sh b/tests/manytcp-too-few-tls.sh new file mode 100755 index 0000000..8d401f4 --- /dev/null +++ b/tests/manytcp-too-few-tls.sh @@ -0,0 +1,17 @@ +# test many concurrent tcp connections +echo \[manytcp-too-few-tls.sh\]: test concurrent tcp connections +source $srcdir/diag.sh init +source $srcdir/diag.sh startup-vg manytcp-too-few-tls.conf +# the config file specifies exactly 1100 connections +source $srcdir/diag.sh tcpflood -c1000 -m40000 +# the sleep below is needed to prevent too-early termination of the tcp listener +sleep 1 +source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +source $srcdir/diag.sh wait-shutdown-vg # we need to wait until rsyslogd is finished! +source $srcdir/diag.sh check-exit-vg +# we do not do a seq check, as of the design of this test some messages +# will be lost. So there is no point in checking if all were received. The +# point is that we look at the valgrind result, to make sure we do not +# have a mem leak in those error cases (we had in the past, thus the test +# to prevent that in the future). +source $srcdir/diag.sh exit diff --git a/tests/mysql-basic-cnf6.sh b/tests/mysql-basic-cnf6.sh new file mode 100755 index 0000000..8990ba3 --- /dev/null +++ b/tests/mysql-basic-cnf6.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-cnf6.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/rscript.c b/tests/rscript.c deleted file mode 100644 index 6361aec..0000000 --- a/tests/rscript.c +++ /dev/null @@ -1,263 +0,0 @@ -/* This test checks runtime initialization and exit. Other than that, it - * also serves as the most simplistic sample of how a test can be coded. - * - * Part of the testbench for rsyslog. - * - * Copyright 2008 Rainer Gerhards and Adiscon GmbH. - * - * This file is part of rsyslog. - * - * Rsyslog is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Rsyslog is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Rsyslog. If not, see . - * - * A copy of the GPL can be found in the file "COPYING" in this distribution. - */ -#include "config.h" -#include -#include -#include -#include - -#include "rsyslog.h" -#include "testbench.h" -#include "ctok.h" -#include "expr.h" - -MODULE_TYPE_TESTBENCH -/* define addtional objects we need for our tests */ -DEFobjCurrIf(expr) -DEFobjCurrIf(ctok) -DEFobjCurrIf(ctok_token) -DEFobjCurrIf(vmprg) - - -BEGINInit -CODESTARTInit - pErrObj = "expr"; CHKiRet(objUse(expr, CORE_COMPONENT)); - pErrObj = "ctok"; CHKiRet(objUse(ctok, CORE_COMPONENT)); - pErrObj = "ctok_token"; CHKiRet(objUse(ctok_token, CORE_COMPONENT)); - pErrObj = "vmprg"; CHKiRet(objUse(vmprg, CORE_COMPONENT)); -ENDInit - -BEGINExit -CODESTARTExit -ENDExit - - -/* perform a single test. This involves compiling the test script, - * checking the result of the compilation (iRet) and a check of the - * generated program (via a simple strcmp). The resulting program - * check is only done if the test should not detect a syntax error - * (for obvious reasons, there is no point in checking the result of - * a failed compilation). - * rgerhards, 2008-07--07 - */ -static rsRetVal -PerformTest(cstr_t *pstrIn, rsRetVal iRetExpected, cstr_t *pstrOut) -{ - cstr_t *pstrPrg = NULL; - ctok_t *tok = NULL; - ctok_token_t *pToken = NULL; - expr_t *pExpr; - rsRetVal localRet; - DEFiRet; - - /* we first need a tokenizer... */ - CHKiRet(ctok.Construct(&tok)); - CHKiRet(ctok.Setpp(tok, rsCStrGetSzStr(pstrIn))); - CHKiRet(ctok.ConstructFinalize(tok)); - - /* now construct our expression */ - CHKiRet(expr.Construct(&pExpr)); - CHKiRet(expr.ConstructFinalize(pExpr)); - - /* ready to go... */ - localRet = expr.Parse(pExpr, tok); - - /* check if we expected an error */ - if(localRet != iRetExpected) { - printf("Error in compile return code. Expected %d, received %d\n", - iRetExpected, localRet); - CHKiRet(rsCStrConstruct(&pstrPrg)); - CHKiRet(vmprg.Obj2Str(pExpr->pVmprg, pstrPrg)); - printf("generated vmprg:\n%s\n", rsCStrGetSzStr(pstrPrg)); - ABORT_FINALIZE(iRetExpected == RS_RET_OK ? localRet : RS_RET_ERR); - } - - if(iRetExpected != RS_RET_OK) - FINALIZE; /* if we tested an error case, we are done */ - - /* OK, we got a compiled program, so now let's compare that */ - - CHKiRet(rsCStrConstruct(&pstrPrg)); - CHKiRet(vmprg.Obj2Str(pExpr->pVmprg, pstrPrg)); - - if(strcmp((char*)rsCStrGetSzStr(pstrPrg), (char*)rsCStrGetSzStr(pstrOut))) { - printf("error: compiled program different from expected result!\n"); - printf("generated vmprg (%d bytes):\n%s\n", (int)strlen((char*)rsCStrGetSzStr(pstrPrg)), rsCStrGetSzStr(pstrPrg)); - printf("expected (%d bytes):\n%s\n", (int)strlen((char*)rsCStrGetSzStr(pstrOut)), rsCStrGetSzStr(pstrOut)); - ABORT_FINALIZE(RS_RET_ERR); - } - -finalize_it: - /* we are done, so we now need to restore things */ - if(pToken != NULL) - ctok_token.Destruct(&pToken); /* no longer needed */ - if(pstrPrg != NULL) - rsCStrDestruct(&pstrPrg); - if(tok != NULL) - ctok.Destruct(&tok); - RETiRet; -} - - -/* a helper macro to generate some often-used code... */ -#define CHKEOF \ - if(feof(fp)) { \ - printf("error: unexpected end of control file %s\n", pszFileName); \ - ABORT_FINALIZE(RS_RET_ERR); \ - } -/* process a single test file - * Note that we do not do a real parser here. The effort is not - * justified by what we need to do. So it is a quick shot. - * rgerhards, 2008-07-07 - */ -static rsRetVal -ProcessTestFile(uchar *pszFileName) -{ - FILE *fp; - char *lnptr = NULL; - size_t lenLn; - cstr_t *pstrIn = NULL; - cstr_t *pstrOut = NULL; - int iParse; - rsRetVal iRetExpected; - DEFiRet; - - if((fp = fopen((char*)pszFileName, "r")) == NULL) { - perror((char*)pszFileName); - ABORT_FINALIZE(RS_RET_FILE_NOT_FOUND); - } - - /* skip comments at start of file */ - - getline(&lnptr, &lenLn, fp); - while(!feof(fp)) { - if(*lnptr == '#') - getline(&lnptr, &lenLn, fp); - else - break; /* first non-comment */ - } - CHKEOF; - - /* once we had a comment, the next line MUST be "result: ". Anything - * after nbr is simply ignored. - */ - if(sscanf(lnptr, "result: %d", &iParse) != 1) { - printf("error in result line, scanf failed, line: '%s'\n", lnptr); - ABORT_FINALIZE(RS_RET_ERR); - } - iRetExpected = iParse; - getline(&lnptr, &lenLn, fp); CHKEOF; - - /* and now we look for "in:" (and again ignore the rest...) */ - if(strncmp(lnptr, "in:", 3)) { - printf("error: expected 'in:'-line, but got: '%s'\n", lnptr); - ABORT_FINALIZE(RS_RET_ERR); - } - /* if we reach this point, we need to read in the input script. It is - * terminated by a line with three sole $ ($$$\n) - */ - CHKiRet(rsCStrConstruct(&pstrIn)); - getline(&lnptr, &lenLn, fp); CHKEOF; - while(strncmp(lnptr, "$$$\n", 4)) { - CHKiRet(rsCStrAppendStr(pstrIn, (uchar*)lnptr)); - getline(&lnptr, &lenLn, fp); CHKEOF; - } - getline(&lnptr, &lenLn, fp); CHKEOF; /* skip $$$-line */ - - /* and now we look for "out:" (and again ignore the rest...) */ - if(strncmp(lnptr, "out:", 4)) { - printf("error: expected 'out:'-line, but got: '%s'\n", lnptr); - ABORT_FINALIZE(RS_RET_ERR); - } - /* if we reach this point, we need to read in the expected program code. It is - * terminated by a line with three sole $ ($$$\n) - */ - CHKiRet(rsCStrConstruct(&pstrOut)); - getline(&lnptr, &lenLn, fp); CHKEOF; - while(strncmp(lnptr, "$$$\n", 4)) { - CHKiRet(rsCStrAppendStr(pstrOut, (uchar*)lnptr)); - getline(&lnptr, &lenLn, fp); CHKEOF; - } - - /* un-comment for testing: - * printf("iRet: %d, script: %s\n, out: %s\n", iRetExpected, rsCStrGetSzStr(pstrIn),rsCStrGetSzStr(pstrOut)); - */ - if(rsCStrGetSzStr(pstrIn) == NULL) { - printf("error: input script is empty!\n"); - ABORT_FINALIZE(RS_RET_ERR); - } - if(rsCStrGetSzStr(pstrOut) == NULL && iRetExpected == RS_RET_OK) { - printf("error: output script is empty!\n"); - ABORT_FINALIZE(RS_RET_ERR); - } - - CHKiRet(PerformTest(pstrIn, iRetExpected, pstrOut)); - -finalize_it: - if(pstrIn != NULL) - rsCStrDestruct(&pstrIn); - if(pstrOut != NULL) - rsCStrDestruct(&pstrOut); - RETiRet; -} - - -/* This test is parameterized. It search for test control files and - * loads all that it finds. To add tests, simply create new .rstest - * files. - * rgerhards, 2008-07-07 - */ -BEGINTest - uchar *testFile; - glob_t testFiles; - size_t i = 0; - struct stat fileInfo; -CODESTARTTest - glob("*.rstest", GLOB_MARK, NULL, &testFiles); - - for(i = 0; i < testFiles.gl_pathc; i++) { - testFile = (uchar*) testFiles.gl_pathv[i]; - - if(stat((char*) testFile, &fileInfo) != 0) - continue; /* continue with the next file if we can't stat() the file */ - - /* all regular files are run through the test logic. Symlinks don't work. */ - if(S_ISREG(fileInfo.st_mode)) { /* config file */ - printf("processing RainerScript test file '%s'...\n", testFile); - iRet = ProcessTestFile((uchar*) testFile); - if(iRet != RS_RET_OK) { - /* in this case, re-run with debugging on */ - printf("processing test case failed with %d, re-running with debug messages:\n", - iRet); - Debug = 1; /* these two are dirty, but we need them today... */ - debugging_on = 1; - CHKiRet(ProcessTestFile((uchar*) testFile)); - } - } - } - globfree(&testFiles); - -finalize_it: -ENDTest diff --git a/tests/rscript_contains.sh b/tests/rscript_contains.sh new file mode 100755 index 0000000..fd5c335 --- /dev/null +++ b/tests/rscript_contains.sh @@ -0,0 +1,13 @@ +# added 2012-09-14 by rgerhards +# This file is part of the rsyslog project, released under ASL 2.0 +echo =============================================================================== +echo \[rscript_contains.sh\]: test for contains script-filter +source $srcdir/diag.sh init +source $srcdir/diag.sh startup rscript_contains.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/rscript_field.sh b/tests/rscript_field.sh new file mode 100755 index 0000000..e989e66 --- /dev/null +++ b/tests/rscript_field.sh @@ -0,0 +1,13 @@ +# added 2012-09-20 by rgerhards +# This file is part of the rsyslog project, released under ASL 2.0 +echo =============================================================================== +echo \[rscript_field.sh\]: testing rainerscript field\(\) function +source $srcdir/diag.sh init +source $srcdir/diag.sh startup rscript_field.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/rscript_optimizer1.sh b/tests/rscript_optimizer1.sh new file mode 100755 index 0000000..1d2dcf8 --- /dev/null +++ b/tests/rscript_optimizer1.sh @@ -0,0 +1,13 @@ +# added 2012-09-20 by rgerhards +# This file is part of the rsyslog project, released under ASL 2.0 +echo =============================================================================== +echo \[rscript_optimizer1.sh\]: testing rainerscript optimizer +source $srcdir/diag.sh init +source $srcdir/diag.sh startup rscript_optimizer1.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/rscript_prifilt.sh b/tests/rscript_prifilt.sh new file mode 100755 index 0000000..815492a --- /dev/null +++ b/tests/rscript_prifilt.sh @@ -0,0 +1,13 @@ +# added 2012-09-20 by rgerhards +# This file is part of the rsyslog project, released under ASL 2.0 +echo =============================================================================== +echo \[rscript_prifilt.sh\]: testing rainerscript prifield\(\) function +source $srcdir/diag.sh init +source $srcdir/diag.sh startup rscript_prifilt.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/rscript_stop.sh b/tests/rscript_stop.sh new file mode 100755 index 0000000..e532a52 --- /dev/null +++ b/tests/rscript_stop.sh @@ -0,0 +1,13 @@ +# added 2012-09-20 by rgerhards +# This file is part of the rsyslog project, released under ASL 2.0 +echo =============================================================================== +echo \[rscript_stop.sh\]: testing rainerscript STOP statement +source $srcdir/diag.sh init +source $srcdir/diag.sh startup rscript_stop.conf +source $srcdir/diag.sh injectmsg 0 8000 +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/rscript_stop2.sh b/tests/rscript_stop2.sh new file mode 100755 index 0000000..eae36cc --- /dev/null +++ b/tests/rscript_stop2.sh @@ -0,0 +1,13 @@ +# added 2012-09-20 by rgerhards +# This file is part of the rsyslog project, released under ASL 2.0 +echo =============================================================================== +echo \[rscript_stop2.sh\]: testing rainerscript STOP statement, alternate method +source $srcdir/diag.sh init +source $srcdir/diag.sh startup rscript_stop2.conf +source $srcdir/diag.sh injectmsg 0 8000 +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/rt-init.c b/tests/rt-init.c deleted file mode 100644 index 2d43943..0000000 --- a/tests/rt-init.c +++ /dev/null @@ -1,43 +0,0 @@ -/* This test checks runtime initialization and exit. Other than that, it - * also serves as the most simplistic sample of how a test can be coded. - * - * Part of the testbench for rsyslog. - * Copyright 2008 Rainer Gerhards and Adiscon GmbH. - * - * This file is part of rsyslog. - * - * Rsyslog is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Rsyslog is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Rsyslog. If not, see . - * - * A copy of the GPL can be found in the file "COPYING" in this distribution. - */ -#include "config.h" -#include "rsyslog.h" -#include "testbench.h" -#include /* must be last, else we get a zlib compile error on some platforms */ - -MODULE_TYPE_TESTBENCH - -BEGINInit -CODESTARTInit -ENDInit - -BEGINExit -CODESTARTExit -ENDExit - -BEGINTest -CODESTARTTest -/*finalize_it:*/ - /* room for custom error reporter, leave blank if not needed */ -ENDTest diff --git a/tests/runtime-dummy.c b/tests/runtime-dummy.c deleted file mode 100644 index 5a9039b..0000000 --- a/tests/runtime-dummy.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Testbench for rsyslog - * - * This are dummy calls for "runtime" routines which are not yet properly - * abstracted and part of the actual runtime libraries. This module tries - * to make the linker happy. Please note that it does NOT provide anything - * more but the symbols. If a test requires these functions (or functions - * that depend on them), this dummy can not be used. - * - * Copyright 2008 Rainer Gerhards and Adiscon GmbH. - * - * This file is part of rsyslog. - * - * Rsyslog is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Rsyslog is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Rsyslog. If not, see . - * - * A copy of the GPL can be found in the file "COPYING" in this distribution. - */ -#include "config.h" -#include -#include "rsyslog.h" - -int bReduceRepeatMsgs = 0; -int repeatinterval = 30; -int bActExecWhenPrevSusp = 0; -int iActExecOnceInterval = 1; -int MarkInterval = 30; -void *pMsgQueue = NULL; - -void cflineClassic(void) {}; -void selectorAddList(void) {}; -void selectorConstruct(void) {}; -void selectorDestruct(void) {}; -rsRetVal createMainQueue(void) { return RS_RET_ERR; } - -ruleset_t *pCurrRuleset; -/* these are required by some dynamically loaded modules */ diff --git a/tests/sndrcv_drvr.sh b/tests/sndrcv_drvr.sh index f909264..1f3b911 100755 --- a/tests/sndrcv_drvr.sh +++ b/tests/sndrcv_drvr.sh @@ -1,2 +1 @@ source $srcdir/sndrcv_drvr_noexit.sh $1 $2 -source $srcdir/diag.sh exit diff --git a/tests/sndrcv_omudpspoof.sh b/tests/sndrcv_omudpspoof.sh index bb804d9..cb1c249 100755 --- a/tests/sndrcv_omudpspoof.sh +++ b/tests/sndrcv_omudpspoof.sh @@ -7,4 +7,8 @@ # This file is part of the rsyslog project, released under GPLv3 echo =============================================================================== echo \[sndrcv_omudpspoof.sh\]: testing sending and receiving via omudp +echo This test must be run as root [raw socket access required] +if [ "$EUID" -ne 0 ]; then + exit 77 # Not root, skip this test +fi source $srcdir/sndrcv_drvr.sh sndrcv_omudpspoof 50 diff --git a/tests/sndrcv_omudpspoof_nonstdpt.sh b/tests/sndrcv_omudpspoof_nonstdpt.sh index 6aeb1a5..ddd3eb7 100755 --- a/tests/sndrcv_omudpspoof_nonstdpt.sh +++ b/tests/sndrcv_omudpspoof_nonstdpt.sh @@ -7,4 +7,8 @@ # This file is part of the rsyslog project, released under GPLv3 echo =============================================================================== echo \[sndrcv_omudpspoof_nonstdpt.sh\]: testing sending and receiving via omudp +echo This test must be run as root [raw socket access required] +if [ "$EUID" -ne 0 ]; then + exit 77 # Not root, skip this test +fi source $srcdir/sndrcv_drvr.sh sndrcv_omudpspoof_nonstdpt 50 diff --git a/tests/sndrcv_udp.sh b/tests/sndrcv_udp.sh index 274a414..df37782 100755 --- a/tests/sndrcv_udp.sh +++ b/tests/sndrcv_udp.sh @@ -7,4 +7,7 @@ # This file is part of the rsyslog project, released under GPLv3 echo =============================================================================== echo \[sndrcv_udp.sh\]: testing sending and receiving via udp +if [ "$EUID" -ne 0 ]; then + exit 77 # Not root, skip this test +fi source $srcdir/sndrcv_drvr.sh sndrcv_udp 50 diff --git a/tests/tcpflood.c b/tests/tcpflood.c index 8485acb..8fd347f 100644 --- a/tests/tcpflood.c +++ b/tests/tcpflood.c @@ -91,8 +91,10 @@ #include #ifdef ENABLE_GNUTLS # include -# include +# if GNUTLS_VERSION_NUMBER <= 0x020b00 +# include GCRY_THREAD_OPTION_PTHREAD_IMPL; +# endif #endif #define EXIT_FAILURE 1 @@ -346,7 +348,7 @@ genMsg(char *buf, size_t maxBuf, int *pLenBuf, struct instdata *inst) do { done = 1; *pLenBuf = fread(buf, 1, 1024, dataFP); - if(feof(dataFP)) { + if(*pLenBuf == 0) { if(--numFileIterations > 0) { rewind(dataFP); done = 0; /* need new iteration */ @@ -358,7 +360,7 @@ genMsg(char *buf, size_t maxBuf, int *pLenBuf, struct instdata *inst) } while(!done); /* Attention: do..while()! */ } else if(MsgToSend == NULL) { if(dynFileIDs > 0) { - snprintf(dynFileIDBuf, maxBuf, "%d:", rand() % dynFileIDs); + snprintf(dynFileIDBuf, sizeof(dynFileIDBuf), "%d:", rand() % dynFileIDs); } if(extraDataLen == 0) { *pLenBuf = snprintf(buf, maxBuf, "<%s>Mar 1 01:00:00 172.20.245.8 tag msgnum:%s%8.8d:%c", @@ -660,7 +662,7 @@ runTests(void) int run; stats.totalRuntime = 0; - stats.minRuntime = (unsigned long long) 0xffffffffffffffffll; + stats.minRuntime = 0xffffffffllu; stats.maxRuntime = 0; stats.numRuns = numRuns; run = 1; @@ -707,7 +709,9 @@ initTLS(void) int r; /* order of gcry_control and gnutls_global_init matters! */ + #if GNUTLS_VERSION_NUMBER <= 0x020b00 gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); + #endif gnutls_global_init(); /* set debug mode, if so required by the options */ if(tlsLogLevel > 0) { diff --git a/tests/testbench.h b/tests/testbench.h deleted file mode 100644 index 1268774..0000000 --- a/tests/testbench.h +++ /dev/null @@ -1,103 +0,0 @@ -/* Defines for a rsyslog standard testbench application. - * - * Work begun 2008-06-13 by Rainer Gerhards (written from scratch) - * - * Copyright 2008 Rainer Gerhards and Adiscon GmbH. - * - * This file is part of rsyslog. - * - * Rsyslog is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Rsyslog is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Rsyslog. If not, see . - * - * A copy of the GPL can be found in the file "COPYING" in this distribution. - */ -#include - -/* everything we need to begin a testbench */ -#define MODULE_TYPE_TESTBENCH \ -/* definitions for objects we access */ \ -DEFobjCurrIf(obj) \ -\ -static rsRetVal doInit(void); \ -static rsRetVal doTest(void); \ -static rsRetVal doExit(void); \ -\ -/* Below is the driver, which is always the same */ \ -int main(int __attribute__((unused)) argc, char __attribute__((unused)) *argv[]) \ -{ \ - DEFiRet; \ - CHKiRet(doInit()); \ - CHKiRet(doTest()); \ - CHKiRet(doExit()); \ -finalize_it: \ - if(iRet != RS_RET_OK) \ - printf("test returns iRet %d\n", iRet); \ - RETiRet; \ -} - - -/* Initialize everything (most importantly the runtime objects) for the test. The framework - * initializes the global runtime, user must add those objects that it needs additionally. - */ -#define BEGINInit \ -static rsRetVal doInit(void) \ -{ \ - DEFiRet; \ - char *pErrObj; /* tells us which object failed if that happens */ \ - putenv("RSYSLOG_MODDIR=../runtime/.libs/"); /* this is a bit hackish... */ \ - \ - dbgClassInit(); \ - /* Intialize the runtime system */ \ - pErrObj = "rsyslog runtime"; /* set in case the runtime errors before setting an object */ \ - CHKiRet(rsrtInit(&pErrObj, &obj)); \ - -#define CODESTARTInit - -#define ENDInit \ -finalize_it: \ - if(iRet != RS_RET_OK) { \ - printf("failure occured during init of object '%s'\n", pErrObj); \ - } \ - \ - RETiRet; \ -} - - - -/* Carry out the actual test... - */ -#define BEGINTest \ -rsRetVal doTest(void) \ -{ \ - DEFiRet; - -#define CODESTARTTest - -#define ENDTest \ - RETiRet; \ -} - - -/* De-init everything (most importantly the runtime objects) for the test. */ -#define BEGINExit \ -rsRetVal doExit(void) \ -{ \ - DEFiRet; \ - CHKiRet(rsrtExit()); - -#define CODESTARTExit - -#define ENDExit \ -finalize_it: \ - RETiRet; \ -} diff --git a/tests/testsuites/cee_diskqueue.conf b/tests/testsuites/cee_diskqueue.conf new file mode 100644 index 0000000..a9b98e8 --- /dev/null +++ b/tests/testsuites/cee_diskqueue.conf @@ -0,0 +1,9 @@ +$IncludeConfig diag-common.conf + +global(workDirectory="/tmp") +template(name="outfmt" type="string" string="%$!usr!msg:F,58:2%\n") + +set $!usr!msg = $msg; +if $msg contains 'msgnum' then + action(type="omfile" file="./rsyslog.out.log" template="outfmt" + queue.type="disk" queue.filename="rsyslog-act1") diff --git a/tests/testsuites/cee_simple.conf b/tests/testsuites/cee_simple.conf new file mode 100644 index 0000000..1bcf83c --- /dev/null +++ b/tests/testsuites/cee_simple.conf @@ -0,0 +1,6 @@ +$IncludeConfig diag-common.conf + +template(name="outfmt" type="string" string="%$!usr!msg:F,58:2%\n") +set $!usr!msg = $msg; +if $msg contains 'msgnum' then + action(type="omfile" file="./rsyslog.out.log" template="outfmt") diff --git a/tests/testsuites/imfile-basic.conf b/tests/testsuites/imfile-basic.conf index 9fb9b5c..59b109a 100644 --- a/tests/testsuites/imfile-basic.conf +++ b/tests/testsuites/imfile-basic.conf @@ -6,6 +6,7 @@ $InputFileTag file: $InputFileStateFile stat-file1 $InputFileSeverity error $InputFileFacility local7 +$InputFileMaxLinesAtOnce 100000 $InputRunFileMonitor $template outfmt,"%msg:F,58:2%\n" diff --git a/tests/testsuites/imtcp-tls-basic.conf b/tests/testsuites/imtcp-tls-basic.conf new file mode 100644 index 0000000..a94a00e --- /dev/null +++ b/tests/testsuites/imtcp-tls-basic.conf @@ -0,0 +1,21 @@ +# Test for queue disk mode (see .sh file for details) +# rgerhards, 2009-05-22 +$IncludeConfig diag-common.conf + +$ModLoad ../plugins/imtcp/.libs/imtcp +$MainMsgQueueTimeoutShutdown 10000 + +$DefaultNetstreamDriver gtls + +# certificate files - just CA for a client +$IncludeConfig rsyslog.conf.tlscert +$InputTCPServerStreamDriverMode 1 +$InputTCPServerStreamDriverAuthMode anon +$InputTCPServerRun 13514 + +$template outfmt,"%msg:F,58:2%\n" +$OMFileFlushOnTXEnd off +$OMFileFlushInterval 2 +$OMFileAsyncWriting on +$OMFileIOBufferSize 16k +:msg, contains, "msgnum:" ./rsyslog.out.log;outfmt diff --git a/tests/testsuites/imtcp_conndrop.conf b/tests/testsuites/imtcp_conndrop.conf index b64f132..de41bc4 100644 --- a/tests/testsuites/imtcp_conndrop.conf +++ b/tests/testsuites/imtcp_conndrop.conf @@ -12,5 +12,4 @@ $template dynfile,"rsyslog.out.log" # trick to use relative path names! $OMFileFlushOnTXEnd off $OMFileFlushInterval 2 $OMFileIOBufferSize 256k -$IncludeConfig rsyslog.action.1.include local0.* ?dynfile;outfmt diff --git a/tests/testsuites/manytcp-too-few-tls.conf b/tests/testsuites/manytcp-too-few-tls.conf new file mode 100644 index 0000000..5269e73 --- /dev/null +++ b/tests/testsuites/manytcp-too-few-tls.conf @@ -0,0 +1,22 @@ +# Test for tcp "flood" testing +# rgerhards, 2009-04-08 +$IncludeConfig diag-common.conf + +$ModLoad ../plugins/imtcp/.libs/imtcp +$MainMsgQueueTimeoutShutdown 10000 +$MaxOpenFiles 200 +$InputTCPMaxSessions 1100 +# certificates +$DefaultNetstreamDriverCAFile testsuites/x.509/ca.pem +$DefaultNetstreamDriverCertFile testsuites/x.509/client-cert.pem +$DefaultNetstreamDriverKeyFile testsuites/x.509/client-key.pem + +$DefaultNetstreamDriver gtls # use gtls netstream driver + +$InputTCPServerStreamDriverMode 1 +$InputTCPServerStreamDriverAuthMode anon +$InputTCPServerRun 13514 + +$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/mysql-basic-cnf6.conf b/tests/testsuites/mysql-basic-cnf6.conf new file mode 100644 index 0000000..12bd0b2 --- /dev/null +++ b/tests/testsuites/mysql-basic-cnf6.conf @@ -0,0 +1,7 @@ +$IncludeConfig diag-common.conf + +$ModLoad ../plugins/ommysql/.libs/ommysql +if $msg contains 'msgnum' then { + action(type="ommysql" server="127.0.0.1" + db="Syslog" uid="rsyslog" pwd="testbench") +} diff --git a/tests/testsuites/rscript_contains.conf b/tests/testsuites/rscript_contains.conf new file mode 100644 index 0000000..8bead68 --- /dev/null +++ b/tests/testsuites/rscript_contains.conf @@ -0,0 +1,4 @@ +$IncludeConfig diag-common.conf + +$template outfmt,"%msg:F,58:2%\n" +if $msg contains 'msgnum' then ./rsyslog.out.log;outfmt diff --git a/tests/testsuites/rscript_field.conf b/tests/testsuites/rscript_field.conf new file mode 100644 index 0000000..d7eb906 --- /dev/null +++ b/tests/testsuites/rscript_field.conf @@ -0,0 +1,11 @@ +$IncludeConfig diag-common.conf + +template(name="outfmt" type="list") { + property(name="$!usr!msgnum") + constant(value="\n") +} + +if $msg contains 'msgnum' then { + set $!usr!msgnum = field($msg, 58, 2); + action(type="omfile" file="./rsyslog.out.log" template="outfmt") +} diff --git a/tests/testsuites/rscript_optimizer1.conf b/tests/testsuites/rscript_optimizer1.conf new file mode 100644 index 0000000..7720af7 --- /dev/null +++ b/tests/testsuites/rscript_optimizer1.conf @@ -0,0 +1,12 @@ +$IncludeConfig diag-common.conf + +template(name="outfmt" type="list") { + property(name="msg" field.delimiter="58" field.number="2") + constant(value="\n") +} + +/* tcpflood uses local4.=debug */ +if prifilt("syslog.*") then + stop # it actually doesn't matter what we do here +else + action(type="omfile" file="./rsyslog.out.log" template="outfmt") diff --git a/tests/testsuites/rscript_prifilt.conf b/tests/testsuites/rscript_prifilt.conf new file mode 100644 index 0000000..8cb13a0 --- /dev/null +++ b/tests/testsuites/rscript_prifilt.conf @@ -0,0 +1,10 @@ +$IncludeConfig diag-common.conf + +template(name="outfmt" type="list") { + property(name="msg" field.delimiter="58" field.number="2") + constant(value="\n") +} + +/* tcpflood uses local4.=debug, we use a bit more generic filter */ +if prifilt("local4.*") then + action(type="omfile" file="./rsyslog.out.log" template="outfmt") diff --git a/tests/testsuites/rscript_stop.conf b/tests/testsuites/rscript_stop.conf new file mode 100644 index 0000000..ab9569e --- /dev/null +++ b/tests/testsuites/rscript_stop.conf @@ -0,0 +1,13 @@ +$IncludeConfig diag-common.conf + +template(name="outfmt" type="list") { + property(name="$!usr!msgnum") + constant(value="\n") +} + +if $msg contains 'msgnum' then { + set $!usr!msgnum = field($msg, 58, 2); + if cnum($!usr!msgnum) >= 5000 then + stop + action(type="omfile" file="./rsyslog.out.log" template="outfmt") +} diff --git a/tests/testsuites/rscript_stop2.conf b/tests/testsuites/rscript_stop2.conf new file mode 100644 index 0000000..9ac9143 --- /dev/null +++ b/tests/testsuites/rscript_stop2.conf @@ -0,0 +1,18 @@ +$IncludeConfig diag-common.conf + +template(name="outfmt" type="list") { + property(name="$!usr!msgnum") + constant(value="\n") +} + +if not ($msg contains 'msgnum') then + stop + +set $!usr!msgnum = field($msg, 58, 2); +if cnum($!usr!msgnum) >= 5000 then + stop +/* We could use yet another method, but we like to have the action statement + * without a filter in rsyslog.conf top level hierarchy - so this test, as + * a side-effect, also tests this ability. + */ +action(type="omfile" file="./rsyslog.out.log" template="outfmt") diff --git a/tests/testsuites/udp-msgreduc-orgmsg-vg.conf b/tests/testsuites/udp-msgreduc-orgmsg-vg.conf new file mode 100644 index 0000000..5e80e49 --- /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/testsuites/udp-msgreduc-vg.conf b/tests/testsuites/udp-msgreduc-vg.conf new file mode 100644 index 0000000..150bef2 --- /dev/null +++ b/tests/testsuites/udp-msgreduc-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 + +$template outfmt,"%msg:F,58:2%\n" +*.* ./rsyslog.out.log;outfmt +#:msg, contains, "msgnum:" ./rsyslog.out.log;outfmt diff --git a/tests/testsuites/x.509/ca-key.pem b/tests/testsuites/x.509/ca-key.pem new file mode 100644 index 0000000..1e1a0b2 --- /dev/null +++ b/tests/testsuites/x.509/ca-key.pem @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXQIBAAKBgQDZnIJGJH80j2DPBXdxgmFmBRMoBnpwQb8yhRJcJacaWigRAhp4 +wdo07rR+EpuBJHD/5ImIygUwCj/XWAs4JKm3LqK2ih1gUy/s6Tg2O5t3k11kdjEH +MKUxDOLs441dEwERPQtePEoy2POzViIyy959ZJorkdnwC4LBKdQVLEELlwIDAQAB +AoGAEQWvoRoAw1VF3tvQHJZ01Pyno3ViRX63HJYROhkN6b9MrAvsky6iyYo0nzoI +ZQE7P6EaaxNWdYwPs2IlOoaPqeos1sGVDaK/JFuja/DduoXBdCy9RFWRaugDX/1U +iMtjtu29euvegP0r2RIxaIl9dapF5alNH5MLMyBl7XTB+/kCQQDiwHnW8jS1paSc +/risF6Ie5rKuUfVDG8hqMEiKyczSHwUVYushwCclshjM6E1TBFZqMz/8PbFW51pK +OzFS2s6/AkEA9a4044RL3AWe37LIU4hbz2Y+auRvPh8x4i2cWLzdok8Rc1EHDGLN +eHBoOQ3Q2nQS94cOx6HxpRztzBgiwpTRKQJADX9BgV7nbkyO0N2EppG9j7NRvXiZ +bcYwlsmK99/tNjCsf8pkjpy+d8rzGPdW6vMeJbIpQ910OeUJhdOiKvllRwJBAIw3 +rP/dVd5xZseNpj/mp1+rnxwq3EK8UyAfoAgVYvlr3y3NpRQwn8yJezJ07CqB7QFR +F+JgTyZJaH7/l3cusGECQQCM3HmkADAKxX6RwKe8X0Kj/36rjXEMNoq0ZdXOB7Qz +f5N6og4Da9y/ZO+XMo6P3XR/TYIYrMD8nuoR33X69kb1 +-----END RSA PRIVATE KEY----- diff --git a/tests/testsuites/x.509/ca.pem b/tests/testsuites/x.509/ca.pem new file mode 100644 index 0000000..a733eb8 --- /dev/null +++ b/tests/testsuites/x.509/ca.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIICyzCCAjagAwIBAgIESFo2XjALBgkqhkiG9w0BAQUwezELMAkGA1UEBhMCVVMx +EDAOBgNVBAoTB1NvbWVPcmcxDzANBgNVBAsTBlNvbWVPVTESMBAGA1UEBxMJU29t +ZXdoZXJlMQswCQYDVQQIEwJDQTEoMCYGA1UEAxMfc29tZU5hbWUgKG5vdCBuZWNl +c3NhcmlseSBETlMhKTAeFw0wODA2MTkxMDM1MTJaFw0xODA2MTcxMDM1MjVaMHsx +CzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdTb21lT3JnMQ8wDQYDVQQLEwZTb21lT1Ux +EjAQBgNVBAcTCVNvbWV3aGVyZTELMAkGA1UECBMCQ0ExKDAmBgNVBAMTH3NvbWVO +YW1lIChub3QgbmVjZXNzYXJpbHkgRE5TISkwgZwwCwYJKoZIhvcNAQEBA4GMADCB +iAKBgNmcgkYkfzSPYM8Fd3GCYWYFEygGenBBvzKFElwlpxpaKBECGnjB2jTutH4S +m4EkcP/kiYjKBTAKP9dYCzgkqbcuoraKHWBTL+zpODY7m3eTXWR2MQcwpTEM4uzj +jV0TARE9C148SjLY87NWIjLL3n1kmiuR2fALgsEp1BUsQQuXAgMBAAGjYzBhMA8G +A1UdEwEB/wQFMAMBAf8wHgYDVR0RBBcwFYETc29tZW9uZUBleGFtcGxlLm5ldDAP +BgNVHQ8BAf8EBQMDBwQAMB0GA1UdDgQWBBT7/paNEKc65bcNe0NIhsj4cpl7iTAL +BgkqhkiG9w0BAQUDgYEAlv9ge8Koways837OLoZIam0s7wQCcwd9rWE05caps7BU +T4bfgab9U/e9mmrf3V/zXmtU6y8hhTXF5AcZv3/EmCVwsPRotgrJ+rHXTv5e2PO7 +/8C3K2Lhc89gF4qf4xZwlZU70RasKgCzZa5ivS2Y8pW6LUu6eqqgVw3pPJbW3TE= +-----END CERTIFICATE----- diff --git a/tests/testsuites/x.509/client-cert.pem b/tests/testsuites/x.509/client-cert.pem new file mode 100644 index 0000000..5bf39f8 --- /dev/null +++ b/tests/testsuites/x.509/client-cert.pem @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIICijCCAfWgAwIBAgIESFo7ITALBgkqhkiG9w0BAQUwezELMAkGA1UEBhMCVVMx +EDAOBgNVBAoTB1NvbWVPcmcxDzANBgNVBAsTBlNvbWVPVTESMBAGA1UEBxMJU29t +ZXdoZXJlMQswCQYDVQQIEwJDQTEoMCYGA1UEAxMfc29tZU5hbWUgKG5vdCBuZWNl +c3NhcmlseSBETlMhKTAeFw0wODA2MTkxMDU1MzJaFw0xMTAzMTYxMDU1MzlaMA0x +CzAJBgNVBAYTAlVTMIGcMAsGCSqGSIb3DQEBAQOBjAAwgYgCgYC+f6yCet2WJgmw +tgukOReI+avRHOfr2hLhIQkSzCOiNi0tNWMKmaQWw/D+y1FvLRq0wLDUyJK/36rB +67HKfscoNeClKTS8jhAs1mPjT57iyuoqK6VW/d2JoofklRCgDIZQrNfxHiOO+kN3 +ShLmkGqxkA3YyUty/JmF6PKWYIhQWQIDAQABo4GPMIGMMAwGA1UdEwEB/wQCMAAw +HQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMBMB0GA1UdEQQWMBSCEmNsaWVu +dC5leGFtcGxlLm5ldDAdBgNVHQ4EFgQUrDcwsuOF4RiHn0eboCplJSiUhfcwHwYD +VR0jBBgwFoAU+/6WjRCnOuW3DXtDSIbI+HKZe4kwCwYJKoZIhvcNAQEFA4GBAAAh +niy9ORW2AIb6lk/sa3iYczeYpGzxDM9bLZ1xSoIdoHM/v9gPG/WpAZ4ECHjx+Yk8 +4B/9gvaAmMi0FmcoIBQaEOe2P8tcIuzmum3N2F27F2+J4httiNDLJoseWVnXJUvS +dPyVOrKXdl5vVFpmViI5P+VzzMqbAQ6oNlMXIh6e +-----END CERTIFICATE----- diff --git a/tests/testsuites/x.509/client-key.pem b/tests/testsuites/x.509/client-key.pem new file mode 100644 index 0000000..0564121 --- /dev/null +++ b/tests/testsuites/x.509/client-key.pem @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICWwIBAAKBgQC+f6yCet2WJgmwtgukOReI+avRHOfr2hLhIQkSzCOiNi0tNWMK +maQWw/D+y1FvLRq0wLDUyJK/36rB67HKfscoNeClKTS8jhAs1mPjT57iyuoqK6VW +/d2JoofklRCgDIZQrNfxHiOO+kN3ShLmkGqxkA3YyUty/JmF6PKWYIhQWQIDAQAB +AoGAVxrM+BqTIJlC/Ay5lP1QAB9di3ACserUkCFJY1F5h63rCU1sfIfVKl2s3+x6 +z3GZ0QV8tccCpv5wN1x8vqEqkbOvddM3rzpGkEC5PoyfCzuQBun1wnHK/JKjrfk5 +PvcaP60eTNjHZC7w78gOJJCzgzsEMrndtE+55diPmqGVtXMCQQDTZBy5WK8gZwMO +rRz1BKKyBeMYMfTJoJafGfxp0H8AUbTa0V2eb+el3kuzPCm3FQ6IgaHyGj2WqkAw +M0bfAfdXAkEA5rLna1t+2SCtgSd1DotndA4EsH4skBq9kFeD2/8T6Pf13zmBOq6O +4aNEOhgBE/R9/MI4XoU9MbOlkZvKvDuXzwJADdWSb6rXIza6o34+0+Yuw5nRB+dV +DtD8qoLn2wDzHtE6Fcv35YOLVHac26kHTd0J63MYZyDCgRa5Rq5EaBnX1wJAQYRF +XKPbXmZ9X9SI1dyZQMhKZKUwmqw9caSo+e1zBhKFbSOzo6q3QTVQxv7SL4ybyxCN +WaqVOmw+dR+9b7+s2QJAdNAw3r418rWKFKJJNTSqSqr1sYqiKvrQL6w2dpdpAeY4 +3VDCz/7/F9AEn3R7K3fZLQ7W6M62LSEjxxc1Y3LIpQ== +-----END RSA PRIVATE KEY----- diff --git a/tests/testsuites/x.509/machine-cert.pem b/tests/testsuites/x.509/machine-cert.pem new file mode 100644 index 0000000..fa2fd36 --- /dev/null +++ b/tests/testsuites/x.509/machine-cert.pem @@ -0,0 +1,18 @@ +-----BEGIN CERTIFICATE----- +MIIC7TCCAligAwIBAgIESFo4GTALBgkqhkiG9w0BAQUwezELMAkGA1UEBhMCVVMx +EDAOBgNVBAoTB1NvbWVPcmcxDzANBgNVBAsTBlNvbWVPVTESMBAGA1UEBxMJU29t +ZXdoZXJlMQswCQYDVQQIEwJDQTEoMCYGA1UEAxMfc29tZU5hbWUgKG5vdCBuZWNl +c3NhcmlseSBETlMhKTAeFw0wODA2MTkxMDQyNTRaFw0xMTAzMTYxMDQyNTdaMG8x +CzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdTb21lT3JnMQ8wDQYDVQQLEwZTb21lT1Ux +EjAQBgNVBAcTCVNvbWV3aGVyZTELMAkGA1UECBMCQ0ExHDAaBgNVBAMTE21hY2hp +bmUuZXhhbXBsZS5uZXQwgZwwCwYJKoZIhvcNAQEBA4GMADCBiAKBgLJOW6lIHv8u +c6Ez7tiir64vI3aRuDmUACPybyWtyWqrLebzYtg+borWHj9y5di54NB5wpQhZQsQ +U2awNqanzUYeLGqbecbuxuLtsKlZ4knax+PwHOBTmIcN1SjbpII27Toe0VwHE5Vd +sygFFyorto6OeNLPrIcTFfwXQ2sVw325AgMBAAGjgZAwgY0wDAYDVR0TAQH/BAIw +ADAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwHgYDVR0RBBcwFYITbWFj +aGluZS5leGFtcGxlLm5ldDAdBgNVHQ4EFgQUDOHD29GdMfoDWwev4uDvItkLKKww +HwYDVR0jBBgwFoAU+/6WjRCnOuW3DXtDSIbI+HKZe4kwCwYJKoZIhvcNAQEFA4GB +AMt1iED7QzFL2Qk6VivoFY15S2XGF8rJTd3l00bwyLA5qLyLBGlB6z4qkYu7/7SW +5r7tet+1DezgHrj/1eU289m410wnQB8fGwcVLp6OX2PAlhNmVLcsipiN6rielAcP +aIg/VlBtoCFp/ymTLKgvh6DLKWhRUkFPqO2WtcQ3UUo+ +-----END CERTIFICATE----- diff --git a/tests/testsuites/x.509/machine-key.pem b/tests/testsuites/x.509/machine-key.pem new file mode 100644 index 0000000..808f00c --- /dev/null +++ b/tests/testsuites/x.509/machine-key.pem @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXAIBAAKBgQCyTlupSB7/LnOhM+7Yoq+uLyN2kbg5lAAj8m8lrclqqy3m82LY +Pm6K1h4/cuXYueDQecKUIWULEFNmsDamp81GHixqm3nG7sbi7bCpWeJJ2sfj8Bzg +U5iHDdUo26SCNu06HtFcBxOVXbMoBRcqK7aOjnjSz6yHExX8F0NrFcN9uQIDAQAB +AoGABHJs2c95Km8bpikX62I/VG5LiaD/wbvdtwfMWtm3PMhRKEHotLD169OERJvW +fK3CHCD1R+F/ViPNmLGLY2Oq/GqKjhKjg4sqAznw8TImBSgXCFho4sl38z+luP1o +TXFDgfV5HDDW1/F5kJlBIfXBLFdl4VO7E0ZnFt4FqSDRW2MCQQDRun/sBGM4i9hM +QdC+QwrdcgCScBpzbz4YXtI9TyGEqNahg8kXgIVUbzDdRmG68G2M98USzRs5DWB7 +YvYwmRoPAkEA2aUdUpFRb/n7XfsAiFLYOk96C82iCCQpJi0si34zlCAEbCRbQ6zw +gVDMCMSccnnWrVzqtxfN+rXycFTNyDFTtwJAPRwymfrNTnSxGcczo7y1NcE6GXFA +w9HuLfuzFtov0g/AOl/EAG0abHfZrSAM6gOUaDbp3YiWHhGfw1QamB6EUQJAClTb +MnsxeXZNZ2Wt3crI9uOk8IB/a5GD3osQbUK9Yg+vBg8nweuoswrJ1LS4lHqSJUKe +5bgckAUpEAoGhrVIuwJBAKIuqx/cSjF4Oa9xT6DzBRe7vAlKFq62lUV5SLfoSEgY +L5dvPBgAD0Styglny1s0Bu5FTlkxlFOMvUAD/O5hsQw= +-----END RSA PRIVATE KEY----- diff --git a/tests/udp-msgreduc-orgmsg-vg.sh b/tests/udp-msgreduc-orgmsg-vg.sh new file mode 100755 index 0000000..1594c89 --- /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 diff --git a/tests/udp-msgreduc-vg.sh b/tests/udp-msgreduc-vg.sh new file mode 100755 index 0000000..e19ffd8 --- /dev/null +++ b/tests/udp-msgreduc-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-vg.sh\]: testing imtcp multiple listeners +source $srcdir/diag.sh init +source $srcdir/diag.sh startup-vg udp-msgreduc-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-vg.sh FAILED" + exit 1 +fi +source $srcdir/diag.sh exit diff --git a/tests/validation-run.sh b/tests/validation-run.sh index cc29482..a68ee8a 100755 --- a/tests/validation-run.sh +++ b/tests/validation-run.sh @@ -25,16 +25,19 @@ echo \[validation-run.sh\]: testing configuraton validation echo "testing a failed configuration verification run" ../tools/rsyslogd -dn -u2 -c4 -N1 -f$srcdir/testsuites/invalid.conf -M../runtime/.libs:../.libs if [ $? -ne 1 ]; then + echo "after test 1: return code ne 1" exit 1 fi echo testing a valid config verification run ../tools/rsyslogd -u2 -c4 -N1 -f$srcdir/testsuites/valid.conf -M../runtime/.libs:../.libs if [ $? -ne 0 ]; then + echo "after test 2: return code ne 0" exit 1 fi echo testing empty config file ../tools/rsyslogd -u2 -c4 -N1 -f/dev/null -M../runtime/.libs:../.libs if [ $? -ne 1 ]; then + echo "after test 3: return code ne 1" exit 1 fi echo SUCCESS: validation run tests -- cgit v1.2.3