[PATCH] selftests: ksft: Track skipped tests when finishing the test suite

From: Laura Nao
Date: Mon Jul 22 2024 - 11:43:21 EST


Consider skipped tests in addition to passed tests when evaluating the
overall result of the test suite in the finished() helper.

Signed-off-by: Laura Nao <laura.nao@xxxxxxxxxxxxx>
---
tools/testing/selftests/kselftest/ksft.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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
--
2.30.2