[PATCH mptcp-next] Squash to "selftests: mptcp: reuse linkfail to make given size files v8"

Geliang Tang posted 1 patch 2 years, 2 months ago
Failed in applying to current master (apply log)
tools/testing/selftests/net/mptcp/mptcp_join.sh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
[PATCH mptcp-next] Squash to "selftests: mptcp: reuse linkfail to make given size files v8"
Posted by Geliang Tang 2 years, 2 months ago
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