diff options
author | NĂcolas F. R. A. Prado <nfraprado@collabora.com> | 2024-04-15 11:32:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-30 09:44:31 +0200 |
commit | 21ed1bbfa7db314e24926f88ffb55bbd59d24be7 (patch) | |
tree | 51205549bf82e6adce82bdc7ae0c58ffd5f617d4 | |
parent | f0e783064f91694f88ee8b06d46f3321cce42ec1 (diff) |
selftests: power_supply: Make it POSIX-compliant
[ Upstream commit 5b1c8b1e56ff8b5e9c1a09606af3627bb55933cf ]
There is one use of bash specific syntax in the script. Change it to the
equivalent POSIX syntax. This doesn't change functionality and allows
the test to be run on shells other than bash.
Reported-by: Mike Looijmans <mike.looijmans@topic.nl>
Closes: https://lore.kernel.org/all/efae4037-c22a-40be-8ba9-7c1c12ece042@topic.nl/
Fixes: 4a679c5afca0 ("selftests: Add test to verify power supply properties")
Signed-off-by: NĂcolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rwxr-xr-x | tools/testing/selftests/power_supply/test_power_supply_properties.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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 df272dfe1d2a..a66b1313ed88 100755 --- a/tools/testing/selftests/power_supply/test_power_supply_properties.sh +++ b/tools/testing/selftests/power_supply/test_power_supply_properties.sh @@ -23,7 +23,7 @@ count_tests() { total_tests=0 for i in $SUPPLIES; do - total_tests=$(("$total_tests" + "$NUM_TESTS")) + total_tests=$((total_tests + NUM_TESTS)) done echo "$total_tests" |