Linux Documentation
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: poros@redhat.com
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
Subject: Re: [PATCH net-next v5 04/14] selftests: dpll: add pin enumeration and property tests
Date: Sun, 29 Nov 2026 10:38:48 +0000	[thread overview]
Message-ID: <179594872895.3146.18409224075949687634@kernel.org> (raw)
In-Reply-To: <20261125090522.3777494-5-poros@redhat.com>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] This patch adds dpll_pin_get_frequency() at dpll_lib.sh line 388,
  but nothing in the tree calls it at this commit.
- [Low] The comment on dpll_log_test_skip_or_fail() says the layout and
  capabilities of the device the script created are known, so a missing…

--

selftests: dpll: add pin enumeration and property tests

This commit adds pin queries to the dpll selftest library and pin helpers
for dpllsim. The standard dpllsim device now gets a GNSS input, an
external input and an external output. dpll_basic.sh gains pin
enumeration, property and state tests, which use a new
dpll_log_test_skip_or_fail() helper that fails on a device the test
created and skips on a device the user provided.

> diff --git a/tools/testing/selftests/drivers/dpll/dpll_lib.sh b/tools/testing/selftests/drivers/dpll/dpll_lib.sh
> index 467527a4343af..19e652a8e8da4 100644
> --- a/tools/testing/selftests/drivers/dpll/dpll_lib.sh
> +++ b/tools/testing/selftests/drivers/dpll/dpll_lib.sh

[ ... ]

> @@ -162,15 +166,39 @@ __dpll_lib_dump_failed()
>  	exit "$ksft_fail"
>  }
>  
> +# Name of the dpllsim device a script created as the device under test,
> +# set by the script next to DPLL_DEV_ID. Empty when the user provided
> +# the device.
> +DPLL_CREATED_DEVICE=""
> +
> +# The layout and the capabilities of the device a script created are
> +# known, so a missing pin, attribute or capability on it can only mean a
> +# failed query or broken tooling. Report such a condition as a failure
> +# on the created device and as a skip on a device the user provided,
> +# where it is a property of the hardware.
> +# $1: test name, $2: reason
> +dpll_log_test_skip_or_fail()
> +{
> +	local name=$1
> +	local reason=$2
> +
> +	if [ -n "$DPLL_CREATED_DEVICE" ]; then
> +		check_err 1 "$reason on the device created by the test"
> +		log_test "$name"
> +	else
> +		log_test_skip "$name" "$reason"
> +	fi
> +}

[Severity: Low]

This isn't a bug, but does this comment promise more than the pin tests
in dpll_basic.sh check on the created device?

On the created device, the tests only fail through this helper when the
pin list is empty or when no input pin is found:

dpll_basic.sh:test_pin_enumeration() {
    ...
	if [ "${#pin_ids[@]}" -eq 0 ]; then
		dpll_log_test_skip_or_fail "DPLL pin enumeration" \
		    "no pins found"
    ...
}

The pins they find are never compared with the layout from
dpllsim_add_standard_pins() (gnss0, ext0, out0), and the type and
direction values are never checked. check_pin_properties() also treats
frequency as optional, even on dpllsim:

dpll_basic.sh:check_pin_properties() {
    ...
	for field in '.id' '.type'; do
    ...
}

The commit message does limit the claim to "an empty pin list or a
missing input pin". Later patches in the series also use this helper for
capability checks, and dpll_features.sh adds explicit frequency, prio,
state and phase-adjust tests.

Could the comment be narrowed to what the callers actually check? Or
could dpll_basic.sh compare the pins of the created device against the
standard 3-pin layout?

[ ... ]

> @@ -253,12 +281,127 @@ dpll_device_wait_gone_by_clock_id()

[ ... ]

> +dpll_pin_get_frequency()
> +{
> +	__dpll_pin_field "$1" '.frequency'
> +}

[Severity: Low]

This isn't a bug, but nothing calls dpll_pin_get_frequency() at this
commit. check_pin_properties() in dpll_basic.sh only checks .id and
.type, and the commit message doesn't say the helper is groundwork for a
later patch.

The later patch "selftests: dpll: add pin frequency test" seems to be
the first to use it, from dpll_features.sh. Could the helper move into
that patch, or could the changelog say it is used later in the series?

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261125090522.3777494-1-poros%40redhat.com

  reply	other threads:[~2026-11-29 10:38 UTC|newest]

Thread overview: 29+ 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-29 10:38   ` netdev-bot+sashiko
2026-11-25  9:05 ` [PATCH net-next v5 02/14] selftests: dpll: add test library and device lifecycle tests Petr Oros
2026-11-29 10:38   ` netdev-bot+sashiko
2026-11-25  9:05 ` [PATCH net-next v5 03/14] dpll: dpllsim: Add configurable pins Petr Oros
2026-11-29 10:38   ` netdev-bot+sashiko
2026-11-25  9:05 ` [PATCH net-next v5 04/14] selftests: dpll: add pin enumeration and property tests Petr Oros
2026-11-29 10:38   ` netdev-bot+sashiko [this message]
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
2026-11-29 10:38   ` netdev-bot+sashiko
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-29 10:38   ` netdev-bot+sashiko
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-29 10:38   ` netdev-bot+sashiko
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-29 10:38   ` netdev-bot+sashiko
2026-11-25  9:05 ` [PATCH net-next v5 13/14] selftests: dpll: add concurrency stress tests Petr Oros
2026-11-29 10:38   ` netdev-bot+sashiko
2026-11-25  9:05 ` [PATCH net-next v5 14/14] selftests: dpll: add reference leak tests Petr Oros
2026-11-29 10:39   ` netdev-bot+sashiko

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=179594872895.3146.18409224075949687634@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=ivecera@redhat.com \
    --cc=jani.nikula@intel.com \
    --cc=jiri@nvidia.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