From dcc721a95bef6f0d8e6d8775b8efe33e5aecd562 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 18:28:20 +0200 Subject: Adding upstream version 8.2402.0. Signed-off-by: Daniel Baumann --- tests/mmpstrucdata-case.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 tests/mmpstrucdata-case.sh (limited to 'tests/mmpstrucdata-case.sh') diff --git a/tests/mmpstrucdata-case.sh b/tests/mmpstrucdata-case.sh new file mode 100755 index 0000000..97a86b5 --- /dev/null +++ b/tests/mmpstrucdata-case.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# the goal here is to detect memleaks when structured data is not +# correctly parsed. +# This file is part of the rsyslog project, released under ASL 2.0 +# rgerhards, 2015-04-30 +. ${srcdir:=.}/diag.sh init +generate_conf +add_conf ' +module(load="../plugins/mmpstrucdata/.libs/mmpstrucdata") +module(load="../plugins/imtcp/.libs/imtcp") + +template(name="outfmt" type="string" string="SD:%$!RFC5424-SD%\n") + +input(type="imtcp" port="0" listenPortFileName="'$RSYSLOG_DYNNAME'.tcpflood_port") + +action(type="mmpstrucdata" sd_name.lowercase="off") + +action(type="omfile" template="outfmt" file="'$RSYSLOG_OUT_LOG'") +' +startup +assign_tcpflood_port $RSYSLOG_DYNNAME.tcpflood_port +tcpflood -m100 -M "\"<161>1 2003-03-01T01:00:00.000Z mymachine.example.com tcpflood - tag [tcpflood@32473 eventID=\\\"1011\\\"] valid structured data\"" +shutdown_when_empty +wait_shutdown +content_check_with_count eventID 100 +exit_test -- cgit v1.2.3