From: netdev-bot+sashiko@kernel.org
To: geliang@kernel.org
Cc: mptcp@lists.linux.dev, kuba@kernel.org
Subject: Re: [PATCH mptcp-next v9 7/7] selftests: mptcp: cover msg_zerocopy test
Date: Thu, 26 Nov 2026 20:44:05 +0000 [thread overview]
Message-ID: <179572584547.3133.6599684131621800072@kernel.org> (raw)
In-Reply-To: <3bd50e8f16d828fd027f3c0c8ce0df829401a362.1795591278.git.tanggeliang@kylinos.cn>
Thank you for your contribution! Sashiko AI review found 4 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 3
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] This patch adds msg_zerocopy.sh to the MPTCP selftest target
(tools/testing/selftests/net/mptcp/Makefile, TEST_PROGS, line 17), but…
- [Low] The same test and binary are now registered twice, and the MPTCP-
target copy cannot be limited to MPTCP cases.
- [Low] The symlinked msg_zerocopy.sh breaks the MPTCP suite's feature-
detection convention.
- [Low] The custom recipe added for $(OUTPUT)/msg_zerocopy in
tools/testing/selftests/net/mptcp/Makefile (lines 43-44) is `$(CC) $<…
--
selftests: mptcp: cover msg_zerocopy test
This commit adds the msg_zerocopy test to the MPTCP selftest suite
through a symlink to the existing net/msg_zerocopy.sh script. It also
adds the msg_zerocopy binary to TEST_GEN_FILES, with a custom rule that
builds it from ../msg_zerocopy.c, and updates .gitignore.
> diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile
> index 22ba0da2adb85..17d0d1051165c 100644
> --- a/tools/testing/selftests/net/mptcp/Makefile
> +++ b/tools/testing/selftests/net/mptcp/Makefile
> @@ -14,6 +14,7 @@ TEST_PROGS := \
> mptcp_connect_splice.sh \
> mptcp_join.sh \
> mptcp_sockopt.sh \
> + msg_zerocopy.sh \
[Severity: Medium]
The shared script runs under set -e. For every mode, including tcp and
mptcp, it creates a dummy device before it reaches do_test():
tools/testing/selftests/net/msg_zerocopy.sh:
set -e
...
ip link add "${DUMMY_DEV}" mtu "${DEV_MTU}" netns "${NS2}" type dummy
tools/testing/selftests/net/mptcp/config only has CONFIG_VETH=y, and
CONFIG_DUMMY has no default. Take a kernel built from defconfig plus the
mptcp fragment. There this ip link add fails and set -e aborts each of
the six child runs. The test then reports FAIL without exercising MPTCP
zerocopy.
The net/ target only works because tools/testing/selftests/net/config
has CONFIG_DUMMY=y.
Does net/mptcp/config need CONFIG_DUMMY=m as part of this change?
[Severity: Low]
Is this registration redundant with the existing one in
tools/testing/selftests/net/Makefile?
net/Makefile already lists msg_zerocopy.sh in TEST_PROGS and msg_zerocopy
in TEST_GEN_FILES, and net/config has CONFIG_MPTCP=y. Since the previous
patch in this series ("selftests: net: msg_zerocopy: add MPTCP support"),
the no-argument path already covers mptcp:
tools/testing/selftests/net/msg_zerocopy.sh:
if [[ "$#" -eq "0" ]]; then
ret=0
$0 4 tcp -t 1 || ret=1
$0 6 tcp -t 1 || ret=1
$0 4 udp -t 1 || ret=1
$0 6 udp -t 1 || ret=1
$0 4 mptcp -t 1 || ret=1
$0 6 mptcp -t 1 || ret=1
kselftest runs TEST_PROGS with no arguments, so the mptcp target runs the
full tcp/udp/mptcp matrix. That has two effects:
- A TCP or UDP zerocopy regression shows up as an MPTCP suite failure.
- With TARGETS="net net/mptcp", the script runs twice and the binary is
built twice.
Would it be better to keep the test in net/ only? Another option is a
small mptcp wrapper that calls the script with just "4 mptcp" and
"6 mptcp".
[ ... ]
> @@ -37,3 +39,6 @@ TEST_INCLUDES := ../lib.sh $(wildcard ../lib/sh/*.sh)
> EXTRA_CLEAN := *.pcap
>
> include ../../lib.mk
> +
> +$(OUTPUT)/msg_zerocopy: ../msg_zerocopy.c
> + $(CC) $< $(CFLAGS) $(CPPFLAGS) -o $@
[Severity: Low]
This recipe leaves out $(LDFLAGS), $(TARGET_ARCH) and $(LDLIBS). lib.mk
uses all three for the other binaries in this directory:
tools/testing/selftests/lib.mk:
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
...
$(OUTPUT)/%:%.c $(LOCAL_HDRS)
$(call msg,CC,,$@)
$(Q)$(LINK.c) $(filter-out $(LOCAL_HDRS),$^) $(LDLIBS) -o $@
With make TARGETS=net/mptcp LDFLAGS=-static, mptcp_connect and the other
binaries would be linked statically. Would msg_zerocopy still end up
dynamically linked?
Would $(LINK.c) $^ $(LDLIBS) -o $@, with $(Q) and the msg helper, be a
closer match to lib.mk?
> diff --git a/tools/testing/selftests/net/mptcp/msg_zerocopy.sh b/tools/testing/selftests/net/mptcp/msg_zerocopy.sh
> new file mode 120000
> index 0000000000000..b2f82b8fa5f2b
> --- /dev/null
> +++ b/tools/testing/selftests/net/mptcp/msg_zerocopy.sh
> @@ -0,0 +1 @@
> +../msg_zerocopy.sh
> \ No newline at end of file
[Severity: Low]
Every other script in the mptcp TEST_PROGS sources mptcp_lib.sh and calls
mptcp_lib_check_mptcp(). That helper skips the test when MPTCP is not
available:
tools/testing/selftests/net/mptcp/mptcp_lib.sh:
mptcp_lib_check_mptcp() {
if ! mptcp_lib_has_file "/proc/sys/net/mptcp/enabled"; then
mptcp_lib_pr_skip "MPTCP support is not available"
exit ${KSFT_SKIP}
fi
}
The symlinked script has no such check. On a kernel without
CONFIG_MPTCP, socket(..., IPPROTO_MPTCP) fails in do_setup_tx() and
do_setup_rx(), and msg_zerocopy calls error(1, errno, "socket t").
Some kernels have MPTCP but not the "mptcp: handle SO_ZEROCOPY in
setsockopt" change. On those, do_setsockopt(fd, SOL_SOCKET, SO_ZEROCOPY,
1) fails and also calls error(1, ...).
The rest of the MPTCP suite reports SKIP for missing features when run
against older or stable kernels. Should these cases report SKIP too,
instead of FAIL?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1795591278.git.tanggeliang%40kylinos.cn
next prev parent reply other threads:[~2026-11-26 20:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 7:22 [PATCH mptcp-next v9 0/7] mptcp: add MSG_ZEROCOPY support Geliang Tang
2026-11-25 7:22 ` [PATCH mptcp-next v9 1/7] mptcp: use local variable tp in sendmsg_frag Geliang Tang
2026-11-26 20:44 ` netdev-bot+sashiko
2026-11-25 7:23 ` [PATCH mptcp-next v9 2/7] mptcp: remove redundant orig_offset in carve_data_frag Geliang Tang
2026-11-26 20:44 ` netdev-bot+sashiko
2026-11-25 7:23 ` [PATCH mptcp-next v9 3/7] mptcp: add MSG_ZEROCOPY support Geliang Tang
2026-11-25 7:52 ` sashiko-bot
2026-11-26 20:44 ` netdev-bot+sashiko
2026-11-25 7:23 ` [PATCH mptcp-next v9 4/7] mptcp: handle SO_ZEROCOPY in setsockopt Geliang Tang
2026-11-25 7:44 ` sashiko-bot
2026-11-26 20:44 ` netdev-bot+sashiko
2026-11-25 7:23 ` [PATCH mptcp-next v9 5/7] Documentation: msg_zerocopy: add MPTCP support Geliang Tang
2026-11-26 20:44 ` netdev-bot+sashiko
2026-11-25 7:23 ` [PATCH mptcp-next v9 6/7] selftests: net: " Geliang Tang
2026-11-26 20:44 ` netdev-bot+sashiko
2026-11-25 7:23 ` [PATCH mptcp-next v9 7/7] selftests: mptcp: cover msg_zerocopy test Geliang Tang
2026-11-25 7:34 ` sashiko-bot
2026-11-26 20:44 ` netdev-bot+sashiko [this message]
2026-11-25 9:39 ` [PATCH mptcp-next v9 0/7] mptcp: add MSG_ZEROCOPY support MPTCP CI
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=179572584547.3133.6599684131621800072@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=geliang@kernel.org \
--cc=kuba@kernel.org \
--cc=mptcp@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.