mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-16 23:50:41 +01:00
FreeBSD is not able to run all tests, therefore all tests that can't be run will be disabled.
53 lines
1.4 KiB
Bash
Executable File
53 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# add 2016-11-22 by Jan Gerhards, released under ASL 2.0
|
|
|
|
uname
|
|
if [ `uname` = "FreeBSD" ] ; then
|
|
echo "This test currently does not work on FreeBSD."
|
|
exit 77
|
|
fi
|
|
|
|
. $srcdir/diag.sh init
|
|
. $srcdir/diag.sh generate-conf
|
|
. $srcdir/diag.sh add-conf '
|
|
template(name="outfmt" type="string" string="%msg%\n")
|
|
|
|
module(load="../plugins/mmanon/.libs/mmanon")
|
|
module(load="../plugins/imtcp/.libs/imtcp")
|
|
input(type="imtcp" port="13514" ruleset="testing")
|
|
|
|
ruleset(name="testing") {
|
|
action(type="mmanon" ipv4.bits="33")
|
|
action(type="omfile" file="rsyslog.out.log" template="outfmt")
|
|
}
|
|
|
|
action(type="omfile" file="rsyslog2.out.log")'
|
|
|
|
. $srcdir/diag.sh startup
|
|
. $srcdir/diag.sh tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: 1.1.1.8
|
|
<129>Mar 10 01:00:00 172.20.245.8 tag: 0.0.0.0
|
|
<129>Mar 10 01:00:00 172.20.245.8 tag: 172.0.234.255
|
|
<129>Mar 10 01:00:00 172.20.245.8 tag: 111.1.1.8.\""
|
|
|
|
. $srcdir/diag.sh shutdown-when-empty
|
|
. $srcdir/diag.sh wait-shutdown
|
|
echo ' 0.0.0.0
|
|
0.0.0.0
|
|
0.0.0.0
|
|
0.0.0.0.' | cmp rsyslog.out.log
|
|
if [ ! $? -eq 0 ]; then
|
|
echo "invalid response generated, rsyslog.out.log is:"
|
|
cat rsyslog.out.log
|
|
. $srcdir/diag.sh error-exit 1
|
|
fi;
|
|
|
|
grep 'invalid number of ipv4.bits (33), corrected to 32' rsyslog2.out.log > /dev/null
|
|
if [ $? -ne 0 ]; then
|
|
echo "invalid response generated, rsyslog2.out.log is:"
|
|
cat rsyslog2.out.log
|
|
. $srcdir/diag.sh error-exit 1
|
|
fi;
|
|
|
|
|
|
. $srcdir/diag.sh exit
|