From 4d70c9b3e5e480d6dfa1c94506270f1f78e8ef32 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 13 Oct 2009 14:38:45 +0200 Subject: added some debug settings plus improved shutdown sequence ... non-working version! --- tests/Makefile.am | 2 +- tests/daqueue-persist-drvr.sh | 6 ++++++ tests/queue-persist-drvr.sh | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index c31e9eaa..7f12f633 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -7,7 +7,7 @@ TESTS = $(TESTRUNS) cfg.sh \ da-mainmsg-q.sh \ validation-run.sh \ imtcp-multiport.sh \ - daqueue-persist.sh \ + #daqueue-persist.sh \ diskqueue.sh \ diskqueue-fsync.sh \ manytcp.sh \ diff --git a/tests/daqueue-persist-drvr.sh b/tests/daqueue-persist-drvr.sh index d95991fc..69db73ba 100755 --- a/tests/daqueue-persist-drvr.sh +++ b/tests/daqueue-persist-drvr.sh @@ -19,8 +19,14 @@ $srcdir/diag.sh shutdown-immediate $srcdir/diag.sh wait-shutdown source $srcdir/diag.sh check-mainq-spool +echo "Enter phase 2, rsyslogd restart" + #exit +export RSYSLOG_DEBUG="debug nostdout printmutexaction" +export RSYSLOG_DEBUGLOG="log" +#valgrind="valgrind --tool=helgrind --log-fd=1" + # restart engine and have rest processed #remove delay echo "#" > work-delay.conf diff --git a/tests/queue-persist-drvr.sh b/tests/queue-persist-drvr.sh index ea5386a7..53fbcb8b 100755 --- a/tests/queue-persist-drvr.sh +++ b/tests/queue-persist-drvr.sh @@ -24,5 +24,6 @@ source $srcdir/diag.sh check-mainq-spool echo "#" > work-delay.conf source $srcdir/diag.sh startup queue-persist.conf source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +$srcdir/diag.sh wait-shutdown source $srcdir/diag.sh seq-check 0 4999 source $srcdir/diag.sh exit -- cgit From c5408da3d8f17691fb91282d031757ed041fec55 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 14 Oct 2009 11:01:21 +0200 Subject: new queue engine - initial commit (probably not 100% working!) simplified and thus speeded up the queue engine, also fixed some potential race conditions (in very unusual shutdown conditions) along the way. The threading model has seriously changes, so there may be some regressions. NOTE: the code passed basic tests, but there is still more work and testing to be done. This commit should be treated with care. --- tests/Makefile.am | 2 +- tests/arrayqueue.sh | 4 ++-- tests/daqueue-persist-drvr.sh | 9 ++++++--- tests/inputname.sh | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 7f12f633..c31e9eaa 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -7,7 +7,7 @@ TESTS = $(TESTRUNS) cfg.sh \ da-mainmsg-q.sh \ validation-run.sh \ imtcp-multiport.sh \ - #daqueue-persist.sh \ + daqueue-persist.sh \ diskqueue.sh \ diskqueue-fsync.sh \ manytcp.sh \ diff --git a/tests/arrayqueue.sh b/tests/arrayqueue.sh index 58fd24ae..baf303f3 100755 --- a/tests/arrayqueue.sh +++ b/tests/arrayqueue.sh @@ -1,7 +1,7 @@ # Test for fixedArray queue mode # added 2009-05-20 by rgerhards # This file is part of the rsyslog project, released under GPLv3 -echo testing queue fixedArray queue mode +echo \[arrayqueue.sh\]: testing queue fixedArray queue mode source $srcdir/diag.sh init source $srcdir/diag.sh startup arrayqueue.conf @@ -13,5 +13,5 @@ kill `cat rsyslog.pid` # now wait until rsyslog.pid is gone (and the process finished) source $srcdir/diag.sh wait-shutdown -source $srcdir/diag.sh seq-check 0 39999 +source $srcdir/diag.sh seq-check 39999 source $srcdir/diag.sh exit diff --git a/tests/daqueue-persist-drvr.sh b/tests/daqueue-persist-drvr.sh index 69db73ba..f5937541 100755 --- a/tests/daqueue-persist-drvr.sh +++ b/tests/daqueue-persist-drvr.sh @@ -12,6 +12,9 @@ source $srcdir/diag.sh init echo \$MainMsgQueueType $1 > work-queuemode.conf echo "*.* :omtesting:sleep 0 1000" > work-delay.conf +#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction" +#export RSYSLOG_DEBUGLOG="log0" + # inject 10000 msgs, so that DO hit the high watermark source $srcdir/diag.sh startup queue-persist.conf source $srcdir/diag.sh injectmsg 0 10000 @@ -23,8 +26,8 @@ echo "Enter phase 2, rsyslogd restart" #exit -export RSYSLOG_DEBUG="debug nostdout printmutexaction" -export RSYSLOG_DEBUGLOG="log" +#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction" +#export RSYSLOG_DEBUGLOG="log" #valgrind="valgrind --tool=helgrind --log-fd=1" # restart engine and have rest processed @@ -33,5 +36,5 @@ echo "#" > work-delay.conf source $srcdir/diag.sh startup queue-persist.conf source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages $srcdir/diag.sh wait-shutdown -source $srcdir/diag.sh seq-check 0 4999 +source $srcdir/diag.sh seq-check 0 99999 source $srcdir/diag.sh exit diff --git a/tests/inputname.sh b/tests/inputname.sh index e1a58517..71f11c1e 100755 --- a/tests/inputname.sh +++ b/tests/inputname.sh @@ -1,4 +1,4 @@ -echo testing $InputTCPServerInputName directive +echo \[inputname.sh\]: testing $InputTCPServerInputName directive $srcdir/killrsyslog.sh # kill rsyslogd if it runs for some reason echo port 12514 -- cgit From 90e8475260cf8ac54519b3d964d879489af879f6 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 19 Oct 2009 09:41:45 +0200 Subject: bugfix: message processing states were not set correctly in all cases however, this had no negative effect, as the message processing state was not evaluated when a batch was deleted, and that was the only case where the state could be wrong. --- tests/daqueue-persist-drvr.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/daqueue-persist-drvr.sh b/tests/daqueue-persist-drvr.sh index f5937541..d36a6be5 100755 --- a/tests/daqueue-persist-drvr.sh +++ b/tests/daqueue-persist-drvr.sh @@ -12,8 +12,8 @@ source $srcdir/diag.sh init echo \$MainMsgQueueType $1 > work-queuemode.conf echo "*.* :omtesting:sleep 0 1000" > work-delay.conf -#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction" -#export RSYSLOG_DEBUGLOG="log0" +export RSYSLOG_DEBUG="debug nostdout noprintmutexaction" +export RSYSLOG_DEBUGLOG="log0" # inject 10000 msgs, so that DO hit the high watermark source $srcdir/diag.sh startup queue-persist.conf @@ -26,8 +26,8 @@ echo "Enter phase 2, rsyslogd restart" #exit -#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction" -#export RSYSLOG_DEBUGLOG="log" +export RSYSLOG_DEBUG="debug nostdout noprintmutexaction" +export RSYSLOG_DEBUGLOG="log" #valgrind="valgrind --tool=helgrind --log-fd=1" # restart engine and have rest processed -- cgit