From: Hangbin Liu <hangbin.liu@linux.dev>
To: Jingjing Xu <xujingjing@cmss.chinamobile.com>
Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
kuba@kernel.org, edumazet@kernel.org, pabeni@redhat.com,
horms@kernel.org, shuah@kernel.org, willemb@google.com,
annaemesenyiri@gmail.com, idosch@nvidia.com
Subject: Re: [PATCH net-next 2/2] selftests: net: cover zero receive mark and priority
Date: Mon, 23 Nov 2026 10:44:43 +0800 [thread overview]
Message-ID: <20261123024443.GB10218@Liu-laptop> (raw)
In-Reply-To: <20261122154912.1272447-2-xujingjing@cmss.chinamobile.com>
Hi Jingjing,
On Sun, Nov 22, 2026 at 03:49:12PM +0000, Jingjing Xu wrote:
> Exercise SO_RCVMARK and SO_RCVPRIORITY with zero values as well as the
> existing nonzero values, for both IPv4 and IPv6. These cases catch using
> the expected metadata value as the ancillary-message enable flag.
>
> Use the lowercase ksft_fail and ksft_pass constants defined by lib.sh.
> The uppercase names are undefined, so the failure path otherwise exits
> with the status of echo and incorrectly reports success to the runner.
>
> With the new tests and the original listener, four of eight cases fail
> and the script exits with status 1. With the fixed listener, all eight
> pass and the script exits with status 0. The original four cases also
> pass with the original listener. Verification used real UDP sockets in
> isolated network namespaces; discovery and testing were AI-assisted.
>
> No kernel instrumentation or fault injection was used.
>
> Fixes: c935af429ec2 ("selftests: net: add support for testing SO_RCVMARK and SO_RCVPRIORITY")
> Signed-off-by: Jingjing Xu <xujingjing@cmss.chinamobile.com>
> ---
> tools/testing/selftests/net/test_so_rcv.sh | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/net/test_so_rcv.sh b/tools/testing/selftests/net/test_so_rcv.sh
> index d8aa4362879d..3263ba2d1a67 100755
> --- a/tools/testing/selftests/net/test_so_rcv.sh
> +++ b/tools/testing/selftests/net/test_so_rcv.sh
> @@ -11,6 +11,8 @@ FAILED_TESTS=0
> declare -A TESTS=(
> ["SO_RCVPRIORITY"]="-P 2"
> ["SO_RCVMARK"]="-M 3"
> + ["SO_RCVPRIORITY_ZERO"]="-P 0"
> + ["SO_RCVMARK_ZERO"]="-M 0"
> )
>
These are 2 new test cases.
> check_result() {
> @@ -66,8 +68,8 @@ done
>
> if [ "$FAILED_TESTS" -ne 0 ]; then
> echo "FAIL - $FAILED_TESTS/$TOTAL_TESTS tests failed"
> - exit ${KSFT_FAIL}
> + exit ${ksft_fail}
> else
> echo "OK - All $TOTAL_TESTS tests passed"
> - exit ${KSFT_PASS}
> + exit ${ksft_pass}
And this is a stand along fix.
I think you can split this into another patch.
Thanks
Hangbin
next prev parent reply other threads:[~2026-11-23 2:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 15:49 [PATCH net-next 1/2] selftests: net: enable receive metadata independently of its value Jingjing Xu
2026-11-22 15:49 ` [PATCH net-next 2/2] selftests: net: cover zero receive mark and priority Jingjing Xu
2026-11-23 2:44 ` Hangbin Liu [this message]
2026-11-23 2:59 ` [PATCH net-next 1/2] selftests: net: enable receive metadata independently of its value Hangbin Liu
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=20261123024443.GB10218@Liu-laptop \
--to=hangbin.liu@linux.dev \
--cc=annaemesenyiri@gmail.com \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=willemb@google.com \
--cc=xujingjing@cmss.chinamobile.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