Merge pull request #4736 from rgerhards/tb-modernize

testbench: modernize some tests
This commit is contained in:
Rainer Gerhards 2021-11-18 09:45:28 +01:00 committed by GitHub
commit 89371a4cbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 39 additions and 101 deletions

View File

@ -23,14 +23,9 @@ tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: FFFF:FFFF:FFFF:FFFF:FF
shutdown_when_empty
wait_shutdown
echo ' 0:0:0:0:0:0:0:0
export EXPECTED=' 0:0:0:0:0:0:0:0
0.0.0.0 space 0:0:0:0:0:0:0:0
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
error_exit 1
fi;
0:0:0:0:0:0:0:0 0.0.0.0'
cmp_exact
exit_test

View File

@ -39,7 +39,7 @@ tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: asdfghjk
shutdown_when_empty
wait_shutdown
echo ' asdfghjk
export EXPECTED=' asdfghjk
0:0:0:0:0:0:0.0.0.0
61:34:ad::7:F 0:0:0:0:0:0:0.0.0.0
::
@ -58,11 +58,6 @@ echo ' asdfghjk
12:12345::a.3.4.12.7
textnoblank0:0:0:0:0:0:0.0.0.0
0:0:0:0:0:0:0.0.0.0stillnoblank
textnoblank0:0:0:0:0:0:0.0.0.0stillnoblank' | cmp - $RSYSLOG_OUT_LOG
if [ ! $? -eq 0 ]; then
echo "invalid response generated, $RSYSLOG_OUT_LOG is:"
cat $RSYSLOG_OUT_LOG
error_exit 1
fi;
textnoblank0:0:0:0:0:0:0.0.0.0stillnoblank'
cmp_exact
exit_test

View File

@ -45,7 +45,7 @@ tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: asdfghjk
shutdown_when_empty
wait_shutdown
echo ' asdfghjk
export EXPECTED=' asdfghjk
before 0.0.0.0
0.0.0.0 after
before 0.0.0.0 after
@ -70,11 +70,6 @@ echo ' asdfghjk
10.0.0.0.1
0.0.0.0.1
0.0.0.0.
textnoblank0.0.0.0stillnoblank' | cmp - $RSYSLOG_OUT_LOG
if [ ! $? -eq 0 ]; then
echo "invalid response generated, $RSYSLOG_OUT_LOG is:"
cat $RSYSLOG_OUT_LOG
error_exit 1
fi;
textnoblank0.0.0.0stillnoblank'
cmp_exact
exit_test

View File

@ -35,7 +35,7 @@ tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: asdfghjk
shutdown_when_empty
wait_shutdown
echo ' asdfghjk
export EXPECTED=' asdfghjk
0:0:0:0:0:0:0:0
0:0:0:0:0:0:0:0 0:0:0:0:0:0:0:0
0:0:0:0:0:0:0:0
@ -50,11 +50,6 @@ echo ' asdfghjk
12:10:0:0:0:0:0:0:0
textnoblank0:0:0:0:0:0:0:0
0:0:0:0:0:0:0:0stillnoblank
textnoblank0:0:0:0:0:0:0:0stillnoblank' | cmp - $RSYSLOG_OUT_LOG
if [ ! $? -eq 0 ]; then
echo "invalid response generated, $RSYSLOG_OUT_LOG is:"
cat $RSYSLOG_OUT_LOG
error_exit 1
fi;
textnoblank0:0:0:0:0:0:0:0stillnoblank'
cmp_exact
exit_test

View File

@ -46,7 +46,7 @@ tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: asdfghjk
shutdown_when_empty
wait_shutdown
echo ' asdfghjk
export EXPECTED=' asdfghjk
before ***.*.*.*
**.***.***.* after
before ***.**.*.* after
@ -71,12 +71,8 @@ echo ' asdfghjk
****.*.*.*.1
***.*.*.*.1
***.*.*.*.
textnoblank*.*.**.*stillnoblank' | cmp - $RSYSLOG_OUT_LOG
if [ ! $? -eq 0 ]; then
echo "invalid response generated, $RSYSLOG_OUT_LOG is:"
cat $RSYSLOG_OUT_LOG
error_exit 1
fi;
textnoblank*.*.**.*stillnoblank'
cmp_exact
grep 'invalid number of ipv4.bits (33), corrected to 32' ${RSYSLOG2_OUT_LOG} > /dev/null
if [ $? -ne 0 ]; then

View File

@ -23,14 +23,9 @@ tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: 1.1.1.8
shutdown_when_empty
wait_shutdown
echo ' 1.1.1.x
export EXPECTED=' 1.1.1.x
0.0.0.x
172.0.234.xxx
111.1.1.x.' | cmp - $RSYSLOG_OUT_LOG
if [ ! $? -eq 0 ]; then
echo "invalid response generated, $RSYSLOG_OUT_LOG is:"
cat $RSYSLOG_OUT_LOG
error_exit 1
fi;
111.1.1.x.'
cmp_exact
exit_test

View File

@ -48,7 +48,7 @@ tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: asdfghjk
shutdown_when_empty
wait_shutdown
echo ' asdfghjk
export EXPECTED=' asdfghjk
before 0.0.0.0
0.0.0.0 after
before 0.0.0.0 after
@ -73,12 +73,8 @@ echo ' asdfghjk
10.0.0.0.1
0.0.0.0.1
0.0.0.0.
textnoblank0.0.0.0stillnoblank' | cmp - $RSYSLOG_OUT_LOG
if [ ! $? -eq 0 ]; then
echo "invalid response generated, $RSYSLOG_OUT_LOG is:"
cat $RSYSLOG_OUT_LOG
error_exit 1
fi;
textnoblank0.0.0.0stillnoblank'
cmp_exact
if [ ! -e "$RSYSLOG_DEBUGLOG" ]; then
echo "error: file '$RSYSLOG_DEBUGLOG' (Debuglog) not found (should be generated)"
error_exit 1

View File

@ -27,19 +27,14 @@ tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: asdfghjk
shutdown_when_empty
wait_shutdown
echo ' asdfghjk
export EXPECTED=' asdfghjk
0:0:0:0:0:0:0:0
0:0:0:0:0:0:0:0 0:0:0:0:0:0:0:0
0:0:0:0:0:0:0:0
0:0:0:0:0:0:0:0
13:abd:45:
textnoblank0:0:0:0:0:0:0:0stillnoblank' | cmp - $RSYSLOG_OUT_LOG
if [ ! $? -eq 0 ]; then
echo "invalid response generated, $RSYSLOG_OUT_LOG is:"
cat $RSYSLOG_OUT_LOG
error_exit 1
fi;
textnoblank0:0:0:0:0:0:0:0stillnoblank'
cmp_exact
grep 'invalid number of ipv6.bits (129), corrected to 128' ${RSYSLOG2_OUT_LOG} > /dev/null
if [ $? -ne 0 ]; then

View File

@ -23,14 +23,9 @@ tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: 1.1.1.8
shutdown_when_empty
wait_shutdown
echo ' 1.1.0.0
export EXPECTED=' 1.1.0.0
0.0.0.0
172.0.224.0
111.1.0.0.' | cmp - $RSYSLOG_OUT_LOG
if [ ! $? -eq 0 ]; then
echo "invalid response generated, $RSYSLOG_OUT_LOG is:"
cat $RSYSLOG_OUT_LOG
error_exit 1
fi;
111.1.0.0.'
cmp_exact
exit_test

View File

@ -25,15 +25,11 @@ tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: 1.1.1.8
shutdown_when_empty
wait_shutdown
echo ' 0.0.0.0
export EXPECTED=' 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
error_exit 1
fi;
0.0.0.0.'
cmp_exact
grep 'invalid number of ipv4.bits (33), corrected to 32' ${RSYSLOG2_OUT_LOG} > /dev/null
if [ $? -ne 0 ]; then

View File

@ -27,17 +27,12 @@ tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: asdfghjk
shutdown_when_empty
wait_shutdown
echo ' asdfghjk
export EXPECTED=' asdfghjk
ffff:ffff:ffff:ffff:fffc:0:0:0
61:34:ad:0:0:0:0:0 aa:ff43:0:0:0:0:0:0
0:0:0:0:0:0:0:0
0:0:0:0:0:0:0:0
13:abd:45:
textnoblank72:8374:adc7:47ff:0:0:0:0stillnoblank' | cmp - $RSYSLOG_OUT_LOG
if [ ! $? -eq 0 ]; then
echo "invalid response generated, $RSYSLOG_OUT_LOG is:"
cat $RSYSLOG_OUT_LOG
error_exit 1
fi;
textnoblank72:8374:adc7:47ff:0:0:0:0stillnoblank'
cmp_exact
exit_test

View File

@ -26,17 +26,12 @@ tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: asdfghjk
shutdown_when_empty
wait_shutdown
echo ' asdfghjk
export EXPECTED=' asdfghjk
ffff:ffff:ffff:ffff:0:0:0:0
61:34:ad:0:0:0:0:0 aa:ff43:0:0:0:0:0:0
0:0:0:0:0:0:0:0
0:0:0:0:0:0:0:0
13:abd:45:
textnoblank72:8374:adc7:47ff:0:0:0:0stillnoblank' | cmp - $RSYSLOG_OUT_LOG
if [ ! $? -eq 0 ]; then
echo "invalid response generated, $RSYSLOG_OUT_LOG is:"
cat $RSYSLOG_OUT_LOG
error_exit 1
fi;
textnoblank72:8374:adc7:47ff:0:0:0:0stillnoblank'
cmp_exact
exit_test

View File

@ -23,14 +23,9 @@ tcpflood -m1 -M "\"<129>Mar 10 01:00:00 172.20.245.8 tag: 1.1.1.8
shutdown_when_empty
wait_shutdown
echo ' 1.1.1.0
export EXPECTED=' 1.1.1.0
0.0.0.0
172.0.234.0
111.1.1.0.' | cmp - $RSYSLOG_OUT_LOG
if [ ! $? -eq 0 ]; then
echo "invalid response generated, $RSYSLOG_OUT_LOG is:"
cat $RSYSLOG_OUT_LOG
error_exit 1
fi;
111.1.1.0.'
cmp_exact
exit_test