summaryrefslogtreecommitdiffstats
path: root/tests/nested-call-shutdown.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nested-call-shutdown.sh')
-rwxr-xr-xtests/nested-call-shutdown.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/nested-call-shutdown.sh b/tests/nested-call-shutdown.sh
new file mode 100755
index 0000000..f82c6b5
--- /dev/null
+++ b/tests/nested-call-shutdown.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+# addd 2017-10-18 by RGerhards, released under ASL 2.0
+
+. ${srcdir:=.}/diag.sh init
+generate_conf
+add_conf '
+module(load="../plugins/omtesting/.libs/omtesting")
+module(load="../plugins/imtcp/.libs/imtcp")
+input(type="imtcp" port="0" listenPortFileName="'$RSYSLOG_DYNNAME'.tcpflood_port")
+
+template(name="outfmt" type="string" string="%msg:F,58:2%\n")
+
+ruleset(name="rs3" queue.type="linkedList") {
+ action(type="omfile" template="outfmt" file=`echo $RSYSLOG_OUT_LOG`)
+}
+
+ruleset(name="rs2" queue.type="linkedList") {
+ call rs3
+}
+
+ruleset(name="rs1" queue.type="linkedList") {
+ call rs2
+ :omtesting:sleep 0 1000
+}
+
+if $msg contains "msgnum:" then call rs1
+'
+startup
+#tcpflood -p'$TCPFLOOD_PORT' -m10000
+injectmsg 0 1000
+shutdown_immediate
+wait_shutdown
+# wo do not check reception - the main point is that we do not abort. The actual
+# message count is unknown (as the point is to shut down while still in processing).
+exit_test