Skip to content

Commit

Permalink
testbench: make test more reliable
Browse files Browse the repository at this point in the history
There was a race between tcpflood and rsyslog in imptpc_maxsessions.sh.
We now use the new -A tcpflood option to make the timing more
predictable, hopefully fixing test flakiness.

Note: if that does not help, we need to introduce a wait on the number
of error messages and maybe a delay before tcpflood termination. The
theory behind the latter is that rsyslog possibly does not fully
iniaitlize session which are quickly aborted before rsyslog receives
the related OS notification! We just record this info in case we
need it and are positive that this change will fix the situation.
  • Loading branch information
rgerhards committed Jul 28, 2023
1 parent bf58c35 commit 37de8f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/imptcp_maxsessions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ startup
echo "INFO: RSYSLOG_OUT_LOG: $RSYSLOG_OUT_LOG"

echo "About to run tcpflood"
tcpflood -c$CONNECTIONS -m$NUMMESSAGES -r -d100 -P129
tcpflood -c$CONNECTIONS -m$NUMMESSAGES -r -d100 -P129 -A
echo "-------> NOTE: CLOSED REMOTELY messages are expected and OK! <-------"
echo "done run tcpflood"
shutdown_when_empty
wait_shutdown
Expand Down

0 comments on commit 37de8f6

Please sign in to comment.