Skip to content

Commit 7530700

Browse files
committed
selftest/livepatch: Only run test-kprobe with CONFIG_KPROBES_ON_FTRACE
JIRA: https://issues.redhat.com/browse/RHEL-114915 commit 59481b8 Author: Song Liu <song@kernel.org> Date: Tue, 18 Mar 2025 11:15:18 -0700 CONFIG_KPROBES_ON_FTRACE is required for test-kprobe. Skip test-kprobe when CONFIG_KPROBES_ON_FTRACE is not set. Since some kernel may not have /proc/config.gz, grep for kprobe_ftrace_ops from /proc/kallsyms to check whether CONFIG_KPROBES_ON_FTRACE is enabled. Signed-off-by: Song Liu <song@kernel.org> Acked-by: Joe Lawrence <joe.lawrence@redhat.com> Acked-by: Miroslav Benes <mbenes@suse.cz> Link: https://lore.kernel.org/r/20250318181518.1055532-1-song@kernel.org [pmladek@suse.com: Call grep with -q option.] Reviewed-by: Petr Mladek <pmladek@suse.com> Tested-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Rado Vrbovsky <rvrbovsk@redhat.com>
1 parent a9de90a commit 7530700

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/testing/selftests/livepatch/test-kprobe.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
. $(dirname $0)/functions.sh
77

8+
grep -q kprobe_ftrace_ops /proc/kallsyms || skip "test-kprobe requires CONFIG_KPROBES_ON_FTRACE"
9+
810
MOD_LIVEPATCH=test_klp_livepatch
911
MOD_KPROBE=test_klp_kprobe
1012

0 commit comments

Comments
 (0)