From fc3e56941ca6dbf401bee2f9dc0f9e4c5cd87f40 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 28 May 2009 11:57:30 +0200 Subject: fixing an issue during DA mode queue shutdown also changed DA queue mode in that the regular workers now run concurrently. --- tests/chkseq.c | 3 ++- tests/da-mainmsg-q.sh | 8 +++++--- tests/diag.sh | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/chkseq.c b/tests/chkseq.c index 5ffe855c..8c5fc61a 100644 --- a/tests/chkseq.c +++ b/tests/chkseq.c @@ -79,7 +79,8 @@ int main(int argc, char *argv[]) /* read file */ fp = fopen(file, "r"); if(fp == NULL) { - perror(argv[1]); + printf("error opening file '%s'\n", file); + perror(file); exit(1); } diff --git a/tests/da-mainmsg-q.sh b/tests/da-mainmsg-q.sh index 1c947de2..25e7fd95 100755 --- a/tests/da-mainmsg-q.sh +++ b/tests/da-mainmsg-q.sh @@ -17,16 +17,18 @@ source $srcdir/diag.sh injectmsg 0 50 source $srcdir/diag.sh wait-queueempty # let queue drain for this test case # part 2: send bunch of messages. This should trigger DA mode -source $srcdir/diag.sh injectmsg 50 20000 +#source $srcdir/diag.sh injectmsg 50 20000 +source $srcdir/diag.sh injectmsg 50 2000 ls -l test-spool # for manual review # send another handful -source $srcdir/diag.sh injectmsg 20050 50 +source $srcdir/diag.sh injectmsg 2050 50 #sleep 1 # we need this so that rsyslogd can receive all outstanding messages # clean up and check test result source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages ### currently, we get a stable abort if we use the former kill logic. With shutdown-when-empty, it hangs (but that still tells us there is a bug ;)) ### #kill `cat rsyslog.pid` -source $srcdir/diag.sh seq-check 0 20099 +echo seqchk? +source $srcdir/diag.sh seq-check 2099 source $srcdir/diag.sh exit diff --git a/tests/diag.sh b/tests/diag.sh index 8bf6b129..a34f3ede 100755 --- a/tests/diag.sh +++ b/tests/diag.sh @@ -9,8 +9,8 @@ #valgrind="valgrind --tool=drd --log-fd=1" #valgrind="valgrind --tool=helgrind --log-fd=1" #set -o xtrace -export RSYSLOG_DEBUG="debug nostdout printmutexaction" -export RSYSLOG_DEBUGLOG="log" +#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction" +#export RSYSLOG_DEBUGLOG="log" case $1 in 'init') $srcdir/killrsyslog.sh # kill rsyslogd if it runs for some reason rm -f core.* vgcore.* # do NOT delete them at exit ;) -- cgit