summaryrefslogtreecommitdiffstats
path: root/tests/glbl-unloadmodules.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/glbl-unloadmodules.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/glbl-unloadmodules.sh')
-rwxr-xr-xtests/glbl-unloadmodules.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/glbl-unloadmodules.sh b/tests/glbl-unloadmodules.sh
new file mode 100755
index 0000000..9b006fd
--- /dev/null
+++ b/tests/glbl-unloadmodules.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+# we only test if the parameter is accepted - we cannot
+# reliably deduce from the outside if it really worked.
+# addd 2016-03-03 by RGerhards, released under ASL 2.0
+echo \[glbl-unloadmodules\]:
+. ${srcdir:=.}/diag.sh init
+generate_conf
+add_conf '
+global(debug.unloadModules="off")
+
+action(type="omfile" file=`echo $RSYSLOG_OUT_LOG`)
+'
+startup
+sleep 1
+shutdown_when_empty
+wait_shutdown
+# to check for support, we check if an error message has
+# been recorded, which would bear the name of our option.
+# if it is not recorded, we assume all is well. Not perfect,
+# but works good enough.
+grep -i "unloadModules" < $RSYSLOG_OUT_LOG
+if [ ! $? -eq 1 ]; then
+ echo "parameter name in output, assuming error message:"
+ cat $RSYSLOG_OUT_LOG
+ exit 1
+fi;
+exit_test