summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am1
-rwxr-xr-xtests/diskqueue.sh2
-rwxr-xr-xtests/fieldtest.sh2
-rwxr-xr-xtests/inputname.sh2
-rwxr-xr-xtests/manytcp.sh2
-rwxr-xr-xtests/omod-if-array.sh2
-rwxr-xr-xtests/parsertest.sh2
-rw-r--r--tests/testsuites/diskqueue.conf3
-rw-r--r--tests/testsuites/manytcp.conf3
-rwxr-xr-xtests/waitqueueempty.sh4
10 files changed, 17 insertions, 6 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c0e629d3..ed48fce8 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -46,6 +46,7 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
testsuites/1.inputname_imtcp_12515 \
testsuites/1.inputname_imtcp_12516 \
omod-if-array.sh \
+ waitqueueempty.sh \
cfg.sh
ourtail_SOURCES = ourtail.c
diff --git a/tests/diskqueue.sh b/tests/diskqueue.sh
index 6384eb64..a91f3414 100755
--- a/tests/diskqueue.sh
+++ b/tests/diskqueue.sh
@@ -17,7 +17,7 @@ if [ "$?" -ne "0" ]; then
echo "error during tcpflood! see rsyslog.out.log.save for what was written"
cp rsyslog.out.log rsyslog.out.log.save
fi
-sleep 4 # we need this so that rsyslogd can receive all outstanding messages
+$srcdir/waitqueueempty.sh # wait until rsyslogd is done processing messages
kill `cat rsyslog.pid`
rm -f work
sort < rsyslog.out.log > work
diff --git a/tests/fieldtest.sh b/tests/fieldtest.sh
index 7a646f00..482fa143 100755
--- a/tests/fieldtest.sh
+++ b/tests/fieldtest.sh
@@ -1,5 +1,5 @@
echo test fieldtest via udp
-./killrsyslog.sh # kill rsyslogd if it runs for some reason
+$srcdir/killrsyslog.sh # kill rsyslogd if it runs for some reason
./nettester -tfield1 -iudp
if [ "$?" -ne "0" ]; then
diff --git a/tests/inputname.sh b/tests/inputname.sh
index 7d9ea111..e1a58517 100755
--- a/tests/inputname.sh
+++ b/tests/inputname.sh
@@ -1,5 +1,5 @@
echo testing $InputTCPServerInputName directive
-./killrsyslog.sh # kill rsyslogd if it runs for some reason
+$srcdir/killrsyslog.sh # kill rsyslogd if it runs for some reason
echo port 12514
./nettester -tinputname_imtcp_12514 -cinputname_imtcp -itcp -p12514
diff --git a/tests/manytcp.sh b/tests/manytcp.sh
index d9b2e9a0..06bd38b6 100755
--- a/tests/manytcp.sh
+++ b/tests/manytcp.sh
@@ -8,7 +8,7 @@ if [ "$?" -ne "0" ]; then
echo "error during tcpflood! see rsyslog.out.log.save for what was written"
cp rsyslog.out.log rsyslog.out.log.save
fi
-sleep 5 # we need this so that rsyslogd can receive all outstanding messages
+$srcdir/waitqueueempty.sh # wait until rsyslogd is done processing messages
kill `cat rsyslog.pid`
rm -f work
sort < rsyslog.out.log > work
diff --git a/tests/omod-if-array.sh b/tests/omod-if-array.sh
index 7b4b5611..2c2a8ef3 100755
--- a/tests/omod-if-array.sh
+++ b/tests/omod-if-array.sh
@@ -1,5 +1,5 @@
echo test omod-if-array via udp
-./killrsyslog.sh # kill rsyslogd if it runs for some reason
+$srcdir/killrsyslog.sh # kill rsyslogd if it runs for some reason
./nettester -tomod-if-array -iudp -p4711
if [ "$?" -ne "0" ]; then
diff --git a/tests/parsertest.sh b/tests/parsertest.sh
index 152d8b60..afdb9469 100755
--- a/tests/parsertest.sh
+++ b/tests/parsertest.sh
@@ -1,5 +1,5 @@
echo test parsertest via udp
-./killrsyslog.sh # kill rsyslogd if it runs for some reason
+$srcdir/killrsyslog.sh # kill rsyslogd if it runs for some reason
./nettester -tparse1 -iudp
if [ "$?" -ne "0" ]; then
diff --git a/tests/testsuites/diskqueue.conf b/tests/testsuites/diskqueue.conf
index 8851a459..017ee96d 100644
--- a/tests/testsuites/diskqueue.conf
+++ b/tests/testsuites/diskqueue.conf
@@ -4,6 +4,9 @@ $ModLoad ../plugins/imtcp/.libs/imtcp
$MainMsgQueueTimeoutShutdown 10000
$InputTCPServerRun 13514
+$ModLoad ../plugins/imdiag/.libs/imdiag
+$IMDiagServerRun 13500
+
$ErrorMessagesToStderr off
# set spool locations and switch queue to disk-only mode
diff --git a/tests/testsuites/manytcp.conf b/tests/testsuites/manytcp.conf
index 8175732e..3867da46 100644
--- a/tests/testsuites/manytcp.conf
+++ b/tests/testsuites/manytcp.conf
@@ -6,6 +6,9 @@ $MaxOpenFiles 2000
$InputTCPMaxSessions 1100
$InputTCPServerRun 13514
+$ModLoad ../plugins/imdiag/.libs/imdiag
+$IMDiagServerRun 13500
+
$ErrorMessagesToStderr off
$template outfmt,"%msg:F,58:2%\n"
diff --git a/tests/waitqueueempty.sh b/tests/waitqueueempty.sh
new file mode 100755
index 00000000..2c047588
--- /dev/null
+++ b/tests/waitqueueempty.sh
@@ -0,0 +1,4 @@
+# wait until main message queue is empty. This is currently done in
+# a separate shell script so that we can change the implementation
+# at some later point. -- rgerhards, 2009-05-25
+echo WaitMainQueueEmpty | nc 127.0.0.1 13500