selftests: mptcp: use max_time instead of time
authorGeliang Tang <geliang.tang@suse.com>
Thu, 10 Nov 2022 23:23:21 +0000 (15:23 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 12 Nov 2022 05:19:47 +0000 (21:19 -0800)
'time' is the local variable of run_test() function, while 'max_time' is
the local variable of do_transfer() function. So in do_transfer(),
$max_time should be used, not $time.

Please note that here $time == $max_time so the behaviour is not changed
but the right variable is used.

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/simult_flows.sh

index ffa13a9..af70c14 100755 (executable)
@@ -173,7 +173,7 @@ do_transfer()
 
        timeout ${timeout_test} \
                ip netns exec ${ns3} \
-                       ./mptcp_connect -jt ${timeout_poll} -l -p $port -T $time \
+                       ./mptcp_connect -jt ${timeout_poll} -l -p $port -T $max_time \
                                0.0.0.0 < "$sin" > "$sout" &
        local spid=$!
 
@@ -181,7 +181,7 @@ do_transfer()
 
        timeout ${timeout_test} \
                ip netns exec ${ns1} \
-                       ./mptcp_connect -jt ${timeout_poll} -p $port -T $time \
+                       ./mptcp_connect -jt ${timeout_poll} -p $port -T $max_time \
                                10.0.3.3 < "$cin" > "$cout" &
        local cpid=$!