summaryrefslogtreecommitdiffstats
path: root/tests/pipe_noreader.sh
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-04-26 12:53:37 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-04-26 12:53:37 +0200
commit270e455d6d9c6e7e580d6784435bf57ddc71bd85 (patch)
tree18c4b6005f386204cf204d6611c5e1d58e6891de /tests/pipe_noreader.sh
parent96895d9e471716f4a449589fefa9f80a0564755a (diff)
downloadrsyslog-270e455d6d9c6e7e580d6784435bf57ddc71bd85.tar.gz
rsyslog-270e455d6d9c6e7e580d6784435bf57ddc71bd85.tar.xz
rsyslog-270e455d6d9c6e7e580d6784435bf57ddc71bd85.zip
added testcase for problem with pipe without a reader
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=186 Note that this adds the test case, but does not yet provide a solution (so make check will hang when executed). Fix will be done next.
Diffstat (limited to 'tests/pipe_noreader.sh')
-rwxr-xr-xtests/pipe_noreader.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/pipe_noreader.sh b/tests/pipe_noreader.sh
new file mode 100755
index 00000000..c80aaf3f
--- /dev/null
+++ b/tests/pipe_noreader.sh
@@ -0,0 +1,22 @@
+# This is test driver for a pipe that has no reader. This mimics a usual
+# real-world scenario, the /dev/xconsole pipe. Some versions of rsyslog
+# were known to hang or loop on this pipe, thus we added this scenario
+# as a permanent testcase. For some details, please see bug tracker
+# http://bugzilla.adiscon.com/show_bug.cgi?id=186
+#
+# added 2010-04-26 by Rgerhards
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo TEST: \[pipe_noreader.sh\]: test for pipe writing without reader
+# uncomment for debugging support:
+export RSYSLOG_DEBUG="debug nostdout noprintmutexaction"
+export RSYSLOG_DEBUGLOG="log"
+source $srcdir/diag.sh init
+mkfifo ./rsyslog.pipe
+source $srcdir/diag.sh startup pipe_noreader.conf
+# we need to emit ~ 128K of data according to bug report
+source $srcdir/diag.sh tcpflood -m1000 -d500
+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
+source $srcdir/diag.sh seq-check 0 999
+source $srcdir/diag.sh exit