From: Luis Chamberlain Date: Tue, 14 May 2019 22:45:01 +0000 (-0700) Subject: tools/testing/selftests/sysctl/sysctl.sh: load module before testing for it X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~2895^2~44 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=5a12928ea8cf945ae66a115f1ad5c21c234285a8;p=mirror_ubuntu-focal-kernel.git tools/testing/selftests/sysctl/sysctl.sh: load module before testing for it Currently the test script checks for the existence of the sysctl test module's directory path prior to loading it. We must first try to load the module prior to checking for that path. This fixes the order for the load / test. Link: http://lkml.kernel.org/r/20190320222831.8243-3-mcgrof@kernel.org Signed-off-by: Luis Chamberlain Acked-by: Kees Cook Cc: Eric Sandeen Cc: Eric Sandeen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/tools/testing/selftests/sysctl/sysctl.sh b/tools/testing/selftests/sysctl/sysctl.sh index 87df7e52a97a..e0c8404da6b0 100755 --- a/tools/testing/selftests/sysctl/sysctl.sh +++ b/tools/testing/selftests/sysctl/sysctl.sh @@ -823,8 +823,8 @@ function parse_args() test_reqs allow_user_defaults check_production_sysctl_writes_strict -test_modprobe load_req_mod +test_modprobe trap "test_finish" EXIT