mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-16 20:20:41 +01:00
Support tools (like tcpflood) are also upgraded to support the necessary dynamic port.s This is part of the effort to make parallel testing possible. We move parts of the cleanup to the buildbot cleanup, as we cannot clean out instances on each test when we run parallel tests.
29 lines
918 B
Bash
Executable File
29 lines
918 B
Bash
Executable File
#!/bin/bash
|
|
# Test for multiple ports in imtcp
|
|
# This test checks if multiple tcp listener ports are correctly
|
|
# handled by imtcp
|
|
# added 2009-05-22 by Rgerhards
|
|
# This file is part of the rsyslog project, released under ASL 2.0
|
|
. $srcdir/diag.sh init
|
|
export TCPFLOOD_PORT2="$(get_free_port)"
|
|
export TCPFLOOD_PORT3="$(get_free_port)"
|
|
generate_conf
|
|
add_conf '
|
|
$ModLoad ../plugins/imtcp/.libs/imtcp
|
|
$MainMsgQueueTimeoutShutdown 10000
|
|
$InputTCPServerRun '$TCPFLOOD_PORT'
|
|
$InputTCPServerRun '$TCPFLOOD_PORT2'
|
|
$InputTCPServerRun '$TCPFLOOD_PORT3'
|
|
|
|
$template outfmt,"%msg:F,58:2%\n"
|
|
:msg, contains, "msgnum:" action(type="omfile" file="'$RSYSLOG_OUT_LOG'" template="outfmt")
|
|
'
|
|
startup
|
|
tcpflood -p'$TCPFLOOD_PORT' -m10000
|
|
tcpflood -p'$TCPFLOOD_PORT2' -i10000 -m10000
|
|
tcpflood -p'$TCPFLOOD_PORT3' -i20000 -m10000
|
|
shutdown_when_empty # shut down rsyslogd when done processing messages
|
|
wait_shutdown
|
|
seq_check 0 29999
|
|
exit_test
|