Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: mptcp: stop tests earlier

These 'endpoint' tests from 'mptcp_join.sh' selftest start a transfer in
the background and check the status during this transfer.

Once the expected events have been recorded, there is no reason to wait
for the data transfer to finish. It can be stopped earlier to reduce the
execution time by more than half.

For these tests, the exchanged data were not verified. Errors, if any,
were ignored but that's fine, plenty of other tests are looking at that.
It is then OK to mute stderr now that we are sure errors will be printed
(and still ignored) because the transfer is stopped before the end.

Fixes: e274f7154008 ("selftests: mptcp: add subflow limits test-cases")
Cc: stable@vger.kernel.org
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Matthieu Baerts and committed by
David S. Miller
070d6daf a635a8c3

+10 -4
+10 -4
tools/testing/selftests/net/mptcp/mptcp_join.sh
··· 498 498 kill_wait $evts_ns2_pid 499 499 } 500 500 501 + kill_tests_wait() 502 + { 503 + kill -SIGUSR1 $(ip netns pids $ns2) $(ip netns pids $ns1) 504 + wait 505 + } 506 + 501 507 pm_nl_set_limits() 502 508 { 503 509 local ns=$1 ··· 3061 3055 pm_nl_set_limits $ns1 2 2 3062 3056 pm_nl_set_limits $ns2 2 2 3063 3057 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal 3064 - run_tests $ns1 $ns2 10.0.1.1 0 0 0 slow & 3058 + run_tests $ns1 $ns2 10.0.1.1 0 0 0 slow 2>/dev/null & 3065 3059 3066 3060 wait_mpj $ns1 3067 3061 pm_nl_check_endpoint 1 "creation" \ ··· 3074 3068 pm_nl_add_endpoint $ns2 10.0.2.2 flags signal 3075 3069 pm_nl_check_endpoint 0 "modif is allowed" \ 3076 3070 $ns2 10.0.2.2 id 1 flags signal 3077 - wait 3071 + kill_tests_wait 3078 3072 fi 3079 3073 3080 3074 if reset "delete and re-add"; then 3081 3075 pm_nl_set_limits $ns1 1 1 3082 3076 pm_nl_set_limits $ns2 1 1 3083 3077 pm_nl_add_endpoint $ns2 10.0.2.2 id 2 dev ns2eth2 flags subflow 3084 - run_tests $ns1 $ns2 10.0.1.1 4 0 0 speed_20 & 3078 + run_tests $ns1 $ns2 10.0.1.1 4 0 0 speed_20 2>/dev/null & 3085 3079 3086 3080 wait_mpj $ns2 3087 3081 pm_nl_del_endpoint $ns2 2 10.0.2.2 ··· 3091 3085 pm_nl_add_endpoint $ns2 10.0.2.2 dev ns2eth2 flags subflow 3092 3086 wait_mpj $ns2 3093 3087 chk_subflow_nr "" "after re-add" 2 3094 - wait 3088 + kill_tests_wait 3095 3089 fi 3096 3090 } 3097 3091