summaryrefslogtreecommitdiffstats
path: root/tests/asynwr_small.sh
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-03-10 07:36:38 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-03-10 07:36:38 +0100
commit5996414f04118dec4f1dcc12c88ee8c68f6e89ad (patch)
tree15dc13ca78aec4cfd0c7f222729815b50d9d8705 /tests/asynwr_small.sh
parent3d80d6ba301e4d26b646c84d621ebe880ebc513f (diff)
downloadrsyslog-5996414f04118dec4f1dcc12c88ee8c68f6e89ad.tar.gz
rsyslog-5996414f04118dec4f1dcc12c88ee8c68f6e89ad.tar.xz
rsyslog-5996414f04118dec4f1dcc12c88ee8c68f6e89ad.zip
bugfixes and testbench improvement
- improved testbench - bugfix: potential data loss during file stream shutdown - bugfix: potential problems during file stream shutdown The shutdown/close sequence was not clean, what potentially (but unlikely) could lead to some issues. We have not been able to describe any fatal cases, but there was some bug potential. Sequence has now been straighted out.
Diffstat (limited to 'tests/asynwr_small.sh')
-rwxr-xr-xtests/asynwr_small.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/asynwr_small.sh b/tests/asynwr_small.sh
new file mode 100755
index 00000000..692d27fa
--- /dev/null
+++ b/tests/asynwr_small.sh
@@ -0,0 +1,24 @@
+# This tests async writing with only a small set of data. That
+# shall result in data staying in buffers until shutdown, what
+# then will trigger some somewhat complex logic in the stream
+# writer (open, write, close all during the stream close
+# opertion). It is vital that only few messages be sent.
+#
+# The main effort of this test is not (only) to see if we
+# receive the data, but rather to see if we get into an abort
+# condition.
+#
+# added 2010-03-09 by Rgerhards
+#
+# This file is part of the rsyslog project, released under GPLv3
+echo TEST: \[asynwr_small.sh\]: test for async file writing for few messages
+source $srcdir/diag.sh init
+# uncomment for debugging support:
+#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction"
+#export RSYSLOG_DEBUGLOG="log"
+source $srcdir/diag.sh startup asynwr_small.conf
+# send 4000 messages
+source $srcdir/diag.sh tcpflood 127.0.0.1 13514 1 2
+source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
+source $srcdir/diag.sh seq-check 0 1
+source $srcdir/diag.sh exit