aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNĂ­colas F. R. A. Prado <[email protected]>2024-04-15 11:32:16 -0400
committerShuah Khan <[email protected]>2024-05-06 13:57:20 -0600
commit5b1c8b1e56ff8b5e9c1a09606af3627bb55933cf (patch)
tree13f08f67726c169739bbbce09ad962a53cb79998
parent45d5a2b1886a3ff0fe5627ebee84c089db7ff5f2 (diff)
selftests: power_supply: Make it POSIX-compliant
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 <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Fixes: 4a679c5afca0 ("selftests: Add test to verify power supply properties") Signed-off-by: NĂ­colas F. R. A. Prado <[email protected]> Reviewed-by: Muhammad Usama Anjum <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
-rwxr-xr-xtools/testing/selftests/power_supply/test_power_supply_properties.sh2
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"