From 1e1cbdb971f4c60a13627e709bab754d5fecfc6c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 12 Apr 2010 14:31:03 +0200 Subject: added new configure option that permits to disable and enable an extended testbench --- ChangeLog | 4 ++++ Makefile.am | 2 +- configure.ac | 18 ++++++++++++++++++ tests/Makefile.am | 5 ++++- 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 83ca5033..3c77751a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ +--------------------------------------------------------------------------- +Version 4.6.3 [v4-stable] (rgerhards), 2010-04-?? - improvded testbench - added test with truly random data received via syslog to test robustness + - added new configure option that permits to disable and enable an + extended testbench - bugfix: default for $OMFileFlushOnTXEnd was wrong ("off"). This, in default mode, caused buffered writing to be used, what means that it looked like no output were written or partial diff --git a/Makefile.am b/Makefile.am index a050e95e..f5f9a6ed 100644 --- a/Makefile.am +++ b/Makefile.am @@ -134,5 +134,5 @@ SUBDIRS += tests # temporarily be removed below. The intent behind forcing everthing to compile # in a make distcheck is so that we detect code that accidently was not updated # when some global update happened. -DISTCHECK_CONFIGURE_FLAGS=--enable-gssapi_krb5 --enable-imfile --enable-snmp --enable-pgsql --enable-libdbi --enable-mysql --enable-omtemplate --enable-imtemplate --enable-relp --enable-rsyslogd --enable-mail --enable-klog --enable-diagtools --enable-gnutls --enable-omstdout --enable-omprog --enable-imdiag --enable-shave +DISTCHECK_CONFIGURE_FLAGS=--enable-gssapi_krb5 --enable-imfile --enable-snmp --enable-pgsql --enable-libdbi --enable-mysql --enable-omtemplate --enable-imtemplate --enable-relp --enable-rsyslogd --enable-mail --enable-klog --enable-diagtools --enable-gnutls --enable-omstdout --enable-omprog --enable-imdiag --enable-shave --enable-extended-tests ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index b01396d6..bfd78281 100644 --- a/configure.ac +++ b/configure.ac @@ -612,6 +612,23 @@ AC_ARG_ENABLE(rsyslogd, AM_CONDITIONAL(ENABLE_RSYSLOGD, test x$enable_rsyslogd = xyes) +# capability to enable an extended testbench. By default, this is off. The reason +# for this switch is that some test simply take too long to execute them on a regular +# basis. So we enable to skip them, while the majority of tests can still be used. The +# idea is that at least "make distcheck" executes the extended testbench, and also +# developers should explicitely enable it after important changes. -- rgerhards, 2010-04-12 +AC_ARG_ENABLE(extended_tests, + [AS_HELP_STRING([--enable-extended-tests],[extended testbench @<:@default=no@:>@])], + [case "${enableval}" in + yes) enable_rsyslogd="yes" ;; + no) enable_rsyslogd="no" ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-extended-tests) ;; + esac], + [enable_extended_tests=no] +) +AM_CONDITIONAL(ENABLE_EXTENDED_TESTS, test x$enable_extended_tests = xyes) + + # Mail support (so far we do not need a library, but we need to turn this on and off) AC_ARG_ENABLE(mail, [AS_HELP_STRING([--enable-mail],[Enable mail support @<:@default=no@:>@])], @@ -864,6 +881,7 @@ echo " SNMP support enabled: $enable_snmp" echo echo "---{ debugging support }---" echo " Testbench enabled: $enable_testbench" +echo " Extended Testbench enabled: $enable_extended_tests" echo " Debug mode enabled: $enable_debug" echo " Runtime Instrumentation enabled: $enable_rtinst" echo " Diagnostic tools enabled: $enable_diagtools" diff --git a/tests/Makefile.am b/tests/Makefile.am index 76ed694a..cdc0d647 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -24,7 +24,6 @@ TESTS = $(TESTRUNS) cfg.sh \ dynfile_invld_sync.sh \ dynfile_invalid2.sh \ complex1.sh \ - random.sh \ queue-persist.sh \ pipeaction.sh execonlyonce.sh \ @@ -41,6 +40,10 @@ TESTS += omod-if-array.sh \ fieldtest.sh endif +if ENABLE_EXTENDED_TESTS +TESTS += random.sh +endif + check_JAVA = DiagTalker.java endif # if ENABLE_TESTBENCH -- cgit v1.2.3 From 4ebd062564c068566d60b4f54c047e6c082edf8e Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 12 Apr 2010 14:59:52 +0200 Subject: solving a number of minor (but annoying) issues in the build system --- tests/Makefile.am | 1 + tests/complex1.sh | 4 ++-- tests/diag.sh | 4 ++-- tests/dynfile_invalid2.sh | 4 ++-- tests/gzipwr_large_dynfile.sh | 4 ++-- tests/random.sh | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index cdc0d647..0045f00a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -113,6 +113,7 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ testsuites/parse3.conf \ testsuites/reallife.parse3 \ testsuites/parse-nodate.conf \ + testsuites/samples.parse-nodate \ testsuites/parse_invld_regex.conf \ testsuites/samples.parse_invld_regex \ testsuites/parse-3164-buggyday.conf \ diff --git a/tests/complex1.sh b/tests/complex1.sh index b5dc2c9d..7f3cd994 100755 --- a/tests/complex1.sh +++ b/tests/complex1.sh @@ -7,8 +7,8 @@ echo =========================================================================== echo TEST: \[complex1.sh\]: complex test with gzip and multiple action queues source $srcdir/diag.sh init # uncomment for debugging support: -export RSYSLOG_DEBUG="debug nostdout" -export RSYSLOG_DEBUGLOG="log" +#export RSYSLOG_DEBUG="debug nostdout" +#export RSYSLOG_DEBUGLOG="log" source $srcdir/diag.sh startup complex1.conf # send 30,000 messages of 400 bytes plus header max, via three dest ports source $srcdir/diag.sh tcpflood -m40000 -rd400 -P129 -f5 -n3 -c15 -i1 diff --git a/tests/diag.sh b/tests/diag.sh index 2a0e2a44..51ad5f6a 100755 --- a/tests/diag.sh +++ b/tests/diag.sh @@ -20,7 +20,7 @@ case $1 in rm -f rsyslogd.started work-*.conf rsyslog.random.data rm -f rsyslogd2.started work-*.conf rm -f work rsyslog.out.log rsyslog.out.log.save # common work files - rm -f rsyslog.out.*.log + rm -f rsyslog.out.*.log work-presort rm -rf test-spool rm -f core.* vgcore.* mkdir test-spool @@ -28,7 +28,7 @@ case $1 in 'exit') rm -f rsyslogd.started work-*.conf diag-common.conf rm -f rsyslogd2.started diag-common2.conf rsyslog.action.*.include rm -f work rsyslog.out.log rsyslog.out.log.save # common work files - rm -f rsyslog.out.*.log rsyslog.random.data + rm -f rsyslog.out.*.log rsyslog.random.data work-presort rm -rf test-spool ;; 'startup') # start rsyslogd with default params. $2 is the config file name to use diff --git a/tests/dynfile_invalid2.sh b/tests/dynfile_invalid2.sh index b6fb3945..cb3ef51e 100755 --- a/tests/dynfile_invalid2.sh +++ b/tests/dynfile_invalid2.sh @@ -9,8 +9,8 @@ echo =========================================================================== echo TEST: \[dynfile_invalid2.sh\]: test open fail for dynafiles source $srcdir/diag.sh init # uncomment for debugging support: -export RSYSLOG_DEBUG="debug nostdout noprintmutexaction" -export RSYSLOG_DEBUGLOG="log" +#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction" +#export RSYSLOG_DEBUGLOG="log" source $srcdir/diag.sh startup dynfile_invalid2.conf # we send handcrafted message. We have a dynafile cache of 4, and now send one message # each to fill up the cache. diff --git a/tests/gzipwr_large_dynfile.sh b/tests/gzipwr_large_dynfile.sh index ebd4c558..73d44796 100755 --- a/tests/gzipwr_large_dynfile.sh +++ b/tests/gzipwr_large_dynfile.sh @@ -18,8 +18,8 @@ echo =========================================================================== echo TEST: \[gzipwr_large_dynfile.sh\]: test for gzip file writing for large message sets source $srcdir/diag.sh init # uncomment for debugging support: -export RSYSLOG_DEBUG="debug nostdout" -export RSYSLOG_DEBUGLOG="log" +#export RSYSLOG_DEBUG="debug nostdout" +#export RSYSLOG_DEBUGLOG="log" source $srcdir/diag.sh startup gzipwr_large_dynfile.conf # send 4000 messages of 10.000bytes plus header max, randomized source $srcdir/diag.sh tcpflood -m4000 -r -d10000 -P129 -f5 diff --git a/tests/random.sh b/tests/random.sh index 79f704c7..d1f392d3 100755 --- a/tests/random.sh +++ b/tests/random.sh @@ -17,4 +17,4 @@ source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done proces source $srcdir/diag.sh wait-shutdown # and wait for it to terminate # we do not check anything yet, the point is if rsyslog survived ;) # TODO: check for exit message, but we'll notice an abort anyhow, so not that important -#source $srcdir/diag.sh exit +source $srcdir/diag.sh exit -- cgit v1.2.3