]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: mptcp: make sendfile selftest work
authorFlorian Westphal <fw@strlen.de>
Fri, 5 Aug 2022 00:21:27 +0000 (17:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Aug 2022 07:51:29 +0000 (08:51 +0100)
commitdfc4f810b3a88a26e73245d5dcd436b978ab2488
tree8fed0d7803971d048803f7aa504e33e86796c895
parent4c496183f4d3257ebebfa18190c3407098a09b91
selftests: mptcp: make sendfile selftest work

When the selftest got added, sendfile() on mptcp sockets returned
-EOPNOTSUPP, so running 'mptcp_connect.sh -m sendfile' failed
immediately.

This is no longer the case, but the script fails anyway due to timeout.
Let the receiver know once the sender has sent all data, just like
with '-m mmap' mode.

v2: need to respect cfg_wait too, as pm_userspace.sh relied
on -m sendfile to keep the connection open (Mat Martineau)

Fixes: 1a811ff8e5b5 ("mptcp: add basic kselftest for mptcp")
Reported-by: Xiumei Mu <xmu@redhat.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
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.c