mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-19 20:50:42 +01:00
34 lines
1.4 KiB
Bash
Executable File
34 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# add 2018-04-25 by PascalWithopf, released under ASL 2.0
|
|
. $srcdir/diag.sh init
|
|
./have_relpSrvSetOversizeMode
|
|
if [ $? -eq 1 ]; then
|
|
echo "imrelp parameter oversizeMode not available. Test stopped"
|
|
exit 77
|
|
fi;
|
|
. $srcdir/diag.sh generate-conf
|
|
. $srcdir/diag.sh add-conf '
|
|
module(load="../plugins/imrelp/.libs/imrelp")
|
|
input(type="imrelp" port="13514" maxdatasize="200" oversizeMode="accept")
|
|
|
|
template(name="outfmt" type="string" string="%msg%\n")
|
|
:msg, contains, "msgnum:" action(type="omfile" template="outfmt"
|
|
file="rsyslog.out.log")
|
|
'
|
|
. $srcdir/diag.sh startup
|
|
. $srcdir/diag.sh tcpflood -Trelp-plain -p13514 -m1 -d 240
|
|
. $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
|
. $srcdir/diag.sh wait-shutdown
|
|
|
|
# We need the ^-sign to symbolize the beginning and the $-sign to symbolize the end
|
|
# because otherwise we won't know if it was truncated at the right length.
|
|
grep "^ msgnum:00000000:240:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX$" rsyslog.out.log > /dev/null
|
|
if [ $? -ne 0 ]; then
|
|
echo
|
|
echo "FAIL: expected message not found. rsyslog.out.log is:"
|
|
cat rsyslog.out.log
|
|
. $srcdir/diag.sh error-exit 1
|
|
fi
|
|
|
|
. $srcdir/diag.sh exit
|