OSDN Git Service

selftests: mptcp: display proper reason to abort tests
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Mon, 21 Jun 2021 22:54:38 +0000 (15:54 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Jun 2021 16:57:45 +0000 (09:57 -0700)
commita4debc4772f44737358ea4210f6fca1f19f5c783
treea6c0e15320a6182e81d18fdc92a2db37b5a418af
parent06285da96a1cdbad265a212f6729e19a515127a2
selftests: mptcp: display proper reason to abort tests

Without this modification, we were often displaying this error messages:

  FAIL: Could not even run loopback test

But $ret could have been set to a non 0 value in many different cases:

- net.mptcp.enabled=0 is not working as expected
- setsockopt(..., TCP_ULP, "mptcp", ...) is allowed
- ping between each netns are failing
- tests between ns1 as a receiver and ns>1 are failing
- other tests not involving ns1 as a receiver are failing

So not only for the loopback test.

Now a clearer message, including the time it took to run all tests, is
displayed.

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/mptcp/mptcp_connect.sh