MPTCP Linux Development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Geliang Tang" <geliang@kernel.org>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v10 7/7] selftests: mptcp: cover msg_zerocopy test
Date: Fri, 27 Nov 2026 04:50:25 +0000	[thread overview]
Message-ID: <sashiko-outbox-236620@kernel.org> (raw)
In-Reply-To: <00df42f4717147821e9d1d9481389aa3f7c9a842.1795753727.git.tanggeliang@kylinos.cn>

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] selftests: mptcp: missing ../msg_zerocopy.sh in Makefile
  TEST_INCLUDES
- [Medium] selftests: mptcp: msg_zerocopy.sh returns KSFT_PASS when
  MPTCP is skipped
- [Low] selftests: mptcp: commit message claims symlink and omits
  CONFIG_DUMMY=y
--

commit 3cb1f313dd3fac2f574cee09c7b454ff59f42063
Author: Geliang Tang <geliang@kernel.org>

selftests: mptcp: cover msg_zerocopy test

This commit adds a wrapper script and build rules to run the net
msg_zerocopy selftest as part of the MPTCP selftest suite.

> Add the msg_zerocopy test to the MPTCP selftest suite by creating a
> symlink to the existing msg_zerocopy.sh script in the net selftests
> directory.
> 
> Update the Makefile to add msg_zerocopy.sh to TEST_PROGS, add
> msg_zerocopy binary to TEST_GEN_FILES, and add build rule to compile
> msg_zerocopy from ../msg_zerocopy.c. Also add msg_zerocopy binary
> to .gitignore.

[Severity: Low]
This isn't a bug, but the commit message says msg_zerocopy.sh is created
as a symlink whereas the patch adds a wrapper script, and it does not
mention adding CONFIG_DUMMY=y to tools/testing/selftests/net/mptcp/config.

> diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile
> index 22ba0da2adb85..ec243e400f4b4 100644
> --- a/tools/testing/selftests/net/mptcp/Makefile
> +++ b/tools/testing/selftests/net/mptcp/Makefile
[ ... ]
> @@ -37,3 +39,6 @@ TEST_INCLUDES := ../lib.sh $(wildcard ../lib/sh/*.sh)
>  EXTRA_CLEAN := *.pcap
>  
>  include ../../lib.mk
> +
> +$(OUTPUT)/msg_zerocopy: ../msg_zerocopy.c
> +	$(LINK.c) $^ $(LDLIBS) -o $@

[Severity: Medium]
Should TEST_INCLUDES also list ../msg_zerocopy.sh?

When running or installing the net/mptcp target out-of-tree or standalone
(for example with TARGETS=net/mptcp), lib.mk only copies parent-directory
files listed in TEST_INCLUDES, so msg_zerocopy.sh will fail to exec
../msg_zerocopy.sh with "No such file or directory".

> diff --git a/tools/testing/selftests/net/mptcp/msg_zerocopy.sh b/tools/testing/selftests/net/mptcp/msg_zerocopy.sh
> new file mode 100755
> index 0000000000000..118fff27dc5cd
> --- /dev/null
> +++ b/tools/testing/selftests/net/mptcp/msg_zerocopy.sh
> @@ -0,0 +1,8 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +
> +. "$(dirname "${0}")/mptcp_lib.sh"
> +
> +mptcp_lib_check_mptcp
> +
> +exec "$(dirname "${0}")/../msg_zerocopy.sh" "$@"

[Severity: Medium]
Does this exit with 0 (KSFT_PASS) instead of KSFT_SKIP when MPTCP
zerocopy is not supported or when net.mptcp.enabled=0 in the initial
network namespace?

mptcp_lib_check_mptcp only checks that /proc/sys/net/mptcp/enabled exists,
while ../msg_zerocopy.sh runs TCP and UDP tests first and then checks
MPTCP socket and SO_ZEROCOPY support in the initial namespace:

tools/testing/selftests/net/msg_zerocopy.sh:
	if ${BIN} -4 -t 1 check && ${BIN} -4 -t 1 check -z; then
		$0 4 mptcp -t 1 || ret=1
		$0 6 mptcp -t 1 || ret=1
	else
		echo "SKIP: MPTCP tests (not supported)"
	fi

	[[ "$ret" == "0" ]] && echo "OK. All tests passed"
	exit $ret

If that check fails, ../msg_zerocopy.sh skips the MPTCP subtests and exits
with $ret (0 if TCP and UDP passed), reporting a pass for the MPTCP test
without running any MPTCP test cases or honoring
SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES=1.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1795753727.git.tanggeliang@kylinos.cn?part=7

  reply	other threads:[~2026-11-27  4:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  4:36 [PATCH mptcp-next v10 0/7] mptcp: add MSG_ZEROCOPY support Geliang Tang
2026-11-27  4:36 ` [PATCH mptcp-next v10 1/7] mptcp: use local variable tp in sendmsg_frag Geliang Tang
2026-11-27  4:36 ` [PATCH mptcp-next v10 2/7] mptcp: remove redundant orig_offset in carve_data_frag Geliang Tang
2026-11-27  4:36 ` [PATCH mptcp-next v10 3/7] mptcp: add MSG_ZEROCOPY support Geliang Tang
2026-11-27  5:04   ` sashiko-bot
2026-11-27  4:36 ` [PATCH mptcp-next v10 4/7] mptcp: handle SO_ZEROCOPY in setsockopt Geliang Tang
2026-11-27  4:36 ` [PATCH mptcp-next v10 5/7] Documentation: msg_zerocopy: add MPTCP support Geliang Tang
2026-11-27  4:36 ` [PATCH mptcp-next v10 6/7] selftests: net: " Geliang Tang
2026-11-27  4:36 ` [PATCH mptcp-next v10 7/7] selftests: mptcp: cover msg_zerocopy test Geliang Tang
2026-11-27  4:50   ` sashiko-bot [this message]
2026-11-27  7:24 ` [PATCH mptcp-next v10 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=sashiko-outbox-236620@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=geliang@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=sashiko-reviews@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox