The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Boris Shtrasman <borissh1983@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>,
	linux-pm@vger.kernel.org,  linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] selftests: test possible usb type values from documentation
Date: Mon, 20 Jul 2026 23:48:09 +0200	[thread overview]
Message-ID: <al6WlrksIVUkhSHG@venus> (raw)
In-Reply-To: <20260625160556.54830-3-borissh1983@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1680 bytes --]

Hi,

On Thu, Jun 25, 2026 at 07:05:55PM +0300, Boris Shtrasman wrote:
> modify kselftest to check for usb_types values from
> Documentation/ABI/testing/sysfs-class-power instead of only checking for
> property.
> 
> Added the
> "Unknown", "SDP", "DCP", "CDP", "ACA", "C", "PD",
> "PD_DRP", "PD_PPS", "BrickID", "PD_SPR_AVS",
> "PD_PPS_SPR_AVS" values from the
>  /sys/class/power_supply/<supply_name>/usb_type section.
> 
> Signed-off-by: Boris Shtrasman <borissh1983@gmail.com>
> ---
>  .../selftests/power_supply/test_power_supply_properties.sh   | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/power_supply/test_power_supply_properties.sh b/tools/testing/selftests/power_supply/test_power_supply_properties.sh
> index a66b1313ed88..7bf76af4cfd5 100755
> --- a/tools/testing/selftests/power_supply/test_power_supply_properties.sh
> +++ b/tools/testing/selftests/power_supply/test_power_supply_properties.sh
> @@ -58,7 +58,10 @@ for DEVNAME in $supplies; do
>  	# This fails on kernels < 5.8 (needs 2ad3d74e3c69f)
>  	test_uevent_prop TYPE "$SUPPLY_TYPE"
>  
> -	test_sysfs_prop_optional usb_type
> +	test_sysfs_prop_optional_list \
> +		usb_type "Unknown","SDP","DCP","CDP","ACA","C","PD"\
> +			,"PD_DRP","PD_PPS","BrickID", "PD_SPR_AVS" \
> +			,"PD_PPS_SPR_AVS"

I've picked up the other patch, but skipped this one, because it
does not work. The usb_type property reports back differently from
what the test_sysfs_prop_optional_list function expects:

sre@venus ~ % cat /sys/class/power_supply/ucsi-source-psy-pmic_glink.ucsi.01/usb_type
[C] PD PD_PPS

Greetings,

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-07-20 21:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-25 16:05 [PATCH v2 0/2] selftests: helpers: handle multi line in test_sysfs_prop_optional_list Boris Shtrasman
2026-06-25 16:05 ` [PATCH v2 1/2] " Boris Shtrasman
2026-06-25 16:05 ` [PATCH v2 2/2] selftests: test possible usb type values from documentation Boris Shtrasman
2026-07-20 21:48   ` Sebastian Reichel [this message]
2026-07-20 21:43 ` [PATCH v2 0/2] selftests: helpers: handle multi line in test_sysfs_prop_optional_list Sebastian Reichel

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=al6WlrksIVUkhSHG@venus \
    --to=sre@kernel.org \
    --cc=borissh1983@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=shuah@kernel.org \
    /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