diff options
author | Laura Nao <laura.nao@collabora.com> | 2024-07-30 12:29:28 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-07-31 19:38:56 +0200 |
commit | 170c966cbe274e664288cfc12ee919d5e706dc50 (patch) | |
tree | 92bd1af0759eb33dad98353301827aa635bc6941 /tools | |
parent | Linux 6.11-rc1 (diff) | |
download | linux-170c966cbe274e664288cfc12ee919d5e706dc50.tar.xz linux-170c966cbe274e664288cfc12ee919d5e706dc50.zip |
selftests: ksft: Fix finished() helper exit code on skipped tests
The Python finished() helper currently exits with KSFT_FAIL when there
are only passed and skipped tests. Fix the logic to exit with KSFT_PASS
instead, making it consistent with its C and bash counterparts
(ksft_finished() and ktap_finished() respectively).
Reviewed-by: NĂcolas F. R. A. Prado <nfraprado@collabora.com>
Fixes: dacf1d7a78bf ("kselftest: Add test to verify probe of devices from discoverable buses")
Signed-off-by: Laura Nao <laura.nao@collabora.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/kselftest/ksft.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kselftest/ksft.py b/tools/testing/selftests/kselftest/ksft.py index cd89fb2bc10e..bf215790a89d 100644 --- a/tools/testing/selftests/kselftest/ksft.py +++ b/tools/testing/selftests/kselftest/ksft.py @@ -70,7 +70,7 @@ def test_result(condition, description=""): def finished(): - if ksft_cnt["pass"] == ksft_num_tests: + if ksft_cnt["pass"] + ksft_cnt["skip"] == ksft_num_tests: exit_code = KSFT_PASS else: exit_code = KSFT_FAIL |