summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/arrayqueue.sh3
-rwxr-xr-xtests/badqi.sh3
-rwxr-xr-xtests/da-mainmsg-q.sh4
-rwxr-xr-xtests/diag.sh3
-rwxr-xr-xtests/discard.sh3
-rwxr-xr-xtests/omruleset-queue.sh2
-rwxr-xr-xtests/omruleset.sh2
-rwxr-xr-xtests/rulesetmultiqueue.sh7
8 files changed, 20 insertions, 7 deletions
diff --git a/tests/arrayqueue.sh b/tests/arrayqueue.sh
index baf303f3..71e1cc21 100755
--- a/tests/arrayqueue.sh
+++ b/tests/arrayqueue.sh
@@ -1,6 +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 ===============================================================================
echo \[arrayqueue.sh\]: testing queue fixedArray queue mode
source $srcdir/diag.sh init
source $srcdir/diag.sh startup arrayqueue.conf
@@ -13,5 +14,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 39999
+source $srcdir/diag.sh seq-check 0 39999
source $srcdir/diag.sh exit
diff --git a/tests/badqi.sh b/tests/badqi.sh
index 1e6df760..81f8c1c2 100755
--- a/tests/badqi.sh
+++ b/tests/badqi.sh
@@ -4,6 +4,7 @@
# added 2009-10-21 by RGerhards
# This file is part of the rsyslog project, released under GPLv3
# uncomment for debugging support:
+echo ===============================================================================
echo \[badqi.sh\]: test startup with invalid .qi file
source $srcdir/diag.sh init
source $srcdir/diag.sh startup badqi.conf
@@ -11,5 +12,5 @@ source $srcdir/diag.sh startup badqi.conf
source $srcdir/diag.sh tcpflood 127.0.0.1 13514 1 20
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
source $srcdir/diag.sh wait-shutdown # wait for process to terminate
-source $srcdir/diag.sh seq-check 0 20
+source $srcdir/diag.sh seq-check 0 19
source $srcdir/diag.sh exit
diff --git a/tests/da-mainmsg-q.sh b/tests/da-mainmsg-q.sh
index d502fca3..d9cc0d4d 100755
--- a/tests/da-mainmsg-q.sh
+++ b/tests/da-mainmsg-q.sh
@@ -7,6 +7,7 @@
# check everything recovers from DA mode correctly.
# added 2009-04-22 by Rgerhards
# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
echo "[da-mainmsg-q.sh]: testing main message queue in DA mode (going to disk)"
source $srcdir/diag.sh init
source $srcdir/diag.sh startup da-mainmsg-q.conf
@@ -27,5 +28,6 @@ source $srcdir/diag.sh injectmsg 2050 50
# clean up and check test result
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
-source $srcdir/diag.sh seq-check 2099
+source $srcdir/diag.sh wait-shutdown
+source $srcdir/diag.sh seq-check 0 2099
source $srcdir/diag.sh exit
diff --git a/tests/diag.sh b/tests/diag.sh
index 50749eaa..402a47c2 100755
--- a/tests/diag.sh
+++ b/tests/diag.sh
@@ -85,7 +85,8 @@ case $1 in
rm -f work
sort < rsyslog.out.log > work
# $4... are just to have the abilit to pass in more options...
- ./chkseq -fwork -v -s$2 -e$3 $4 $5 $6 $7
+ # add -v to chkseq if you need more verbose output
+ ./chkseq -fwork -s$2 -e$3 $4 $5 $6 $7
if [ "$?" -ne "0" ]; then
echo "sequence error detected"
exit 1
diff --git a/tests/discard.sh b/tests/discard.sh
index b7ba4eba..9824b361 100755
--- a/tests/discard.sh
+++ b/tests/discard.sh
@@ -4,6 +4,7 @@
# added 2009-07-30 by Rgerhards
# This file is part of the rsyslog project, released under GPLv3
# uncomment for debugging support:
+echo ===============================================================================
echo \[discard.sh\]: testing discard functionality
source $srcdir/diag.sh init
source $srcdir/diag.sh startup discard.conf
@@ -12,5 +13,5 @@ sleep 4
source $srcdir/diag.sh tcpflood 127.0.0.1 13514 1 10 1
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 10 -s2
+source $srcdir/diag.sh seq-check 2 10
source $srcdir/diag.sh exit
diff --git a/tests/omruleset-queue.sh b/tests/omruleset-queue.sh
index 1adf2151..cfb80c62 100755
--- a/tests/omruleset-queue.sh
+++ b/tests/omruleset-queue.sh
@@ -15,5 +15,5 @@ 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 19999
+source $srcdir/diag.sh seq-check 0 19999
source $srcdir/diag.sh exit
diff --git a/tests/omruleset.sh b/tests/omruleset.sh
index 55dd0872..dbc5cb31 100755
--- a/tests/omruleset.sh
+++ b/tests/omruleset.sh
@@ -18,5 +18,5 @@ 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 4999
+source $srcdir/diag.sh seq-check 0 4999
source $srcdir/diag.sh exit
diff --git a/tests/rulesetmultiqueue.sh b/tests/rulesetmultiqueue.sh
index 5f594adb..aff55148 100755
--- a/tests/rulesetmultiqueue.sh
+++ b/tests/rulesetmultiqueue.sh
@@ -5,6 +5,7 @@
# support multi-output-file operations.
# added 2009-10-30 by Rgerhards
# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
echo \[rulesetmultiqueu.sh\]: testing multiple queues via rulesets
source $srcdir/diag.sh init
rm -f rsyslog.out1.log rsyslog.out2.log rsyslog.out3.log
@@ -16,6 +17,12 @@ source $srcdir/diag.sh wait-startup
source $srcdir/diag.sh tcpflood 127.0.0.1 13514 3 20000 0
source $srcdir/diag.sh tcpflood 127.0.0.1 13515 3 20000 20000
source $srcdir/diag.sh tcpflood 127.0.0.1 13516 3 20000 40000
+
+# in this version of the imdiag, we do not have the capability to poll
+# all queues for emptyness. So we do a sleep in the hopes that this will
+# sufficiently drain the queues. This is race, but the best we currently
+# can do... - rgerhards, 2009-11-05
+sleep 2
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
source $srcdir/diag.sh wait-shutdown
# now consolidate all logs into a single one so that we can use the