Article View: linux.kernel.netdev
Article #20671Re: [PATCH net-next 2/2] selftests: net: cover zero receive mark and priority
From: Hangbin Liu
Date: Mon, 23 Nov 2026 02:44
Date: Mon, 23 Nov 2026 02:44
58 lines
10379 bytes
10379 bytes
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
Technical Details
Message-ID:
<20261123024443.GB10218@Liu-laptop>Path:
mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368974-linux-kernel-netdev=dewy.ruReferences:
<20261122154912.1272447-1-xujingjing@cmss.chinamobile.com> <20261122154912.1272447-2-xujingjing@cmss.chinamobile.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368974-linux-kernel-netdev=dewy.ru From: hangbin.liu@linux.dev (Hangbin Liu) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 2/2] selftests: net: cover zero receive mark and priority Date: Mon, 23 Nov 2026 10:44:43 +0800 Organization: Usenet Network Message-ID: <20261123024443.GB10218@Liu-laptop> References: <20261122154912.1272447-1-xujingjing@cmss.chinamobile.com> <20261122154912.1272447-2-xujingjing@cmss.chinamobile.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="3774723"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:ncK6OveSb62H7NNs+YgRzny+ZXs= sha256:RsldeEAzJcf4QGOB3uRLSbERJrg1EFw3WIxDt5/yQZE= sha1:wdI9SnFOVueaHfusB+TrlS3h13M= sha256:gkt7+WsSERyLN+IWHhuBmq+BWGZKjWACtUggkLflOUE= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 888E7125D87; Mon, 23 Nov 2026 05:45:11 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=linux.dev X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1RQPXemXFhPG; Mon, 23 Nov 2026 05:45:08 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-368974-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id E4CA3125D83; Mon, 23 Nov 2026 05:44:59 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id D2C112806F; Mon, 23 Nov 2026 02:44:58 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795401896; b=zgmQ5EIdQq59pHvXsfPBA3p44NjhHTFk69jlwT3+qwLKxrKwyjvikTVPW27phSoDArtF lHdKjFwXgrwZBN9gK+MxXS7EvhXIOhkWOXzBdYNFsn2pY/HMzZzL+bpCb5OVMjzWjS6Sn 1KOT9hIMO4hWyxcEtBYzJCJV8H5EUtUshgN44bcFla0DsWpxwWGPCcysJDa/eedBW387x tf7jw4ZZhovGTbgMOYqo8rj1jQrSdibh43N3TZcrZPcCNr1hZ5kMJdkaI/brCr4KWY2id vApGv358c2N0B+OvnyuJqqAW0zfZ1r0ajRCHs18iheFU/WXiWisspQM+mB2uFqWgQNA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795401896; h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature: X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc: Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=MZW4Q/pfyt/1f1hQ+5fOgx5YvOxvuRXhncE2MiD1Lsk=; b=Sub1+Z8Nk6ym5nFH/KX33pQh4yVCQV8FnqKXjCplF6lJR1JzSgpeq4Ogn3Heb1acZ9uK 5HnjsLOHQOdFQ1gKxrwuO1He1NpDit6uUQ1HZQpDIFRM9YM0zDcFpvnOtUCxpZ5dMHXq7 QZ70GK3f3iG/Pjrxf4wim5PymJ03HgoM2ilz2iyeyMQ3tGiFJqp10vKTBTgWAOZgaShQA pCqf4zWiwd9THGjXfGRNoglYa6NlwM0uUWo3LG33AKiLe8tI8gKBG208KDupIdFDp0k6m N1uLELX1kCMvK3N2wv2xFZr4aQhaohiUzYVByAwJILmFq/xD0PJyvZ0bMQ9Z0/Lz9xQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=JqaV9kwF; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A9BBC606A32E; Mon, 23 Nov 2026 02:44:56 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=JqaV9kwF X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.123 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795401895; b=MEdDsGLW7d3fwUozIdQ3ml9gheYDiotDIxMpmYUmtu06XfsBp56b8LRDBbC5UzCR/NL+ hTfce+uaUxcnk2nUZcoxx5O9dOvE9K+l2jxzVZpr/Jc2cGP/BRIowHiB4Hukz1xVFzyji TOrsvDm7K9q3ZzaOngbOEUIJwnn9vStRWLH4MxuwEFX/fOGr4dmy9BzwezGKhYqP3zhVq SEvIyJPvkloqZL7pI/+79D9rQfnOeJCk2h8Gefe7uxLnQCpkKTM1jJEea+iTeW8PFgiDi wQTpu9uHydx7O8hSV/OF6Q8zYn4iKjzhLkNtkkXis7cFdKdM8Z5w1WB/Rn+0g63N13w== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795401895; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=MZW4Q/pfyt/1f1hQ+5fOgx5YvOxvuRXhncE2MiD1Lsk=; b=YGO3PIbLy9bGmEkBcI+YvlEYxaiPKyeztGYU1JEyvjY/PBxUYQF8+HTNKDMaElIhoVX3 DJOLivoz2KiMw9HoWEsgoPOKTzukaPP33vclDoymvqYRkrOJumG3IdznrKvn5pT3kWQMi 32+7TQPWobtq/YcufP5rCZM+yNBOdwnH1hDx7A6dPZpAXRcppuF8wkXurAQNQOPGlMqjL JGo87/lmazVUBo68+MDhfUzi3V+fcg+qKIHuOo+gPfLkqJxGK0NcK83Hh74lcFsfdMlqj 2M+ACKirJUvsyTmOLJENCB/1JDPfe3KBZMl2emH7vOYDap0BreJTunXheVVJcnDGKrQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=JqaV9kwF; arc=none smtp.remote-ip=91.218.175.123 X-Received: from mta0.migadu.com (out-123.mta0.migadu.com [91.218.175.123]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86D2B606A31E for <netdev@vger.kernel.org>; Mon, 23 Nov 2026 02:44:54 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 86D2B606A31E X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: netdev@vger.kernel.org X-DKIM-Signature: a=rsa-sha256; bh=OZOlkKaSXkHl1oyMsAj32/gC3bUeC7HCvUzlH7IGoAc=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1795401892; v=1; x=1796006692; b=JqaV9kwFRyJLSzGxNhXTw90kFeJVNkLdW/MmjHGKVyddvp5LGm/75PAHwEV8jNfahIW5K3wB cKM9MXWqNK7wNYIesGsqFm73i5KQFBoWzRTd7XQAZSiFxVFDoJ/a4BXzQ5BprLA9iKuPNsFiULP AolcpUzIb/CRk/dJa1UaZZA8= X-Envelope-To: netdev@vger.kernel.org X-Received: by mta11.migadu.com with ESMTPS id 7754e070e3607ff3; Mon, 23 Nov 2026 02:44:52 +0000 X-Mizu-Trace-ID: 7754e070e3607ff3 X-Migadu-Flow: FLOW_OUT X-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 X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261122154912.1272447-2-xujingjing@cmss.chinamobile.com>