init: main: add KUnit to kernel init
authorBrendan Higgins <brendanhiggins@google.com>
Tue, 4 Aug 2020 20:47:43 +0000 (13:47 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 9 Oct 2020 20:37:43 +0000 (14:37 -0600)
commit8c0d884986ba22f1020be9c02e41c030890ee8f2
tree584279bf3ffd79e30f3ed99519e70931dc8c9543
parentaac35468ca20a3a0e75a24c13c0e31610727f120
init: main: add KUnit to kernel init

Although we have not seen any actual examples where KUnit doesn't work
because it runs in the late init phase of the kernel, it has been a
concern for some time that this could potentially be an issue in the
future. So, remove KUnit from init calls entirely, instead call directly
from kernel_init() so that KUnit runs after late init.

Co-developed-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
include/kunit/test.h
init/main.c
lib/kunit/executor.c