Skip to content

Commit

Permalink
Squash-to: "selftests: mptcp: add testcase for active-back"
Browse files Browse the repository at this point in the history
we need to use big-enough client file on link failure test.

We compute the expected link usage assuming half of the client
data will be sent after the link failure. The link failure
happens after sending once the client file, and than the client
file is sent again. After the link failure, a whole cwin amount
of data can be re-inected: to be able to predict correctly
the link utilization the client file size must be much greater
then max cwin.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
  • Loading branch information
Paolo Abeni authored and matttbe committed Aug 12, 2021
1 parent cf807c3 commit 3b6b8c9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/testing/selftests/net/mptcp/mptcp_join.sh
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,13 @@ run_tests()
# create the input file for the failure test when
# the first failure test run
if [ "$test_linkfail" -ne 0 -a -z "$cinfail" ]; then
size=$((RANDOM%8))
# the client file must be considerably larger
# of the maximum expected cwin value, or the
# link utilization will be not predicable
size=$((RANDOM%2))
size=$((size+1))
size=$((size*2048))
size=$((size*8192))
size=$((size + ( $RANDOM % 8192) ))

cinfail=$(mktemp)
make_file "$cinfail" "client" $size
Expand Down

0 comments on commit 3b6b8c9

Please sign in to comment.