Commit 01ed9838 authored by Geliang Tang's avatar Geliang Tang Committed by Jakub Kicinski

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: default avatarGeliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://lore.kernel.org/r/20240308-upstream-net-next-20240308-selftests-mptcp-unification-v1-2-4f42c347b653@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 6215df11
...@@ -33,6 +33,7 @@ do_tcp=0 ...@@ -33,6 +33,7 @@ do_tcp=0
checksum=false checksum=false
filesize=0 filesize=0
connect_per_transfer=1 connect_per_transfer=1
port=$((10000 - 1))
if [ $tc_loss -eq 100 ];then if [ $tc_loss -eq 100 ];then
tc_loss=1% tc_loss=1%
...@@ -313,8 +314,7 @@ do_transfer() ...@@ -313,8 +314,7 @@ do_transfer()
local local_addr="$6" local local_addr="$6"
local extra_args="$7" local extra_args="$7"
local port port=$((port + 1))
port=$((10000+TEST_COUNT))
TEST_COUNT=$((TEST_COUNT+1)) TEST_COUNT=$((TEST_COUNT+1))
if [ "$rcvbuf" -gt 0 ]; then if [ "$rcvbuf" -gt 0 ]; then
...@@ -710,7 +710,7 @@ EOF ...@@ -710,7 +710,7 @@ EOF
echo "INFO: test $msg" echo "INFO: test $msg"
TEST_COUNT=10000 port=$((20000 - 1))
local extra_args="-o TRANSPARENT" local extra_args="-o TRANSPARENT"
do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP \ do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP \
${connect_addr} ${local_addr} "${extra_args}" ${connect_addr} ${local_addr} "${extra_args}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment