selftests: mptcp: drop test_linkfail parameter
authorGeliang Tang <geliang.tang@suse.com>
Fri, 23 Jun 2023 17:34:10 +0000 (10:34 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 24 Jun 2023 22:37:57 +0000 (15:37 -0700)
commit0c93af1f8907902692014fd7072d54e275034800
treea489f42482ca65d108a989846c5c9c294c9765ff
parentbe7e9786c9155c2942cd53b813e4723be67e07c4
selftests: mptcp: drop test_linkfail parameter

run_tests() accepts too many optional parameters. Before this modification,
it was required to set all of then when only the last one had to be
changed. That's not clear to see all these 0 and it makes the maintenance
harder:

      run_tests $ns1 $ns2 10.0.1.1 1 2 3 slow

Instead, the parameter can be set as an env var with a limited scope:

      foo=1 bar=2 next=3 \
            run_tests $ns1 $ns2 10.0.1.1 slow

This patch switches to key/value "test_linkfail=*" instead of positional
parameter test_linkfail of do_transfer() and run_tests().

Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <martineau@kernel.org>
Link: https://lore.kernel.org/r/20230623-send-net-next-20230623-v1-4-a883213c8ba9@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/mptcp_join.sh