Skip to content
Commit 527d37e9 authored by Joe Lawrence's avatar Joe Lawrence Committed by Shuah Khan
Browse files

selftests/livepatch: add test skip handling



Add a skip() message function that stops the test, logs an explanation,
and sets the "skip" return code (4).

Before loading a livepatch self-test kernel module, first verify that
we've built and installed it by running a 'modprobe --dry-run'.  This
should catch a few environment issues, including !CONFIG_LIVEPATCH and
!CONFIG_TEST_LIVEPATCH.  In these cases, exit gracefully with the new
skip() function.

Reported-by: default avatarJiri Benc <jbenc@redhat.com>
Suggested-by: default avatarShuah Khan <shuah@kernel.org>
Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
Signed-off-by: default avatarJoe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 2e05ec48
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment