]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests: vm: return Kselftest Skip code for skipped tests
authorShuah Khan (Samsung OSG) <shuah@kernel.org>
Thu, 14 Jun 2018 03:31:43 +0000 (21:31 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:06:40 +0000 (13:06 +0200)
commit0fca223f6d2519dec6fbf0cf0d86b556208f253b
treec7403ee97e2a969ef1214b821dd7b0c6e450f537
parentc161e8a62529a104f9b1b566ef8a1b580d1c505e
selftests: vm: return Kselftest Skip code for skipped tests

[ Upstream commit a4d7537789724985cafbc9260a31ca4f2b7cf123 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/vm/compaction_test.c
tools/testing/selftests/vm/mlock2-tests.c
tools/testing/selftests/vm/run_vmtests
tools/testing/selftests/vm/userfaultfd.c