Article View: linux.kernel.netdev
Article #17259Re: [PATCH net-next v4 08/14] selftests: dpll: add pin priority test
From: netdev-bot+sashiko
Date: Mon, 16 Nov 2026 14:30
Date: Mon, 16 Nov 2026 14:30
179 lines
14907 bytes
14907 bytes
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 2
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 test_pin_priority_get_set
(tools/testing/selftests/drivers/dpll/dpll_features.sh), the candidate…
- [Low] test_pin_priority_get_set (dpll_features.sh, line 93) ignores the
exit status of dpll_pin_get_prio: `before=$(dpll_pin_get_prio…
- [Low] Part of the commit message rationale is out of date after v4.
--
selftests: dpll: add pin priority test
This adds test_pin_priority_get_set() to dpll_features.sh. The test writes
the current priority of a spare input pin back, sets a new priority from a
list of candidates, reads it back and restores the original. The
dpllsim_add_pin helper gains an optional priority argument, and the
standard and stress simulator devices now set priorities on their input
pins.
> The range of priorities a device accepts is
> not advertised over netlink, so the test tries one below the current
> value and then the small values every driver accepts, since a large
> current value may mark an unused pin outside the settable range, as the
> ice driver does with 255. A driver may still refuse all of them for a
[Severity: Low]
Is this rationale still accurate after the v4 change? In v4,
test_pin_priority_get_set() first writes the current value back, and
returns if the device refuses it:
if ! dpll_pin_set_prio "$DPLL_DEV_ID" "$PIN_TUNE_ID" "$before"; then
...
return
fi
So a current value outside the settable range, such as 255 on ice, ends
the test before the candidate loop runs. The fallback to 1 and 7 now
matters only when before is 0, or when the device accepts its current
value back but refuses before - 1.
Also, "the small values every driver accepts" is followed by "A driver may
still refuse all of them". These two statements contradict each other.
> The standard device lays its inputs out as gnss0 with priority 0 and
> ext0 with priority 1, and the stress devices get random priorities on
> their input pins.
create_stress_device() gives ext0 a fixed priority of 1, and
test_deploy_cycle() uses the fixed values 0 and 1. Could the message say
that only the extra input pins of the stress device get random
priorities?
> diff --git a/tools/testing/selftests/drivers/dpll/dpll_features.sh b/tools/testing/selftests/drivers/dpll/dpll_features.sh
> index 0a00a18bded2c..f7340bd89602f 100755
> --- a/tools/testing/selftests/drivers/dpll/dpll_features.sh
> +++ b/tools/testing/selftests/drivers/dpll/dpll_features.sh
[ ... ]
> @@ -70,6 +71,79 @@ pin_tune_capable()
> return 1
> }
>
> +test_pin_priority_get_set()
> +{
[ ... ]
> + pin_tune_capable priority-can-change "DPLL pin priority set/get" \
> + "priority cannot change" || return
> +
> + before=$(dpll_pin_get_prio "$DPLL_DEV_ID" "$PIN_TUNE_ID")
> + if [ -z "$before" ]; then
> + dpll_log_test_skip_or_fail "DPLL pin priority set/get" \
> + "prio not reported"
> + return
> + fi
[Severity: Low]
Should the exit status of dpll_pin_get_prio() be checked here? When the
dpll tool fails, __dpll_pin_dev_field() returns 1 with empty output:
out=$(dpll pin show id "$pin_id" -j 2>/dev/null) || return 1
So a failed query and a pin with no prio in its parent-device nest both
end up as "prio not reported". On a device provided by the user, that is
logged as a skip, not a failure.
pin_tune_capable(), just above, already tells a failed query apart from a
missing capability. The later frequency and phase adjust tests in the
series also make that distinction for their getters.
> + # A device may report a priority it does not accept back, one that
> + # marks an unused pin for instance, and the pin could not be
> + # restored then. Writing the current value changes nothing, so
> + # that is tried before the pin is touched.
[ ... ]
> + # The accepted range is not advertised, so try one below the current
> + # value and then small values, a refusal of all of them is a skip on
> + # a device the user provided, the simulator accepts every value
> + # tried here.
> + target=""
> + for candidate in $((before - 1)) 1 7; do
> + [ "$candidate" -ge 0 ] && [ "$candidate" != "$before" ] ||
> + continue
> + if dpll_pin_set_prio "$DPLL_DEV_ID" "$PIN_TUNE_ID" \
> + "$candidate"; then
> + target=$candidate
> + break
> + fi
> + reason=${DPLL_LAST_ERR%%$'\n'*}
> + done
> + if [ -z "$target" ]; then
> + dpll_log_test_skip_or_fail "DPLL pin priority set/get" \
> + "cannot set a new prio${reason:+, $reason}"
> + return
> + fi
> + after=$(dpll_pin_get_prio "$DPLL_DEV_ID" "$PIN_TUNE_ID")
> + if [ "$after" != "$target" ]; then
> + check_err 1 "priority expected $target, got '$after'"
> + fi
[Severity: Medium]
Can this candidate order make the device switch its reference in
automatic mode? pin_is_spare() accepts a pin whose state is selectable:
(.state == "disconnected" or
.state == "selectable")) and
A lower number means a higher priority. Both before - 1 and then 1 move
the spare pin toward or above the current reference.
For example, take a reference at prio 2 and a spare pin at prio 3. Then
before - 1 ties with the reference, and 1 puts the spare pin above it.
Candidate 7 is tried whenever before is not 7. So when before < 7, it
lowers the priority instead.
After the set, only the prio is read back and the pin state is not
checked. A reference switch on hardware (ice, or zl3073x when the ref is
selectable) would go unnoticed.
On a non-revertive device, the switch can remain after the deferred
restore, and the restore still reports success.
There is also no re-check like the one in test_pin_state_transitions():
if [ "$mode" = automatic ] && [ "$before" = connected ]; then
dpll_log_test_skip_or_fail "DPLL pin state transitions" \
"spare input pin became the reference"
return
fi
test_pin_state_transitions() runs first. Through its
automatic/selectable/connected exception, it accepts the pin being left
connected.
Could test_pin_priority_get_set() then change the priority of what is now
the device's reference? When before < 7, it would lower that priority
with 7.
The script header warns that a spare pin with a valid signal can still be
selected. Would it make sense to try values that lower the priority
first, or to check the pin state before and after the set?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261112130359.840795-1-poros%40redhat.com
Technical Details
Message-ID:
<179483940380.3136.1462332477683774177@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364450-linux-kernel-netdev=dewy.ruReferences:
<20261112130359.840795-9-poros@redhat.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364450-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v4 08/14] selftests: dpll: add pin priority test Date: Mon, 16 Nov 2026 14:30:03 +0000 Organization: Usenet Network Message-ID: <179483940380.3136.1462332477683774177@kernel.org> References: <20261112130359.840795-9-poros@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2086723"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Xd2MW88DJQYLzylcAwn7fG+jqrM= sha256:/p1qW9ZENwBgQHzne3A3LTPEr7wXbotRw+815eBPFhc= sha1:PxFtfZdmcYQMRq/D/oQzUHMUdC8= sha256:A3X/th6XLEwP2k9p/eAUxTjxxDTmaeLS5x/huLv8jfs= 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 167A0114C6F; Mon, 16 Nov 2026 17:30:26 +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 GUNsMIywtPyZ; Mon, 16 Nov 2026 17:30:22 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-364450-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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id EA0A5114C7D; Mon, 16 Nov 2026 17:30:11 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id C584B6035B6; Mon, 16 Nov 2026 14:30: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=1794839406; b=JAhnjk5gmOeMZmeH1w8wNIo02t5IED0PcCzr/kJqzpwpWsJC466AxVLElfGWPm3QRlUP wM9LvS/Ix8cwPmf5OnSNjdsqDJcAnZW8GpqTTiGOG1JMR5Ov0AyxyzU4CXPgAS/G4SGHS fYJhV3WeZpnYhqkb8o9Sz6jzBeeYR6mbTO0kYxrIqUP7DxARFWhkSjXmOimcvi4ik7G60 V7ovG7fX+obj0q5GnwMoCHzom9ngrGFYqselWAR6PoQ984NI1tA+fHrtGBWVoln5st0qG Nv0zZtfvX5TFIlKjyKIZeEXRur3apu35Eu5ndTL/gA09910IEeyCGEjhXl858r1+dwg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794839406; 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=Djq3RZOWfZKIt3UCC39UNmXjeYuoOEudxGZrjWZ7UEk=; b=iwusYG5G3PsJqzLRa9ED5pFJdwN+UcG9/tXkBzHg3LfKwMeGiu/R5s/gu2bUik5feNZ1 vIIS2aeKUmMYEjTatH/p9Td+5kqvQ2abqRA54dcuJHcR8bIxXNzslrFRYQKANKIZ3YoOp C/xJDEfY4Z4njGSifB+oMeS2Hy40OXHibLWI6lL5OxfRFalBLe9hoZmsqybxTUrJW/vGS a9ClEPsVVTWh1ip2ZxmXPWyn4S72vJwqoJzPQte5VkRHVKVnNJxapV1mCbZznF9BBJM0Q nr8Q6kdqUwv7Aq9DleD3NGAYtWdNoMDwYonxArtL0S85JQXSGD8Z7p9BQsVQ7kR4Pow== 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=QpBlD6Ok; 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 AB382606A891; Mon, 16 Nov 2026 14:30:06 +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=QpBlD6Ok 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=1794839405; b=ZlLdnCfgaCIVoTKm32fQyjPgqnR6QEoWMOELx4LXfkt9btMCYRkJavurYx2UB5Rlkm58 B9zvU5Mnf8dmAQtRj8C6+En9OiKey1QJSzH0IzAwKQXzYw9DO9i2Lb1R971A5pmOGc2mg 2A2EgxkSmfKX5xLR8W/EYrYKarAVbNaegCj0k04860yefCTP0+V7R2XjU0egkxme+B8Gv KUeKXzJyvDJgg1uwpm6j74n1NRkn5K/df+PFcoQti0FPSW1PsC67SaWNpwf7vJlAeUMVB liQzwDBR5PNpX71uXUsBaTWGQXBmPvosNKZ7y6Y/ydtDl9hgP22xTOefgvSe2ObJXdA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794839405; 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=Djq3RZOWfZKIt3UCC39UNmXjeYuoOEudxGZrjWZ7UEk=; b=q1J6NYlijmM0a829AAQDbS8HoyhcSO9Nc/kaLeRfRYl7FrRIU5r48m+/3jz6RE9V96An o+SOAAkhf3IVpvQaWK1mUYQ/MPFU+tzIzPAvOI4q75jHSuR+srtX8t9MQBTnmbw9LNN3F uvNFVu/zoHy3UmX6xTv579YFMYLA9HtmR9TJSXouf9xfwv0jDO/vg64dlx0jay0XbLDW8 JIiiRmedNoxwKrZ47HXDIhxMuYx1LrYKlaDRCQHEHYtkJni0gScyWw6kBi1vcttBfzYKb mqIH9qbyiONGNntPaGgyBbfRCppH2eQWeNKd4G1dfydrcfpW2ttdxG43pANxzkW9kUg== 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=QpBlD6Ok; 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 C9C6E606A887; Mon, 16 Nov 2026 14:30:05 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E5311F000C4; Mon, 16 Nov 2026 14:30:04 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794839405; bh=Djq3RZOWfZKIt3UCC39UNmXjeYuoOEudxGZrjWZ7UEk=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=QpBlD6Okka+nV7d1i9Wv1zODJ5InbxFC8/AR2fXDUp1DPQoxNed4pPzd+RHkKdoko H5O0v9rUBMImneLfKeUig1C8afA36Ky0FD+Up1m3DzjccZzvN8IwYtE2+D/nQL47i2 rdd6V6bi030gLjU2kijhiMdMNzoBrUmQ6PjEL0nC7BvzZio4wmJPldVjpKf6vldpi+ yVmc7EHWMq3ENHt+1VgFSRybPU8fVMdCfOTw9J6MGtR1JApKYthMuZGqTgk3X09DY1 NstE6MsnQtnoI4L0w13enEtVIbl8izlM07FaedU1azbTfxTlRMVotTMSpBg4uZyEaP EBwfEluuWu1tQ== X-Cc: netdev@vger.kernel.org, ivecera@redhat.com, jiri@nvidia.com, corbet@lwn.net, skhan@linuxfoundation.org, shuah@kernel.org, rdunlap@infradead.org, jani.nikula@intel.com, vadim.fedorenko@linux.dev, arkadiusz.kubalewski@intel.com, jiri@resnulli.us, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org X-In-Reply-To: <20261112130359.840795-9-poros@redhat.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