🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by netdev-bot+sashiko Sun, 29 Nov 2026 10:38
Re: [PATCH net-next v5 04/14] selftests: dpll: add pin enumeration and property tests
#24121
Author: netdev-bot+sashiko
Date: Sun, 29 Nov 2026 10:38
120 lines
12062 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads