selftests: sysctl: return Kselftest Skip code for skipped tests
authorShuah Khan (Samsung OSG) <shuah@kernel.org>
Wed, 13 Jun 2018 00:11:37 +0000 (18:11 -0600)
committerShuah Khan (Samsung OSG) <shuah@kernel.org>
Mon, 18 Jun 2018 15:11:09 +0000 (09:11 -0600)
commitc7db6ffb831fd36a03485a0d88b1e505378975ad
tree3e22feabc50e213230923aeec69725b7879074ca
parent8781578087b8fb8829558bac96c3c24e5ba26f82
selftests: sysctl: return Kselftest Skip code for skipped tests

When sysctl 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.

Changed return code to kselftest skip code in skip error legs that check
requirements and module probe test error leg.

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>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
tools/testing/selftests/sysctl/sysctl.sh