From: Ivan Vecera <ivecera@redhat.com>
To: Petr Oros <poros@redhat.com>, netdev@vger.kernel.org
Cc: Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Shuah Khan <shuah@kernel.org>,
Randy Dunlap <rdunlap@infradead.org>,
Jani Nikula <jani.nikula@intel.com>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
Jiri Pirko <jiri@resnulli.us>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v5 06/14] selftests: dpll: add pin state tests
Date: Fri, 27 Nov 2026 14:39:31 +0100 [thread overview]
Message-ID: <2505b9de-c1aa-4338-b097-59fd59ac7289@redhat.com> (raw)
In-Reply-To: <20261125090522.3777494-7-poros@redhat.com>
On 11/25/26 10:05, Petr Oros wrote:
> Add dpll_features.sh, a script that exercises individual pin callbacks
> with get/set roundtrips over netlink. It creates a dpllsim device with
> the standard pin layout by default or runs against the device named by
> DPLL_DEV_ID or the first device of the driver named by DPLL_DRIVER, and
> picks the pin to reconfigure up front, so that no test touches the
> reference the device is locked to. The pin is an input that is
> disconnected or selectable on the device and that none of its parent
> devices reports as connected or, where the tool prints the operational
> state, as active, since a pin can be registered on several devices. A
> parent device that is locked or in holdover and shows no such input
> hides its reference, so no pin is picked then, while an unlocked device
> has no reference yet. The NCO input of zl3073x, which iproute2 prints as
> a pin of unknown type so far, and both pins of a connected reference
> sync pair are left alone. The comment above pin_is_spare has the
> details. When the first input pin and another one both qualify the other
> one is taken, drivers tend to list their primary reference first. Every
> test checks again that the pin is spare before it changes it. A spare
> pin can still be selected while a test reconfigures it, which the header
> of the script points out.
>
> The first test moves that pin between disconnected and selectable, the
> states of automatic mode as Documentation/driver-api/dpll.rst defines
> them, reads the state back after each step and restores the original
> state at the end. On the device the script created it then checks that
> connected is refused. Hardware drivers are not held to refusing
> connected, ice accepts it in automatic mode, and a pin with the
> state-connected-override capability would take over the reference. On a
> device provided by the user a disconnected pin is offered to the
> selection only when its priority ranks below the one of the reference on
> every device it is registered on, it could take over otherwise, and the
> readback accepts that the device picked the pin as its reference. Manual
> mode, where connecting the pin makes it the reference, is left out until
> the simulator can change its mode, a device provided by the user in
> manual mode is a skip.
>
> A driver may refuse a state the capability promises, for a constraint
> the interface does not tell. That is a skip on a device provided by the
> user, with the reason the tool reported, and a failure on the device the
> script created, whose simulator accepts both states of its mode. A
> refusal that follows a failed readback leaves the test failed,
> dpll_log_test_skip_or_fail no longer turns a recorded failure into a
> skip. The restore is deferred right after the original state is read. It
> acts only while the pin is changed, when the test ends early or its own
> restore was refused, one that gets to the end otherwise restores the pin
> itself and checks it. The cleanup handler of every script that defers
> runs the pending restores before it removes the devices the script
> created, so that an interrupted run puts the device back as well. defer
> reports nothing about what it runs, so the restores go through
> dpll_restore, which logs one that fails, fails the run and returns its
> status. A pin that cannot be queried is a failure, not a pin that is in
> use or lacks a capability, and so is a device that does not report its
> mode or the state of the pin, both are mandatory.
>
> The stress script gains a test that floods one input pin of a fresh
> device with changes between the states of automatic mode and ends on
> selectable, the state a fresh pin is not in, so that the readback after
> the flood catches a setter that stores nothing. The library gains the
> state setter both use, which keeps the extack line of the tool in
> DPLL_LAST_ERR so that a test can tell a refusal from a failure, the
> device mode getter and a check whether the pin set usage of the tool
> knows a keyword, so that a test skips on a tool too old for it rather
> than every script requiring a newer tool.
>
> Signed-off-by: Petr Oros<poros@redhat.com>
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
next prev parent reply other threads:[~2026-11-27 13:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 9:05 [PATCH net-next v5 00/14] dpll: add a simulated DPLL device driver Petr Oros
2026-11-25 9:05 ` [PATCH net-next v5 01/14] dpll: dpllsim: Add " Petr Oros
2026-11-25 9:05 ` [PATCH net-next v5 02/14] selftests: dpll: add test library and device lifecycle tests Petr Oros
2026-11-25 9:05 ` [PATCH net-next v5 03/14] dpll: dpllsim: Add configurable pins Petr Oros
2026-11-25 9:05 ` [PATCH net-next v5 04/14] selftests: dpll: add pin enumeration and property tests Petr Oros
2026-11-25 9:05 ` [PATCH net-next v5 05/14] dpll: dpllsim: Add support to set input pin state Petr Oros
2026-11-25 9:05 ` [PATCH net-next v5 06/14] selftests: dpll: add pin state tests Petr Oros
2026-11-27 13:39 ` Ivan Vecera [this message]
2026-11-25 9:05 ` [PATCH net-next v5 07/14] dpll: dpllsim: Add support to get/set priority on input pins Petr Oros
2026-11-27 13:39 ` Ivan Vecera
2026-11-25 9:05 ` [PATCH net-next v5 08/14] selftests: dpll: add pin priority test Petr Oros
2026-11-27 13:40 ` Ivan Vecera
2026-11-25 9:05 ` [PATCH net-next v5 09/14] dpll: dpllsim: Add support to set frequency on pins Petr Oros
2026-11-27 13:40 ` Ivan Vecera
2026-11-25 9:05 ` [PATCH net-next v5 10/14] selftests: dpll: add pin frequency test Petr Oros
2026-11-25 9:05 ` [PATCH net-next v5 11/14] dpll: dpllsim: Add support to adjust phase Petr Oros
2026-11-25 9:05 ` [PATCH net-next v5 12/14] selftests: dpll: add pin phase adjust test Petr Oros
2026-11-25 9:05 ` [PATCH net-next v5 13/14] selftests: dpll: add concurrency stress tests Petr Oros
2026-11-25 9:05 ` [PATCH net-next v5 14/14] selftests: dpll: add reference leak tests Petr Oros
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=2505b9de-c1aa-4338-b097-59fd59ac7289@redhat.com \
--to=ivecera@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=arkadiusz.kubalewski@intel.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=jani.nikula@intel.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=poros@redhat.com \
--cc=rdunlap@infradead.org \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=vadim.fedorenko@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