diff options
| author | Mark Brown <broonie@kernel.org> | 2026-07-27 14:21:28 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-07-27 14:21:28 +0100 |
| commit | 6f5d733a98cf249be189e599a6b25618440af4b1 (patch) | |
| tree | c54ca119f1cabf4ad6bddf0d47fffb40240e07bb /tools/testing | |
| parent | a26e17f3264c6dd9916f27e5c9ffa00810bac1fa (diff) | |
| parent | ab1112df8f4ffa88cb024dd370c432ced80f77d8 (diff) | |
| download | linux-next-6f5d733a98cf249be189e599a6b25618440af4b1.tar.gz linux-next-6f5d733a98cf249be189e599a6b25618440af4b1.zip | |
Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git
Diffstat (limited to 'tools/testing')
| -rw-r--r-- | tools/testing/selftests/power_supply/helpers.sh | 8 | ||||
| -rwxr-xr-x | tools/testing/selftests/power_supply/test_power_supply_properties.sh | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/tools/testing/selftests/power_supply/helpers.sh b/tools/testing/selftests/power_supply/helpers.sh index 1ec90d7c9108..ff1175aeed72 100644 --- a/tools/testing/selftests/power_supply/helpers.sh +++ b/tools/testing/selftests/power_supply/helpers.sh @@ -108,7 +108,7 @@ test_sysfs_prop_optional_range() { test_sysfs_prop_optional_list() { PROP=$1 - LIST=$2 + shift TEST_NAME="$DEVNAME".sysfs."$PROP" @@ -118,9 +118,9 @@ test_sysfs_prop_optional_list() { valid=0 OLDIFS=$IFS - IFS="," - for item in $LIST; do - if [ "$DATA" = "$item" ]; then + IFS=",$IFS" + for item in $*; do + if [ "$item" ] && [ "$DATA" = "$item" ]; then valid=1 break fi 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..1ebac6fe5d23 100755 --- a/tools/testing/selftests/power_supply/test_power_supply_properties.sh +++ b/tools/testing/selftests/power_supply/test_power_supply_properties.sh @@ -74,7 +74,8 @@ for DEVNAME in $supplies; do test_sysfs_prop_optional model_name test_sysfs_prop_optional manufacturer test_sysfs_prop_optional serial_number - test_sysfs_prop_optional_list technology "Unknown","NiMH","Li-ion","Li-poly","LiFe","NiCd","LiMn" + test_sysfs_prop_optional_list technology "Unknown","NiMH","Li-ion","Li-poly","LiFe","NiCd"\ + ,"LiMn","PbAc","NiZn","RAM","ZnAr" test_sysfs_prop_optional cycle_count |
