selftests/sysctl: Fix to load test_sysctl module
authorMasami Hiramatsu <mhiramat@kernel.org>
Thu, 28 May 2020 14:52:26 +0000 (23:52 +0900)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 2 Jun 2020 16:26:46 +0000 (10:26 -0600)
commiteee470e0739a9d8e29460f6d355cefa1c9a0384a
tree389abc6daadf703f866aecb25ee1ca8f115bb9f8
parent2f56f84511367ce5ffd4a1c88dcd770ef049ea96
selftests/sysctl: Fix to load test_sysctl module

Fix to load test_sysctl.ko module correctly.

sysctl.sh checks whether the test module is embedded (or loaded
already) or not at first, and if not, it returns skip error
instead of trying modprobe. Thus, there is no chance to load the
test_sysctl test module.

Instead, this removes that module embedded check and returns
skip error only if it ensures that there is no embedded test
module *and* no loadable test module.

This also avoid referring config file since that is not
installed.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/sysctl/sysctl.sh