Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: poros@redhat.com
Cc: netdev@vger.kernel.org, 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, ivecera@redhat.com, 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 v6 08/14] selftests: dpll: add pin priority test
Date: Thu, 03 Dec 2026 15:36:08 +0000	[thread overview]
Message-ID: <179631216883.3146.15028486024263668485@kernel.org> (raw)
In-Reply-To: <20261202153223.2725780-9-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] The patch gives the simulator layout configured priorities, but
  no test in the series checks that those priorities come back over…

--

selftests: dpll: add pin priority test

This commit adds test_pin_priority_get_set() to dpll_features.sh. The
test sets a new priority on a spare input pin, reads it back and then
restores the original value. It also adds an optional priority argument
to dpllsim_add_pin() and gives configured priorities to the standard and
stress simulator layouts.

> diff --git a/tools/testing/selftests/drivers/dpll/dpll_features.sh b/tools/testing/selftests/drivers/dpll/dpll_features.sh
> index 9dcf53d019987..e50b60608f1e9 100755
> --- a/tools/testing/selftests/drivers/dpll/dpll_features.sh
> +++ b/tools/testing/selftests/drivers/dpll/dpll_features.sh

[ ... ]

> +	# A query that failed is not a pin without a priority.
> +	if ! before=$(dpll_pin_get_prio "$DPLL_DEV_ID" "$PIN_TUNE_ID"); then
> +		check_err 1 "pin $PIN_TUNE_ID query failed"
> +		log_test "DPLL pin priority set/get"
> +		return
> +	fi
> +	if [ -z "$before" ]; then
> +		dpll_log_test_skip_or_fail "DPLL pin priority set/get" \
> +		    "prio not reported"
> +		return
> +	fi
> +	if ! [[ "$before" =~ ^[0-9]+$ ]]; then
> +		check_err 1 "prio '$before' is not a number"
> +		log_test "DPLL pin priority set/get"
> +		return
> +	fi

[Severity: Low]
This isn't a bug, but should the created device also check before against
the configured layout here?

dpllsim_add_standard_pins() now writes prio 0 for gnss0 and prio 1 for
ext0 through configfs. The comment above dpllsim_setup_standard_device()
documents those values.

test_pin_priority_get_set() only checks that before is a number, even when
DPLL_CREATED_DEVICE is set and the layout is known. dpll_basic.sh has no
prio checks. pin_ranks_below_refs() only reads .prio on devices the user
provided. dpll_stress.sh never reads back the priorities it assigns
randomly.

That leaves the configfs to netlink path untested:

dpllsim_pin_prio_store() sets cfg_prio
  -> dpllsim_pin_reset()
       pin->prio = pin->cfg_prio;
  -> dpllsim_pin_prio_get()

Suppose the store silently dropped the value, or the copy in
dpllsim_pin_reset() were lost when the device goes live. ext0 would then
report the simulator default of 128 instead of 1. The test would still
pass, because it would set 129, read 129 back and restore 128.

ext0 is the pin pick_tune_pin() picks on the created device. Would a check
such as this one close the gap?

    [ -z "$DPLL_CREATED_DEVICE" ] || [ "$before" = 1 ]

[ ... ]

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

  reply	other threads:[~2026-12-03 15:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 15:32 [PATCH net-next v6 00/14] dpll: add a simulated DPLL device driver Petr Oros
2026-12-02 15:32 ` [PATCH net-next v6 01/14] dpll: dpllsim: Add " Petr Oros
2026-12-02 15:32 ` [PATCH net-next v6 02/14] selftests: dpll: add test library and device lifecycle tests Petr Oros
2026-12-03 15:36   ` netdev-bot+sashiko
2026-12-02 15:32 ` [PATCH net-next v6 03/14] dpll: dpllsim: Add configurable pins Petr Oros
2026-12-03 15:36   ` netdev-bot+sashiko
2026-12-02 15:32 ` [PATCH net-next v6 04/14] selftests: dpll: add pin enumeration and property tests Petr Oros
2026-12-02 15:32 ` [PATCH net-next v6 05/14] dpll: dpllsim: Add support to set input pin state Petr Oros
2026-12-02 15:32 ` [PATCH net-next v6 06/14] selftests: dpll: add pin state tests Petr Oros
2026-12-03 15:36   ` netdev-bot+sashiko
2026-12-02 15:32 ` [PATCH net-next v6 07/14] dpll: dpllsim: Add support to get/set priority on input pins Petr Oros
2026-12-02 15:32 ` [PATCH net-next v6 08/14] selftests: dpll: add pin priority test Petr Oros
2026-12-03 15:36   ` netdev-bot+sashiko [this message]
2026-12-02 15:32 ` [PATCH net-next v6 09/14] dpll: dpllsim: Add support to set frequency on pins Petr Oros
2026-12-02 15:32 ` [PATCH net-next v6 10/14] selftests: dpll: add pin frequency test Petr Oros
2026-12-03 15:36   ` netdev-bot+sashiko
2026-12-02 15:32 ` [PATCH net-next v6 11/14] dpll: dpllsim: Add support to adjust phase Petr Oros
2026-12-02 15:32 ` [PATCH net-next v6 12/14] selftests: dpll: add pin phase adjust test Petr Oros
2026-12-02 15:32 ` [PATCH net-next v6 13/14] selftests: dpll: add concurrency stress tests Petr Oros
2026-12-02 15:32 ` [PATCH net-next v6 14/14] selftests: dpll: add reference leak tests Petr Oros
2026-12-03 15:36   ` 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=179631216883.3146.15028486024263668485@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@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