summaryrefslogtreecommitdiffstats
path: root/tests/unused_lookup_table-vg.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/unused_lookup_table-vg.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/unused_lookup_table-vg.sh')
-rwxr-xr-xtests/unused_lookup_table-vg.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/unused_lookup_table-vg.sh b/tests/unused_lookup_table-vg.sh
new file mode 100755
index 0000000..fb49c89
--- /dev/null
+++ b/tests/unused_lookup_table-vg.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+# test for ensuring clean destruction of lookup-table even when it is never used
+# added 2015-09-30 by singh.janmejay
+# This file is part of the rsyslog project, released under ASL 2.0
+. ${srcdir:=.}/diag.sh init
+skip_platform "FreeBSD" "This test currently does not work on FreeBSD"
+generate_conf
+add_conf '
+lookup_table(name="xlate" file="'$RSYSLOG_DYNNAME'.xlate.lkp_tbl")
+
+template(name="outfmt" type="string" string="- %msg%\n")
+
+action(type="omfile" file=`echo $RSYSLOG_OUT_LOG` template="outfmt")
+'
+cp -f $srcdir/testsuites/xlate.lkp_tbl $RSYSLOG_DYNNAME.xlate.lkp_tbl
+startup_vg
+injectmsg 0 1
+shutdown_when_empty
+wait_shutdown_vg
+check_exit_vg
+content_check "msgnum:00000000:"
+exit_test
+
+# the test actually expects clean destruction of lookup_table
+# when lookup_table is loaded, it can either be:
+# - used (clean destruct covered by another test)
+# - not-used (this test ensures its destroyed cleanly)