]> 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)
commit4139b630c9b6159d1d64ffd02b3e7c41d9c3b86a
tree8fed0d7803971d048803f7aa504e33e86796c895
parentc42a08ee9bf97ac83c4aa0db6b68d23ef2150fe4
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: 40e38737120b ("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