* [PATCH net 0/3] mptcp: selftests: Fix timeouts and test isolation
@ 2022-11-15 22:10 Mat Martineau
2022-11-15 22:10 ` [PATCH net 1/3] selftests: mptcp: gives slow test-case more time Mat Martineau
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Mat Martineau @ 2022-11-15 22:10 UTC (permalink / raw)
To: netdev
Cc: Mat Martineau, davem, kuba, pabeni, edumazet, fw, geliang.tang,
matthieu.baerts, mptcp
Patches 1 and 3 adjust test timeouts to reduce false negatives on slow
machines.
Patch 2 improves test isolation by running the mptcp_sockopt test in its
own net namespace.
Matthieu Baerts (2):
selftests: mptcp: run mptcp_sockopt from a new netns
selftests: mptcp: fix mibit vs mbit mix up
Paolo Abeni (1):
selftests: mptcp: gives slow test-case more time
tools/testing/selftests/net/mptcp/mptcp_join.sh | 6 +++---
tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 9 +++++----
tools/testing/selftests/net/mptcp/simult_flows.sh | 5 +++--
3 files changed, 11 insertions(+), 9 deletions(-)
base-commit: 9d45921ee4cb364910097e7d1b7558559c2f9fd2
--
2.38.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net 1/3] selftests: mptcp: gives slow test-case more time
2022-11-15 22:10 [PATCH net 0/3] mptcp: selftests: Fix timeouts and test isolation Mat Martineau
@ 2022-11-15 22:10 ` Mat Martineau
2022-11-15 22:10 ` [PATCH net 2/3] selftests: mptcp: run mptcp_sockopt from a new netns Mat Martineau
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Mat Martineau @ 2022-11-15 22:10 UTC (permalink / raw)
To: netdev
Cc: Paolo Abeni, davem, kuba, edumazet, fw, geliang.tang,
matthieu.baerts, mptcp, Mat Martineau
From: Paolo Abeni <pabeni@redhat.com>
On slow or busy VM, some test-cases still fail because the
data transfer completes before the endpoint manipulation
actually took effect.
Address the issue by artificially increasing the runtime for
the relevant test-cases.
Fixes: ef360019db40 ("selftests: mptcp: signal addresses testcases")
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/309
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
---
tools/testing/selftests/net/mptcp/mptcp_join.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index f3dd5f2a0272..2eeaf4aca644 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -2152,7 +2152,7 @@ remove_tests()
pm_nl_set_limits $ns2 1 3
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow
pm_nl_add_endpoint $ns2 10.0.4.2 flags subflow
- run_tests $ns1 $ns2 10.0.1.1 0 -1 -2 slow
+ run_tests $ns1 $ns2 10.0.1.1 0 -1 -2 speed_10
chk_join_nr 3 3 3
chk_add_nr 1 1
chk_rm_nr 2 2
@@ -2165,7 +2165,7 @@ remove_tests()
pm_nl_add_endpoint $ns1 10.0.3.1 flags signal
pm_nl_add_endpoint $ns1 10.0.4.1 flags signal
pm_nl_set_limits $ns2 3 3
- run_tests $ns1 $ns2 10.0.1.1 0 -3 0 slow
+ run_tests $ns1 $ns2 10.0.1.1 0 -3 0 speed_10
chk_join_nr 3 3 3
chk_add_nr 3 3
chk_rm_nr 3 3 invert
@@ -2178,7 +2178,7 @@ remove_tests()
pm_nl_add_endpoint $ns1 10.0.3.1 flags signal
pm_nl_add_endpoint $ns1 10.0.14.1 flags signal
pm_nl_set_limits $ns2 3 3
- run_tests $ns1 $ns2 10.0.1.1 0 -3 0 slow
+ run_tests $ns1 $ns2 10.0.1.1 0 -3 0 speed_10
chk_join_nr 1 1 1
chk_add_nr 3 3
chk_rm_nr 3 1 invert
--
2.38.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net 2/3] selftests: mptcp: run mptcp_sockopt from a new netns
2022-11-15 22:10 [PATCH net 0/3] mptcp: selftests: Fix timeouts and test isolation Mat Martineau
2022-11-15 22:10 ` [PATCH net 1/3] selftests: mptcp: gives slow test-case more time Mat Martineau
@ 2022-11-15 22:10 ` Mat Martineau
2022-11-15 22:10 ` [PATCH net 3/3] selftests: mptcp: fix mibit vs mbit mix up Mat Martineau
2022-11-18 5:50 ` [PATCH net 0/3] mptcp: selftests: Fix timeouts and test isolation patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Mat Martineau @ 2022-11-15 22:10 UTC (permalink / raw)
To: netdev
Cc: Matthieu Baerts, davem, kuba, pabeni, edumazet, fw, geliang.tang,
mptcp, Mat Martineau
From: Matthieu Baerts <matthieu.baerts@tessares.net>
Not running it from a new netns causes issues if some MPTCP settings are
modified, e.g. if MPTCP is disabled from the sysctl knob, if multiple
addresses are available and added to the MPTCP path-manager, etc.
In these cases, the created connection will not behave as expected, e.g.
unable to create an MPTCP socket, more than one subflow is seen, etc.
A new "sandbox" net namespace is now created and used to run
mptcp_sockopt from this controlled environment.
Fixes: ce9979129a0b ("selftests: mptcp: add mptcp getsockopt test cases")
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
---
tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
index 0879da915014..80d36f7cfee8 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
@@ -35,8 +35,9 @@ init()
ns1="ns1-$rndh"
ns2="ns2-$rndh"
+ ns_sbox="ns_sbox-$rndh"
- for netns in "$ns1" "$ns2";do
+ for netns in "$ns1" "$ns2" "$ns_sbox";do
ip netns add $netns || exit $ksft_skip
ip -net $netns link set lo up
ip netns exec $netns sysctl -q net.mptcp.enabled=1
@@ -73,7 +74,7 @@ init()
cleanup()
{
- for netns in "$ns1" "$ns2"; do
+ for netns in "$ns1" "$ns2" "$ns_sbox"; do
ip netns del $netns
done
rm -f "$cin" "$cout"
@@ -243,7 +244,7 @@ do_mptcp_sockopt_tests()
{
local lret=0
- ./mptcp_sockopt
+ ip netns exec "$ns_sbox" ./mptcp_sockopt
lret=$?
if [ $lret -ne 0 ]; then
@@ -252,7 +253,7 @@ do_mptcp_sockopt_tests()
return
fi
- ./mptcp_sockopt -6
+ ip netns exec "$ns_sbox" ./mptcp_sockopt -6
lret=$?
if [ $lret -ne 0 ]; then
--
2.38.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net 3/3] selftests: mptcp: fix mibit vs mbit mix up
2022-11-15 22:10 [PATCH net 0/3] mptcp: selftests: Fix timeouts and test isolation Mat Martineau
2022-11-15 22:10 ` [PATCH net 1/3] selftests: mptcp: gives slow test-case more time Mat Martineau
2022-11-15 22:10 ` [PATCH net 2/3] selftests: mptcp: run mptcp_sockopt from a new netns Mat Martineau
@ 2022-11-15 22:10 ` Mat Martineau
2022-11-18 5:50 ` [PATCH net 0/3] mptcp: selftests: Fix timeouts and test isolation patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Mat Martineau @ 2022-11-15 22:10 UTC (permalink / raw)
To: netdev
Cc: Matthieu Baerts, davem, kuba, pabeni, edumazet, fw, geliang.tang,
mptcp, Mat Martineau
From: Matthieu Baerts <matthieu.baerts@tessares.net>
The estimated time was supposing the rate was expressed in mibit
(bit * 1024^2) but it is in mbit (bit * 1000^2).
This makes the threshold higher but in a more realistic way to avoid
false positives reported by CI instances.
Before this patch, the thresholds were at 7561/4005ms and now they are
at 7906/4178ms.
While at it, also fix a typo in the linked comment, spotted by Mat.
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/310
Fixes: 1a418cb8e888 ("mptcp: simult flow self-tests")
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
---
tools/testing/selftests/net/mptcp/simult_flows.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh
index ffa13a957a36..40aeb5a71a2a 100755
--- a/tools/testing/selftests/net/mptcp/simult_flows.sh
+++ b/tools/testing/selftests/net/mptcp/simult_flows.sh
@@ -247,9 +247,10 @@ run_test()
tc -n $ns2 qdisc add dev ns2eth1 root netem rate ${rate1}mbit $delay1
tc -n $ns2 qdisc add dev ns2eth2 root netem rate ${rate2}mbit $delay2
- # time is measured in ms, account for transfer size, affegated link speed
+ # time is measured in ms, account for transfer size, aggregated link speed
# and header overhead (10%)
- local time=$((size * 8 * 1000 * 10 / (( $rate1 + $rate2) * 1024 *1024 * 9) ))
+ # ms byte -> bit 10% mbit -> kbit -> bit 10%
+ local time=$((1000 * size * 8 * 10 / ((rate1 + rate2) * 1000 * 1000 * 9) ))
# mptcp_connect will do some sleeps to allow the mp_join handshake
# completion (see mptcp_connect): 200ms on each side, add some slack
--
2.38.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net 0/3] mptcp: selftests: Fix timeouts and test isolation
2022-11-15 22:10 [PATCH net 0/3] mptcp: selftests: Fix timeouts and test isolation Mat Martineau
` (2 preceding siblings ...)
2022-11-15 22:10 ` [PATCH net 3/3] selftests: mptcp: fix mibit vs mbit mix up Mat Martineau
@ 2022-11-18 5:50 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-18 5:50 UTC (permalink / raw)
To: Mat Martineau
Cc: netdev, davem, kuba, pabeni, edumazet, fw, geliang.tang,
matthieu.baerts, mptcp
Hello:
This series was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 15 Nov 2022 14:10:43 -0800 you wrote:
> Patches 1 and 3 adjust test timeouts to reduce false negatives on slow
> machines.
>
> Patch 2 improves test isolation by running the mptcp_sockopt test in its
> own net namespace.
>
> Matthieu Baerts (2):
> selftests: mptcp: run mptcp_sockopt from a new netns
> selftests: mptcp: fix mibit vs mbit mix up
>
> [...]
Here is the summary with links:
- [net,1/3] selftests: mptcp: gives slow test-case more time
https://git.kernel.org/netdev/net/c/22b29557aef3
- [net,2/3] selftests: mptcp: run mptcp_sockopt from a new netns
https://git.kernel.org/netdev/net/c/7e68d31020f1
- [net,3/3] selftests: mptcp: fix mibit vs mbit mix up
https://git.kernel.org/netdev/net/c/3de88b95c4d4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-11-18 5:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-15 22:10 [PATCH net 0/3] mptcp: selftests: Fix timeouts and test isolation Mat Martineau
2022-11-15 22:10 ` [PATCH net 1/3] selftests: mptcp: gives slow test-case more time Mat Martineau
2022-11-15 22:10 ` [PATCH net 2/3] selftests: mptcp: run mptcp_sockopt from a new netns Mat Martineau
2022-11-15 22:10 ` [PATCH net 3/3] selftests: mptcp: fix mibit vs mbit mix up Mat Martineau
2022-11-18 5:50 ` [PATCH net 0/3] mptcp: selftests: Fix timeouts and test isolation patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.