summaryrefslogtreecommitdiffstats
path: root/tests/nested-call-shutdown.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 16:28:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 16:28:20 +0000
commitdcc721a95bef6f0d8e6d8775b8efe33e5aecd562 (patch)
tree66a2774cd0ee294d019efd71d2544c70f42b2842 /tests/nested-call-shutdown.sh
parentInitial commit. (diff)
downloadrsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.tar.xz
rsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.zip
Adding upstream version 8.2402.0.upstream/8.2402.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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