The livepatch kselftests set and restore dynamic debug to verify subsystem behavior through expected printk messages. The tests should first check that this facility is available, otherwise just skip running. Fixes: a2818ee4dce5 ("selftests/livepatch: introduce tests") Signed-off-by: Joe Lawrence <joe.lawrence@xxxxxxxxxx> --- tools/testing/selftests/livepatch/functions.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh index 15601402dee6..92bc083225a6 100644 --- a/tools/testing/selftests/livepatch/functions.sh +++ b/tools/testing/selftests/livepatch/functions.sh @@ -58,6 +58,9 @@ function die() { } function push_config() { + if [[ ! -e "$SYSFS_DEBUG_DIR/dynamic_debug" ]]; then + skip "test requires CONFIG_DYNAMIC_DEBUG" + fi DYNAMIC_DEBUG=$(grep '^kernel/livepatch' "$SYSFS_DEBUG_DIR/dynamic_debug/control" | \ awk -F'[: ]' '{print "file " $1 " line " $2 " " $4}') FTRACE_ENABLED=$(sysctl --values kernel.ftrace_enabled) -- 2.42.0