Skip to content

Commit 3de88b9

Browse files
matttbekuba-moo
authored andcommitted
selftests: mptcp: fix mibit vs mbit mix up
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: multipath-tcp/mptcp_net-next#310 Fixes: 1a418cb ("mptcp: simult flow self-tests") Suggested-by: Paolo Abeni <[email protected]> Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 7e68d31 commit 3de88b9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/testing/selftests/net/mptcp/simult_flows.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,10 @@ run_test()
247247
tc -n $ns2 qdisc add dev ns2eth1 root netem rate ${rate1}mbit $delay1
248248
tc -n $ns2 qdisc add dev ns2eth2 root netem rate ${rate2}mbit $delay2
249249

250-
# time is measured in ms, account for transfer size, affegated link speed
250+
# time is measured in ms, account for transfer size, aggregated link speed
251251
# and header overhead (10%)
252-
local time=$((size * 8 * 1000 * 10 / (( $rate1 + $rate2) * 1024 *1024 * 9) ))
252+
# ms byte -> bit 10% mbit -> kbit -> bit 10%
253+
local time=$((1000 * size * 8 * 10 / ((rate1 + rate2) * 1000 * 1000 * 9) ))
253254

254255
# mptcp_connect will do some sleeps to allow the mp_join handshake
255256
# completion (see mptcp_connect): 200ms on each side, add some slack

0 commit comments

Comments
 (0)