Skip to content

Commit 170c966

Browse files
laura-naoshuahkh
authored andcommitted
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 <[email protected]> Fixes: dacf1d7 ("kselftest: Add test to verify probe of devices from discoverable buses") Signed-off-by: Laura Nao <[email protected]> Reviewed-by: Muhammad Usama Anjum <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent 8400291 commit 170c966

File tree

1 file changed

+1
-1
lines changed
  • tools/testing/selftests/kselftest

1 file changed

+1
-1
lines changed

tools/testing/selftests/kselftest/ksft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def test_result(condition, description=""):
7070

7171

7272
def finished():
73-
if ksft_cnt["pass"] == ksft_num_tests:
73+
if ksft_cnt["pass"] + ksft_cnt["skip"] == ksft_num_tests:
7474
exit_code = KSFT_PASS
7575
else:
7676
exit_code = KSFT_FAIL

0 commit comments

Comments
 (0)