Add a new variable size.
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
tools/testing/selftests/net/mptcp/mptcp_join.sh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index e312aac8375b..8c6c41ee1b5a 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -715,10 +715,12 @@ run_tests()
# The values above 2 are reused to make test files
# with the given sizes (KB)
if [ "$test_linkfail" -gt 2 ]; then
+ size=$test_linkfail
+
if [ -z "$cinfail" ]; then
cinfail=$(mktemp)
fi
- make_file "$cinfail" "client" $test_linkfail
+ make_file "$cinfail" "client" $size
# create the input file for the failure test when
# the first failure test run
elif [ "$test_linkfail" -ne 0 -a -z "$cinfail" ]; then
@@ -735,10 +737,12 @@ run_tests()
fi
if [ "$test_linkfail" -gt 2 ]; then
+ size=$test_linkfail
+
if [ -z "$sinfail" ]; then
sinfail=$(mktemp)
fi
- make_file "$sinfail" "server" $test_linkfail
+ make_file "$sinfail" "server" $size
elif [ "$test_linkfail" -eq 2 -a -z "$sinfail" ]; then
size=$((RANDOM%16))
size=$((size+1))
--
2.34.1