From: Florian Westphal <fw@strlen.de>
To: mptcp@lists.linux.dev
Cc: mathew.j.martineau@linux.intel.com, matthieu.baerts@tessares.net,
Paolo Abeni <pabeni@redhat.com>, Florian Westphal <fw@strlen.de>
Subject: [PATCH mptcp] selftests: mptcp: make sendfile selftest work
Date: Thu, 28 Jul 2022 20:25:44 +0200 [thread overview]
Message-ID: <20220728182544.4128-1-fw@strlen.de> (raw)
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.
Fixes: 048d19d444be ("mptcp: add basic kselftest for mptcp")
Signed-off-by: Florian Westphal <fw@strlen.de>
---
tools/testing/selftests/net/mptcp/mptcp_connect.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c
index e2ea6c126c99..6e429b88f911 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
@@ -791,6 +791,9 @@ static int copyfd_io_sendfile(int infd, int peerfd, int outfd,
err = do_sendfile(infd, peerfd, size);
if (err)
return err;
+
+ shutdown(peerfd, SHUT_WR);
+
err = do_recvfile(peerfd, outfd);
*in_closed_after_out = true;
}
--
2.35.1
next reply other threads:[~2022-07-28 18:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-28 18:25 Florian Westphal [this message]
2022-07-28 20:49 ` selftests: mptcp: make sendfile selftest work: Tests Results MPTCP CI
2022-07-28 22:55 ` [PATCH mptcp] selftests: mptcp: make sendfile selftest work Mat Martineau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220728182544.4128-1-fw@strlen.de \
--to=fw@strlen.de \
--cc=mathew.j.martineau@linux.intel.com \
--cc=matthieu.baerts@tessares.net \
--cc=mptcp@lists.linux.dev \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox