From 7d1e9e121eb9a58e9dc11dc53ab81b24df1db388 Mon Sep 17 00:00:00 2001 From: George Guo Date: Tue, 26 Nov 2024 15:20:45 +0800 Subject: [PATCH] selftests/livepatch: fix selftest execution error kylin inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB7CZ5 --------------------------------------------------------------------------- The selftest scripts fails with the following error: $ sudo ./test-callbacks.sh TEST: target module before livepatch ... not ok $ sudo ./test-ftrace.sh TEST: livepatch interaction with ftrace_enabled sysctl ... not ok $ sudo ./test-livepatch.sh TEST: basic function patching ... not ok $ sudo ./test-state.sh TEST: system state modification ... not ok $ sudo ./test-syscall.sh TEST: patch getpid syscall while being heavily hammered ... not ok $ sudo ./test-sysfs.sh TEST: sysfs test ... not ok Fixes: 601dd19ce894 ("livepatch/core: Reuse common codes in the solution without ftrace") Signed-off-by: George Guo --- kernel/livepatch/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/livepatch/Makefile b/kernel/livepatch/Makefile index facf512b237a..4467c47365db 100644 --- a/kernel/livepatch/Makefile +++ b/kernel/livepatch/Makefile @@ -1,5 +1,8 @@ # SPDX-License-Identifier: GPL-2.0-only obj-$(CONFIG_LIVEPATCH) += livepatch.o -obj-$(CONFIG_LIVEPATCH_FTRACE) += patch.o shadow.o state.o transition.o +ifeq ($(CONFIG_LIVEPATCH_FTRACE), y) +livepatch-objs := core.o patch.o shadow.o state.o transition.o +else livepatch-objs := core.o +endif -- Gitee