mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-18 19:10:42 +01:00
Merge branch 'master' of https://github.com/alanrobson/rsyslog into merge-2181
This commit is contained in:
commit
48a49644d5
@ -216,7 +216,7 @@ parseSD_NAME(uchar *sdbuf, int lenbuf, int *curridx, uchar *namebuf)
|
||||
if( sdbuf[i] == '=' || sdbuf[i] == '"'
|
||||
|| sdbuf[i] == ']' || sdbuf[i] == ' ')
|
||||
break;
|
||||
namebuf[j] = tolower(sdbuf[i]);
|
||||
namebuf[j] = sdbuf[i];
|
||||
++i;
|
||||
}
|
||||
namebuf[j] = '\0';
|
||||
|
||||
@ -549,7 +549,8 @@ endif
|
||||
|
||||
if ENABLE_MMPSTRUCDATA
|
||||
TESTS += \
|
||||
mmpstrucdata.sh
|
||||
mmpstrucdata.sh \
|
||||
mmpstrucdata-case.sh
|
||||
if HAVE_VALGRIND
|
||||
TESTS += \
|
||||
mmpstrucdata-vg.sh \
|
||||
@ -1553,8 +1554,10 @@ EXTRA_DIST= \
|
||||
testsuites/zoo.dep_wrk2.cfg \
|
||||
testsuites/zoo.dep_wrk3.cfg \
|
||||
mmpstrucdata.sh \
|
||||
mmpstrucdata-case.sh \
|
||||
mmpstrucdata-vg.sh \
|
||||
testsuites/mmpstrucdata.conf \
|
||||
testsuites/mmpstrucdata-case.conf \
|
||||
mmpstrucdata-invalid-vg.sh \
|
||||
testsuites/mmpstrucdata-invalid.conf \
|
||||
libdbi-basic-vg.sh \
|
||||
|
||||
22
tests/mmpstrucdata-case.sh
Executable file
22
tests/mmpstrucdata-case.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/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
|
||||
|
||||
uname
|
||||
if [ `uname` = "FreeBSD" ] ; then
|
||||
echo "This test currently does not work on FreeBSD."
|
||||
exit 77
|
||||
fi
|
||||
|
||||
echo ===============================================================================
|
||||
echo \[mmpstrucdata-invalid.sh\]: testing mmpstrucdata with invalid SD
|
||||
. $srcdir/diag.sh init
|
||||
. $srcdir/diag.sh startup mmpstrucdata-case.conf
|
||||
. $srcdir/diag.sh wait-startup
|
||||
. $srcdir/diag.sh tcpflood -m100 -M "\"<161>1 2003-03-01T01:00:00.000Z mymachine.example.com tcpflood - tag [tcpflood@32473 eventID=\\\"1011\\\"] valid structured data\""
|
||||
. $srcdir/diag.sh shutdown-when-empty
|
||||
. $srcdir/diag.sh wait-shutdown
|
||||
. $srcdir/diag.sh content-check-with-count eventID 100
|
||||
. $srcdir/diag.sh exit
|
||||
12
tests/testsuites/mmpstrucdata-case.conf
Normal file
12
tests/testsuites/mmpstrucdata-case.conf
Normal file
@ -0,0 +1,12 @@
|
||||
$IncludeConfig diag-common.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="13514")
|
||||
|
||||
action(type="mmpstrucdata")
|
||||
|
||||
action(type="omfile" template="outfmt" file="rsyslog.out.log")
|
||||
Loading…
x
Reference in New Issue
Block a user