diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:28:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:28:20 +0000 |
commit | dcc721a95bef6f0d8e6d8775b8efe33e5aecd562 (patch) | |
tree | 66a2774cd0ee294d019efd71d2544c70f42b2842 /tests/rscript_set_memleak-vg.sh | |
parent | Initial commit. (diff) | |
download | rsyslog-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 '')
-rwxr-xr-x | tests/rscript_set_memleak-vg.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/rscript_set_memleak-vg.sh b/tests/rscript_set_memleak-vg.sh new file mode 100755 index 0000000..bc4e0bc --- /dev/null +++ b/tests/rscript_set_memleak-vg.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# A test that checks for memory leaks +# created based on real world case: +# https://github.com/rsyslog/rsyslog/issues/1376 +# Copyright 2017-01-24 by Rainer Gerhards +# This file is part of the rsyslog project, released under ASL 2.0 +. ${srcdir:=.}/diag.sh init +export NUMMESSAGES=5000 +generate_conf +add_conf ' +template(name="json" type="string" string="%$!%\n") +template(name="ts" type="string" string="%timestamp:::date-rfc3339%") +ruleset(name="rcvr" queue.type="LinkedList" + queue.timeoutShutdown="'$RSTB_GLOBAL_QUEUE_SHUTDOWN_TIMEOUT'") { + set $.index="unknown"; + set $.type="unknown"; + set $.interval=$$now & ":" & $$hour; + set $!host_forwarded=$hostname; + set $!host_received=$$myhostname; + set $!time_received=$timegenerated; + set $!@timestamp=exec_template("ts"); + action( type="omfile" + file=`echo $RSYSLOG_OUT_LOG` + template="json" + ) +}' +startup_vg +injectmsg +shutdown_when_empty +wait_shutdown_vg +check_exit_vg +# note: we check only the valgrind result, we are not really interested +# in the output data (non-standard format in any way...) +exit_test |