selftests: mptcp: connect: add dedicated port counter

This patch adds a new dedicated counter 'port' instead of TEST_COUNT
to increase port numbers in mptcp_connect.sh.

This can avoid outputting discontinuous test counters.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://lore.kernel.org/r/20240308-upstream-net-next-20240308-selftests-mptcp-unification-v1-2-4f42c347b653@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Geliang Tang 2024-03-08 23:10:09 +01:00 committed by Jakub Kicinski
parent 6215df11b9
commit 01ed983810

View File

@ -33,6 +33,7 @@ do_tcp=0
checksum=false
filesize=0
connect_per_transfer=1
port=$((10000 - 1))
if [ $tc_loss -eq 100 ];then
tc_loss=1%
@ -313,8 +314,7 @@ do_transfer()
local local_addr="$6"
local extra_args="$7"
local port
port=$((10000+TEST_COUNT))
port=$((port + 1))
TEST_COUNT=$((TEST_COUNT+1))
if [ "$rcvbuf" -gt 0 ]; then
@ -710,7 +710,7 @@ EOF
echo "INFO: test $msg"
TEST_COUNT=10000
port=$((20000 - 1))
local extra_args="-o TRANSPARENT"
do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP \
${connect_addr} ${local_addr} "${extra_args}"