summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-03-19 13:32:31 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-03-19 13:32:31 +0100
commitab8af1c38df75fc5757e83a04862bf548a1e98a3 (patch)
treec49d0cb58c72d93b2e377ab32789a1f6e0006ba7 /tests
parent970383f2199e177453bc13a40c3ccf04aeb647e1 (diff)
downloadrsyslog-ab8af1c38df75fc5757e83a04862bf548a1e98a3.tar.gz
rsyslog-ab8af1c38df75fc5757e83a04862bf548a1e98a3.tar.xz
rsyslog-ab8af1c38df75fc5757e83a04862bf548a1e98a3.zip
solved some race conditions in testbench
the test cases actually have some races, not the code to be tested
Diffstat (limited to 'tests')
-rwxr-xr-xtests/asynwr_deadlock2.sh3
-rwxr-xr-xtests/manytcp.sh2
2 files changed, 4 insertions, 1 deletions
diff --git a/tests/asynwr_deadlock2.sh b/tests/asynwr_deadlock2.sh
index 34d37d48..1190f67a 100755
--- a/tests/asynwr_deadlock2.sh
+++ b/tests/asynwr_deadlock2.sh
@@ -60,7 +60,8 @@ source $srcdir/diag.sh startup asynwr_deadlock2.conf
# send 20000 messages, each close to 2K (non-randomized!), so that we can fill
# the buffers and hopefully run into the "deadlock".
source $srcdir/diag.sh tcpflood -m20000 -d1800 -P129 -i1 -f5
-# sleep is important! need to make sure the instance is inactive
+# the sleep below is needed to prevent too-early termination of the tcp listener
+sleep 1
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
source $srcdir/diag.sh wait-shutdown # and wait for it to terminate
cat rsyslog.out.*.log > rsyslog.out.log
diff --git a/tests/manytcp.sh b/tests/manytcp.sh
index 01f3e43b..94a5c035 100755
--- a/tests/manytcp.sh
+++ b/tests/manytcp.sh
@@ -3,6 +3,8 @@ source $srcdir/diag.sh init
source $srcdir/diag.sh startup manytcp.conf
# the config file specifies exactly 1100 connections
source $srcdir/diag.sh tcpflood -c1000 -m40000
+# the sleep below is needed to prevent too-early termination of the tcp listener
+sleep 1
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
source $srcdir/diag.sh wait-shutdown # we need to wait until rsyslogd is finished!
source $srcdir/diag.sh seq-check 0 39999