Commit 5f88117f authored by Matthieu Baerts's avatar Matthieu Baerts Committed by David S. Miller

selftests: mptcp: fail if not enough SYN/3rd ACK

If we receive less MPCapable SYN or 3rd ACK than expected, we now mark
the test as failed.

On the other hand, if we receive more, we keep the warning but we add a
hint that it is probably due to retransmissions and that's why we don't
mark the test as failed.

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/148Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 45759a87
...@@ -483,10 +483,6 @@ do_transfer() ...@@ -483,10 +483,6 @@ do_transfer()
check_transfer $cin $sout "file received by server" check_transfer $cin $sout "file received by server"
rets=$? rets=$?
if [ $retc -eq 0 ] && [ $rets -eq 0 ]; then
printf "[ OK ]"
fi
local stat_synrx_now_l=$(get_mib_counter "${listener_ns}" "MPTcpExtMPCapableSYNRX") local stat_synrx_now_l=$(get_mib_counter "${listener_ns}" "MPTcpExtMPCapableSYNRX")
local stat_ackrx_now_l=$(get_mib_counter "${listener_ns}" "MPTcpExtMPCapableACKRX") local stat_ackrx_now_l=$(get_mib_counter "${listener_ns}" "MPTcpExtMPCapableACKRX")
local stat_cookietx_now=$(get_mib_counter "${listener_ns}" "TcpExtSyncookiesSent") local stat_cookietx_now=$(get_mib_counter "${listener_ns}" "TcpExtSyncookiesSent")
...@@ -502,6 +498,22 @@ do_transfer() ...@@ -502,6 +498,22 @@ do_transfer()
expect_synrx=$((stat_synrx_last_l+1)) expect_synrx=$((stat_synrx_last_l+1))
expect_ackrx=$((stat_ackrx_last_l+1)) expect_ackrx=$((stat_ackrx_last_l+1))
fi fi
if [ ${stat_synrx_now_l} -lt ${expect_synrx} ]; then
printf "[ FAIL ] lower MPC SYN rx (%d) than expected (%d)\n" \
"${stat_synrx_now_l}" "${expect_synrx}" 1>&2
retc=1
fi
if [ ${stat_ackrx_now_l} -lt ${expect_ackrx} ]; then
printf "[ FAIL ] lower MPC ACK rx (%d) than expected (%d)\n" \
"${stat_ackrx_now_l}" "${expect_ackrx}" 1>&2
rets=1
fi
if [ $retc -eq 0 ] && [ $rets -eq 0 ]; then
printf "[ OK ]"
fi
if [ $cookies -eq 2 ];then if [ $cookies -eq 2 ];then
if [ $stat_cookietx_last -ge $stat_cookietx_now ] ;then if [ $stat_cookietx_last -ge $stat_cookietx_now ] ;then
printf " WARN: CookieSent: did not advance" printf " WARN: CookieSent: did not advance"
...@@ -518,12 +530,12 @@ do_transfer() ...@@ -518,12 +530,12 @@ do_transfer()
fi fi
fi fi
if [ $expect_synrx -ne $stat_synrx_now_l ] ;then if [ ${stat_synrx_now_l} -gt ${expect_synrx} ]; then
printf " WARN: SYNRX: expect %d, got %d" \ printf " WARN: SYNRX: expect %d, got %d (probably retransmissions)" \
"${expect_synrx}" "${stat_synrx_now_l}" "${expect_synrx}" "${stat_synrx_now_l}"
fi fi
if [ $expect_ackrx -ne $stat_ackrx_now_l ] ;then if [ ${stat_ackrx_now_l} -gt ${expect_ackrx} ]; then
printf " WARN: ACKRX: expect %d, got %d" \ printf " WARN: ACKRX: expect %d, got %d (probably retransmissions)" \
"${expect_ackrx}" "${stat_ackrx_now_l}" "${expect_ackrx}" "${stat_ackrx_now_l}"
fi fi
......
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