diff mbox series

[B,SRU,2/3] selftests: kselftest: change KSFT_SKIP=4 instead of KSFT_PASS

Message ID 20190118091119.9108-3-po-hsu.lin@canonical.com
State New
Headers show
Series selftests: user: return Kselftest Skip code for skipped tests | expand

Commit Message

Po-Hsu Lin Jan. 18, 2019, 9:11 a.m. UTC
From: "Shuah Khan (Samsung OSG)" <shuah@kernel.org>

BugLink: https://bugs.launchpad.net/bugs/1812198

KSFT_SKIP points to KSFT_PASS resulting in reporting skipped tests as
Passed, when test programs exit with KSFT_SKIP or call ksft_exit_skip().
If tests are skipped because of unmet dependencies and/or unsupported
configuration, reporting them as passed leads to too many false positives.

Fix it to return a skip code of 4 to clearly differentiate the skipped
tests.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
(cherry picked from commit 3c07aaef65988473c6cea5bd194125f905953fcc)
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
---
 tools/testing/selftests/kselftest.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h
index 1ae565e..974853e 100644
--- a/tools/testing/selftests/kselftest.h
+++ b/tools/testing/selftests/kselftest.h
@@ -20,7 +20,7 @@ 
 #define KSFT_XFAIL 2
 #define KSFT_XPASS 3
 /* Treat skip as pass */
-#define KSFT_SKIP  KSFT_PASS
+#define KSFT_SKIP  4
 
 /* counters */
 struct ksft_count {