From: Boris Shtrasman <borissh1983@gmail.com>
To: Sebastian Reichel <sre@kernel.org>, Shuah Khan <shuah@kernel.org>
Cc: linux-pm@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
Boris Shtrasman <borissh1983@gmail.com>
Subject: [PATCH v2 2/2] selftests: test possible usb type values from documentation
Date: Thu, 25 Jun 2026 19:05:55 +0300 [thread overview]
Message-ID: <20260625160556.54830-3-borissh1983@gmail.com> (raw)
In-Reply-To: <20260625160556.54830-1-borissh1983@gmail.com>
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"
test_sysfs_prop_optional_range online 0 2
test_sysfs_prop_optional_range present 0 1
--
2.47.3
prev parent reply other threads:[~2026-06-25 16:07 UTC|newest]
Thread overview: 3+ 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 ` Boris Shtrasman [this message]
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=20260625160556.54830-3-borissh1983@gmail.com \
--to=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 \
--cc=sre@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