Article View: linux.kernel.netdev
Article #22595Re: [PATCH net v6 3/3] selftests/net/openvswitch: check that a failed set keeps the features
From: netdev-bot+sashiko
Date: Wed, 25 Nov 2026 14:53
Date: Wed, 25 Nov 2026 14:53
103 lines
11549 bytes
11549 bytes
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
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] In tools/testing/selftests/net/openvswitch/openvswitch.sh,
both new tests guard datapath creation with `ovs_add_dp "$t" "$dp" ||…
--
selftests/net/openvswitch: check that a failed set keeps the features
This adds a set-dp command to ovs-dpctl.py and two openvswitch selftests
that use it. The tests check that a set with an empty per-cpu-pids is
rejected with EINVAL and leaves the datapath features unchanged, and that
an outdated OVS_DP_CMD_NEW request drops the features. The config fragment
also gains NET_SCHED, NET_CLS_ACT and NET_TC_SKB_EXT for the recirc bit.
> diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh
> index 21444657a0404..cdeca5a63671f 100755
> --- a/tools/testing/selftests/net/openvswitch/openvswitch.sh
> +++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh
[ ... ]
> +test_dp_features() {
> + local t="test_dp_features"
> + local dp="dpfeat0"
> +
> + sbx_add "$t" || return $?
> + ovs_add_dp "$t" "$dp" || return 1
[Severity: Medium]
Can this "|| return 1" ever trigger when add-dp fails?
ovs_add_dp() runs add-dp and then calls on_exit():
ovs_add_dp () {
...
ovs_sbx "$sbxname" python3 $ovs_base/ovs-dpctl.py add-dp $*
on_exit "ovs_sbx $sbxname python3 $ovs_base/ovs-dpctl.py del-dp $1;"
}
on_exit() {
echo "$1" > ${ovs_dir}/cleanup.tmp
cat ${ovs_dir}/cleanup >> ${ovs_dir}/cleanup.tmp
mv ${ovs_dir}/cleanup.tmp ${ovs_dir}/cleanup
}
The function returns the status of the final mv, so the exit status of
add-dp is lost. OvsDatapath.create() swallows only EEXIST and re-raises
any other NetlinkError, so add-dp can exit non-zero.
If that happens, the first failure the test sees is the next step:
> +
> + info "clear the datapath features"
> + ovs_sbx "$t" ovs_dp_features_set "$dp" --features 0 ||
> + { ovs_fail "the datapath features could not be cleared"; return 1; }
Here set-dp prints "DP 'dpfeat0' not found." to stdout. ovs_sbx sends that
into debug.log, and run_test removes $ovs_dir on FAIL. The only reason left
on stderr is "the datapath features could not be cleared", while the real
cause was that the datapath was never created.
The commit message says:
Every step that can fail says why it did.
The datapath creation step doesn't seem to meet that. Could add-dp's
status be checked, either with "|| return 1" on the add-dp line in
ovs_add_dp() before on_exit, or by calling add-dp directly in the new tests
with an ovs_fail message?
The ovs_add_dp() behaviour is older than this patch, but the new tests
depend on a return status that the helper never gives.
[ ... ]
> +test_dp_features_recirc() {
> + local t="test_dp_features_recirc"
> + local dp="dpfeat1"
> +
> + sbx_add "$t" || return $?
> + ovs_add_dp "$t" "$dp" || return 1
> +
> + ovs_sbx "$t" ovs_dp_features_set "$dp" --features 0 ||
> + { ovs_fail "the datapath features could not be cleared"; return 1; }
The same applies here. A failed add-dp for dpfeat1 would be reported as
"the datapath features could not be cleared".
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261124145033.627044-1-houminxi%40gmail.com
Technical Details
Message-ID:
<179561838528.3135.298909861336575885@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371439-linux-kernel-netdev=dewy.ruReferences:
<20261124145033.627044-4-houminxi@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371439-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v6 3/3] selftests/net/openvswitch: check that a failed set keeps the features Date: Wed, 25 Nov 2026 14:53:05 +0000 Organization: Usenet Network Message-ID: <179561838528.3135.298909861336575885@kernel.org> References: <20261124145033.627044-4-houminxi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="234382"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Z8lp7ckjfLOQYVbtU6sxyRBvNsc= sha256:GMDA0KPpedapHF9RPxB0tduLSHe8TDNej3iOaFM+GZI= sha1:lnhRhZ/4oi937VUpTcUYYzEcqX8= sha256:Hx5vovBPmMMo7rxhataNg4movzBswdDV84Tdv432BSs= 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 E3D2A125E74; Wed, 25 Nov 2026 17:53:31 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.5 X-Spam-Status: No, score=-3.5 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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 (2048-bit key) header.d=kernel.org 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 OaWejqOU3Gjl; Wed, 25 Nov 2026 17:53:28 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-371439-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 05D43125E73; Wed, 25 Nov 2026 17:53:19 +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 64B8F3AFD1; Wed, 25 Nov 2026 14:53:09 +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=1795618387; b=vlUl7jiO9xKMdqThOa3dAwQkkkXjdiS/iZftch+l1/rgDfan5RlRwlr25ZOuSkjTewQf CFhVVENIwQde2Xzwya9UqdyQIeZnoAVQRoDbRsxRfgnoSXVmhdt20bpknyj/7Eshq7rxM pdC/bv6Du1ujSJRQQDXt5FIf26rGPDpG1HzseB9Y/iXu91cUX25HmugT6phkwOPCf2CuF gP2IJSBiihJWf/3b6cBoVokE4WzrZs2CMRSDDB5KXfhIknYsfqOabNKBFQqswNUy0WMJr DqYunoUNwSjf7juhQ5Jk2jgT07HwpWPWItWeHK8kacay+8BLHxhWYxSDVk1shryCcuQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795618387; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=Znx8OK8MuKncYyxnlDBlz/nz1rG90rVjrlETvLNui/U=; b=s5kUC4K3fx4moNroGnImdDmfr3qXdCrdCplrYJAnFDmDuKiGlOQ+nbzjVmsICfAlV71w L1KB3NJ/KdrGN4yVpfxuFbqMHa1DoD9/8YS1GaMj5LwMA+OtkPjaQ1VYwmZK1qlZo7kNg kzeeOkq2Opk+MrQmm7roCBELMirLvS/vm58vUNctgegXqYTusme9mrsFCOuzb7qNmQEyN 2AHsa8yR21IeFjcDtuE/R3jPAjeP8eDPN8Rm6Rpun2QbJDw+JCC0rToczVBajR9D0L8qg PyzMEyC0rfPEsk3MX4a8tXuCAC0/N2W888lTXjVMlNnHt8cmKWnhjtOsZwAtOaECNJg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="mGNNI/9A"; 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 C0EB8606A33A; Wed, 25 Nov 2026 14:53:07 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mGNNI/9A X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795618387; b=1slKuf3xzvMtvnum3AUaagH9lae9s/Js6JGkWI7pIa+4HviS9DaqgGu5Jnjf5gF0liNa MRROLShKKmeak5ZRaEsVh/6UMlbErWYj/tlF5SoXTqhkGUHYtjjObBoRon/tIcovHeDRQ uZUt8KYOKh2SlEyIF731wypkbOEhxDHAROYNGI3yy9z7oASDFI1dAzSw7i3RLYW6RSvME Jymu7nQn4uYcmAB7uglA3lf/uW8XI9aJXNAhXcIGoXuwOhynrFW+cDWwp8mE7nJSIfhEW A3d5rTwxhxdoTUpTCqSDNsqy72C/5LRGK/svS999TK2UUn4I/CRNKOyslcyh08o4VBA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795618387; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=Znx8OK8MuKncYyxnlDBlz/nz1rG90rVjrlETvLNui/U=; b=supPWK9u0DmbOzkeRYQlmbbcvzGBOsfzVd6WDTTP2gFoT2rk6ruMS4L7mHkqF6f/mAru PlRVfHGZh7HxnH8pDdYeCNAMzeRvDLN8oQJQOLWezDE5MjmQOC0FBCjrQkrFi5ldMuTut RXpNTOu7tajCBbqY68HuShpyaGTDZdPaVujBajBOY7ncAI5WasnCVbdiIVJ7/v+2qfNqm 1x8f9aMmxam60CkfzAwOb1pn2NmG4HRHvOLafOZdNOd4vzbMVOMe3SzOzvthTpiZOspUC dCgJ6S3nne0ru7tPy8Oo3eKr33ZMrO8Df5NXrHAI7ff5ZVysjfWVFGmtkGY5eD62TRw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="mGNNI/9A"; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E44D2606A33C for <netdev@vger.kernel.org>; Wed, 25 Nov 2026 14:53:06 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3D7A1F000E0; Wed, 25 Nov 2026 14:53:05 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795618386; bh=Znx8OK8MuKncYyxnlDBlz/nz1rG90rVjrlETvLNui/U=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=mGNNI/9AfiHWn7a/r5ARO+lECJpVin/AEdPf18O0HgzrBxfc1tMdqGxxGa2IIurw6 57ZqIuEP2NlJ5FdUk4uBzBcl+DJSOpxu8eE+p2cqvGllhGdC06nBr3bHPRluQih3sJ 1QFg2cYDcDuwjHE9OVQaATRtLBvE3fyqv/EVhfvY+WNJQgqNZZ2D8PXUxnWc1awx/d zfUryJYu7qDWXRDc5phGGgj9lVcOAujlNJtqs3cpxCdwx1Q/Zkdq1VvbzZnaB8XK8u 9UgEplhUQtNYaHkTta/NKIBTsFIYHfbccoyDl06WwgwHiNMAHg7Nxs/14gKrwhGi0E 05l+hA3By1p7w== X-Cc: netdev@vger.kernel.org, dev@openvswitch.org, aconole@redhat.com, echaudro@redhat.com, i.maximets@ovn.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, matttbe@kernel.org, shuah@kernel.org, netdev-bot+sashiko@kernel.org X-In-Reply-To: <20261124145033.627044-4-houminxi@gmail.com> X-sashiko-severity: Medium 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