From: Steven Rostedt <rostedt@goodmis.org>
To: Song Liu <song@kernel.org>
Cc: Andrey Grodzovsky <andrey.grodzovsky@crowdstrike.com>,
bpf@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
live-patching@vger.kernel.org, mbenes@suse.cz, jolsa@kernel.org,
mhiramat@kernel.org, jpoimboe@kernel.org,
joe.lawrence@redhat.com, mark.rutland@arm.com, corbet@lwn.net,
stable@vger.kernel.org, linux-open-source@crowdstrike.com
Subject: Re: [RFC PATCH bpf-next v3 2/2] selftests/livepatch: update test-ftrace.sh for deprecated ftrace_enabled
Date: Fri, 7 Aug 2026 08:42:57 -0400 [thread overview]
Message-ID: <20260807084257.56a5984e@gandalf.local.home> (raw)
In-Reply-To: <CAPhsuW7vPwX-BGWmtMhA8dYwDOQYQLVXOUddZPbTvoazMpaKgA@mail.gmail.com>
On Fri, 7 Aug 2026 00:17:27 -0700
Song Liu <song@kernel.org> wrote:
>
> However, requiring compatibility in selftests has its own issues:
>
> 1) It makes writing and/or maintaining selftests harder. For example,
> shall the selftest for a new feature fail or skip on older kernels.
Skip. It's a feature of our test suite.
> Either way, some extra work is required to handle this, e.g.,
> someone need to remember that this kernel-test combination is
> expected to fail, and it is OK.
We explicitly require that new features are detectable (sometimes by just
updating /sys/kernel/tracing/README). The ftracetests has a way to see the
dependencies to know if a test should be run or not.
We have a "requires:" field at the top of every test case. For example, in
test.d/filter/event-filter-function.tc:
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# description: event filter function - test event filtering on functions
# requires: set_event events/kmem/kmem_cache_free/filter
# flags: instance
If "set_event" or "events/kmem/kmem_cache_free/filter" does not exist, the
test will be skipped.
> 2) It delays the actual deprecation of a feature. IOW, the feature will
> somehow stays in the selftests for much longer time.
We do not deprecate features. tracefs code is user API. We do not break
user space. The ftrace_enabled is something that is being removed because
it is broken to begin with. In fact, if we find out that anything depends
on ftrace_enabled, we need to revert the change that disabled it.
The removal of ftrace_enabled is the exception and not the rule.
>
> Overall, I think requiring backward compatibility appears to be
> attractive when we go from "having very little selftests" to
> "having some selftest coverage". However, not requiring backward
> compatibility will help us achieve better test coverage in the long run.
The ftrace selftest requirements are different than the BPF requirements.
We have been supporting this since 2014 without issue. And have actually
found making things backward compatible helpful. We are not going to change
that.
I hope that makes sense.
-- Steve
next prev parent reply other threads:[~2026-08-07 12:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 15:29 [RFC PATCH bpf-next v3 0/2] ftrace: deprecate the ftrace_enabled disable switch Andrey Grodzovsky
2026-08-06 15:29 ` [RFC PATCH bpf-next v3 1/2] ftrace: deprecate disabling via ftrace_enabled sysctl Andrey Grodzovsky
2026-08-06 21:21 ` Song Liu
2026-08-06 21:52 ` Andrey Grodzovsky
2026-08-09 18:32 ` Andrey Grodzovsky
2026-08-06 15:30 ` [RFC PATCH bpf-next v3 2/2] selftests/livepatch: update test-ftrace.sh for deprecated ftrace_enabled Andrey Grodzovsky
2026-08-06 21:18 ` Song Liu
2026-08-06 21:45 ` Andrey Grodzovsky
2026-08-07 0:51 ` Steven Rostedt
2026-08-07 7:17 ` Song Liu
2026-08-07 12:42 ` Steven Rostedt [this message]
2026-08-07 16:16 ` Song Liu
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=20260807084257.56a5984e@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=andrey.grodzovsky@crowdstrike.com \
--cc=bpf@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=joe.lawrence@redhat.com \
--cc=jolsa@kernel.org \
--cc=jpoimboe@kernel.org \
--cc=linux-open-source@crowdstrike.com \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mbenes@suse.cz \
--cc=mhiramat@kernel.org \
--cc=song@kernel.org \
--cc=stable@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox