mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
selftests: ksft: Fix finished() helper exit code on skipped tests
[ Upstream commit170c966cbe
] 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:dacf1d7a78
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
0c7c3dc546
commit
6eefe92f2e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user