From: Mat Martineau <hidden> Date: 2021-02-12 23:22:38
This is a collection of selftest updates from the MPTCP tree.
Patch 1 uses additional 'ss' command line parameters and 'nstat' to
improve output when certain MPTCP tests fail.
Patches 2 & 3 fix a copy/paste error and some output formatting.
Patch 4 makes sure tests still pass if certain connection-related
packets are retransmitted.
Matthieu Baerts (3):
selftests: mptcp: fix ACKRX debug message
selftests: mptcp: display warnings on one line
selftests: mptcp: fail if not enough SYN/3rd ACK
Paolo Abeni (1):
selftests: mptcp: dump more info on errors
.../selftests/net/mptcp/mptcp_connect.sh | 94 +++++++++++++------
1 file changed, 66 insertions(+), 28 deletions(-)
base-commit: c3ff3b02e99c691197a05556ef45f5c3dd2ed3d6
--
2.30.1
From: Mat Martineau <hidden> Date: 2021-02-12 23:22:38
From: Paolo Abeni <pabeni@redhat.com>
Even if that may sound completely unlikely, the mptcp implementation
is not perfect, yet.
When the self-tests report an error we usually need more information
of what the scripts currently report. iproute allow provides
some additional goodies since a few releases, let's dump them.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <redacted>
---
.../testing/selftests/net/mptcp/mptcp_connect.sh | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
From: Mat Martineau <hidden> Date: 2021-02-12 23:23:49
From: Matthieu Baerts <redacted>
Info from received MPCapable SYN were printed instead of the ones from
received MPCapable 3rd ACK.
Fixes: fed61c4b584c ("selftests: mptcp: make 2nd net namespace use tcp syn cookies unconditionally")
Signed-off-by: Matthieu Baerts <redacted>
Signed-off-by: Mat Martineau <redacted>
---
tools/testing/selftests/net/mptcp/mptcp_connect.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Mat Martineau <hidden> Date: 2021-02-12 23:24:27
From: Matthieu Baerts <redacted>
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/148
Signed-off-by: Matthieu Baerts <redacted>
Signed-off-by: Mat Martineau <redacted>
---
.../selftests/net/mptcp/mptcp_connect.sh | 28 +++++++++++++------
1 file changed, 20 insertions(+), 8 deletions(-)
@@ -483,10 +483,6 @@ do_transfer()check_transfer$cin$sout"file received by server"rets=$?-if[$retc-eq0]&&[$rets-eq0];then-printf"[ OK ]"-fi-localstat_synrx_now_l=$(get_mib_counter"${listener_ns}""MPTcpExtMPCapableSYNRX")localstat_ackrx_now_l=$(get_mib_counter"${listener_ns}""MPTcpExtMPCapableACKRX")localstat_cookietx_now=$(get_mib_counter"${listener_ns}""TcpExtSyncookiesSent")
@@ -502,6 +498,22 @@ do_transfer()expect_synrx=$((stat_synrx_last_l+1))expect_ackrx=$((stat_ackrx_last_l+1))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-eq0]&&[$rets-eq0];then+printf"[ OK ]"+fi+if[$cookies-eq2];thenif[$stat_cookietx_last-ge$stat_cookietx_now];thenprintf" WARN: CookieSent: did not advance"
@@ -448,15 +463,17 @@ do_transfer()localdurationduration=$((stop-start))-duration=$(printf"(duration %05sms)"$duration)+printf"(duration %05sms) ""${duration}"if[${rets}-ne0]||[${retc}-ne0];then-echo"$duration [ FAIL ] client exit code $retc, server $rets"1>&2+echo"[ FAIL ] client exit code $retc, server $rets"1>&2echo-e"\nnetns ${listener_ns} socket stat for ${port}:"1>&2ipnetnsexec${listener_ns}ss-Menita1>&2-o"sport = :$port"cat/tmp/${listener_ns}.outecho-e"\nnetns ${connector_ns} socket stat for ${port}:"1>&2ipnetnsexec${connector_ns}ss-Menita1>&2-o"dport = :$port"[${listener_ns}!=${connector_ns}]&&cat/tmp/${connector_ns}.out++echocat"$capout"return1fi
@@ -466,11 +483,14 @@ do_transfer()check_transfer$cin$sout"file received by server"rets=$?-localstat_synrx_now_l=$(ipnetnsexec${listener_ns}nstat-z-aMPTcpExtMPCapableSYNRX|whilereadacountcrest;doecho$count;done)-localstat_ackrx_now_l=$(ipnetnsexec${listener_ns}nstat-z-aMPTcpExtMPCapableACKRX|whilereadacountcrest;doecho$count;done)+if[$retc-eq0]&&[$rets-eq0];then+printf"[ OK ]"+fi-localstat_cookietx_now=$(ipnetnsexec${listener_ns}nstat-z-aTcpExtSyncookiesSent|whilereadacountcrest;doecho$count;done)-localstat_cookierx_now=$(ipnetnsexec${listener_ns}nstat-z-aTcpExtSyncookiesRecv|whilereadacountcrest;doecho$count;done)+localstat_synrx_now_l=$(get_mib_counter"${listener_ns}""MPTcpExtMPCapableSYNRX")+localstat_ackrx_now_l=$(get_mib_counter"${listener_ns}""MPTcpExtMPCapableACKRX")+localstat_cookietx_now=$(get_mib_counter"${listener_ns}""TcpExtSyncookiesSent")+localstat_cookierx_now=$(get_mib_counter"${listener_ns}""TcpExtSyncookiesRecv")expect_synrx=$((stat_synrx_last_l))expect_ackrx=$((stat_ackrx_last_l))
@@ -484,35 +504,32 @@ do_transfer()fiif[$cookies-eq2];thenif[$stat_cookietx_last-ge$stat_cookietx_now];then-echo"${listener_ns} CookieSent: ${cl_proto} -> ${srv_proto}: did not advance"+printf" WARN: CookieSent: did not advance"fiif[$stat_cookierx_last-ge$stat_cookierx_now];then-echo"${listener_ns} CookieRecv: ${cl_proto} -> ${srv_proto}: did not advance"+printf" WARN: CookieRecv: did not advance"fielseif[$stat_cookietx_last-ne$stat_cookietx_now];then-echo"${listener_ns} CookieSent: ${cl_proto} -> ${srv_proto}: changed"+printf" WARN: CookieSent: changed"fiif[$stat_cookierx_last-ne$stat_cookierx_now];then-echo"${listener_ns} CookieRecv: ${cl_proto} -> ${srv_proto}: changed"+printf" WARN: CookieRecv: changed"fifiif[$expect_synrx-ne$stat_synrx_now_l];then-echo"${listener_ns} SYNRX: ${cl_proto} -> ${srv_proto}: expect ${expect_synrx}, got ${stat_synrx_now_l}"+printf" WARN: SYNRX: expect %d, got %d"\+"${expect_synrx}""${stat_synrx_now_l}"fiif[$expect_ackrx-ne$stat_ackrx_now_l];then-echo"${listener_ns} ACKRX: ${cl_proto} -> ${srv_proto}: expect ${expect_ackrx}, got ${stat_ackrx_now_l} "-fi--if[$retc-eq0]&&[$rets-eq0];then-echo"$duration [ OK ]"-cat"$capout"-return0+printf" WARN: ACKRX: expect %d, got %d"\+"${expect_ackrx}""${stat_ackrx_now_l}"fi+echocat"$capout"-return1+[$retc-eq0]&&[$rets-eq0]} make_file()
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
On Fri, 12 Feb 2021 15:20:26 -0800 you wrote:
This is a collection of selftest updates from the MPTCP tree.
Patch 1 uses additional 'ss' command line parameters and 'nstat' to
improve output when certain MPTCP tests fail.
Patches 2 & 3 fix a copy/paste error and some output formatting.
[...]