summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/vm/compaction_test.c
diff options
context:
space:
mode:
authorShuah Khan (Samsung OSG) <shuah@kernel.org>2018-06-13 21:31:43 -0600
committerShuah Khan (Samsung OSG) <shuah@kernel.org>2018-06-18 09:11:10 -0600
commita4d7537789724985cafbc9260a31ca4f2b7cf123 (patch)
tree76e6ab57460e803874f61b93662e22f9e3b20261 /tools/testing/selftests/vm/compaction_test.c
parent685814466bf8398192cf855415a0bb2cefc1930e (diff)
downloadlinux-a4d7537789724985cafbc9260a31ca4f2b7cf123.tar.bz2
selftests: vm: return Kselftest Skip code for skipped tests
When vm test is skipped because of unmet dependencies and/or unsupported configuration, it exits with error which is treated as a fail by the Kselftest framework. This leads to false negative result even when the test could not be run. Change it to return kselftest skip code when a test gets skipped to clearly report that the test could not be run. Kselftest framework SKIP code is 4 and the framework prints appropriate messages to indicate that the test is skipped. Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org> Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Diffstat (limited to 'tools/testing/selftests/vm/compaction_test.c')
-rw-r--r--tools/testing/selftests/vm/compaction_test.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/vm/compaction_test.c b/tools/testing/selftests/vm/compaction_test.c
index 1097f04e4d80..bcec71250873 100644
--- a/tools/testing/selftests/vm/compaction_test.c
+++ b/tools/testing/selftests/vm/compaction_test.c
@@ -16,6 +16,8 @@
#include <unistd.h>
#include <string.h>
+#include "../kselftest.h"
+
#define MAP_SIZE 1048576
struct map_list {
@@ -169,7 +171,7 @@ int main(int argc, char **argv)
printf("Either the sysctl compact_unevictable_allowed is not\n"
"set to 1 or couldn't read the proc file.\n"
"Skipping the test\n");
- return 0;
+ return KSFT_SKIP;
}
lim.rlim_cur = RLIM_INFINITY;