From: Joe Lawrence <joe.lawrence@redhat.com>
To: Song Liu <song@kernel.org>
Cc: live-patching@vger.kernel.org, jpoimboe@kernel.org,
kernel-team@meta.com, jikos@kernel.org, mbenes@suse.cz,
pmladek@suse.com
Subject: Re: [PATCH v2] selftest/livepatch: Only run test-kprobe with CONFIG_KPROBES_ON_FTRACE
Date: Mon, 24 Mar 2025 13:57:30 -0400 [thread overview]
Message-ID: <Z+GdCmrrUjOWYqAo@redhat.com> (raw)
In-Reply-To: <20250318181518.1055532-1-song@kernel.org>
On Tue, Mar 18, 2025 at 11:15:18AM -0700, Song Liu wrote:
> 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>
>
> ---
>
> Changes v1 => v2:
> 1. Grep for kprobe_ftrace_ops in /proc/kallsyms, as some systems may not
> have /proc/config.gz
> ---
> tools/testing/selftests/livepatch/test-kprobe.sh | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/testing/selftests/livepatch/test-kprobe.sh b/tools/testing/selftests/livepatch/test-kprobe.sh
> index 115065156016..e514391c5454 100755
> --- a/tools/testing/selftests/livepatch/test-kprobe.sh
> +++ b/tools/testing/selftests/livepatch/test-kprobe.sh
> @@ -5,6 +5,8 @@
>
> . $(dirname $0)/functions.sh
>
> +grep kprobe_ftrace_ops /proc/kallsyms || skip "test-kprobe requires CONFIG_KPROBES_ON_FTRACE"
> +
> MOD_LIVEPATCH=test_klp_livepatch
> MOD_KPROBE=test_klp_kprobe
>
Super minor nit (maybe Petr can tweak on merging): this grep (without
-q) will dump the resulting search lines to the terminal while all other
existing tests only show "TEST: description .... ok" lines they pass.
Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
-- Joe
next prev parent reply other threads:[~2025-03-24 17:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 18:15 [PATCH v2] selftest/livepatch: Only run test-kprobe with CONFIG_KPROBES_ON_FTRACE Song Liu
2025-03-21 13:16 ` Miroslav Benes
2025-03-24 17:57 ` Joe Lawrence [this message]
2025-03-25 12:46 ` Petr Mladek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z+GdCmrrUjOWYqAo@redhat.com \
--to=joe.lawrence@redhat.com \
--cc=jikos@kernel.org \
--cc=jpoimboe@kernel.org \
--cc=kernel-team@meta.com \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=pmladek@suse.com \
--cc=song@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.