From: Juri Lelli <juri.lelli@redhat.com>
To: Gabriele Monaco <gmonaco@redhat.com>
Cc: Shuah Khan <shuah@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Valentin Schneider <vschneid@redhat.com>,
Clark Williams <williams@redhat.com>,
Tommaso Cucinotta <tommaso.cucinotta@santannapisa.it>,
Luca Abeni <luca.abeni@santannapisa.it>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH RFC 1/7] selftests/sched: Add SCHED_DEADLINE test framework infrastructure
Date: Mon, 9 Mar 2026 10:10:39 +0100 [thread overview]
Message-ID: <aa6Oj9beuCtpS0nk@jlelli-thinkpadt14gen4.remote.csb> (raw)
In-Reply-To: <2c4e24ac7c9f39804d2122316cb42a7cabdda2e6.camel@redhat.com>
On 09/03/26 09:20, Gabriele Monaco wrote:
> On Fri, 2026-03-06 at 17:10 +0100, Juri Lelli wrote:
> > Add the foundational infrastructure for SCHED_DEADLINE scheduler tests
> > following the pattern established by sched_ext selftests. This provides
> > a clean, extensible framework for testing SCHED_DEADLINE functionality.
> >
> > The framework uses ELF constructors for automatic test registration,
> > allowing new tests to be added simply by defining a struct dl_test and
> > calling REGISTER_DL_TEST(). The runner discovers all registered tests
> > at runtime and executes them serially, providing a simple and consistent
> > way to expand test coverage without modifying the test runner itself.
> >
> > The framework provides a complete test lifecycle with setup, run, and
> > cleanup phases for each test. Tests can be filtered by name, listed for
> > inspection, or run in quiet mode for automated testing environments. The
> > framework includes assertion macros such as DL_EQ and DL_FAIL_IF to
> > simplify test authoring and provide consistent error reporting. Signal
> > handling ensures graceful interruption and cleanup when tests are
> > terminated early.
> >
> > This commit establishes the framework without any actual tests. Tests
> > will be added in subsequent patches. The framework design is inspired by
> > tools/testing/selftests/sched_ext/ but tailored for SCHED_DEADLINE
> > testing needs.
> >
> > Assisted-by: Claude Code: claude-sonnet-4-5@20250929
> > Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
> > ---
> > tools/testing/selftests/sched/deadline/.gitignore | 3 +
> > tools/testing/selftests/sched/deadline/Makefile | 34 ++++
> > tools/testing/selftests/sched/deadline/dl_test.h | 238
> > ++++++++++++++++++++++
> > tools/testing/selftests/sched/deadline/runner.c | 219 ++++++++++++++++++++
> > 4 files changed, 494 insertions(+)
> >
>
> I wonder if this runner couldn't be made generic, something like not mentioning
> DL in any of the helpers, keep runner.c in tools/testing/selftests/sched/ and
> have a tools/testing/selftests/sched/deadline/Makefile glue all required objects
> together for the deadline tests (or anything else).
>
> That would probably make adding new tests much easier without code duplication.
Yeah, guess we can do that. I started this with DEADLINE in mind, but if
people think the infra might be of help for adding tests for other
classes/policies, we can definitely restructure as you suggest.
Thanks for taking a look!
Best,
Juri
next prev parent reply other threads:[~2026-03-09 9:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 16:10 [PATCH RFC 0/7] selftests/sched: Add comprehensive SCHED_DEADLINE test suite Juri Lelli
2026-03-06 16:10 ` [PATCH RFC 1/7] selftests/sched: Add SCHED_DEADLINE test framework infrastructure Juri Lelli
2026-03-09 8:20 ` Gabriele Monaco
2026-03-09 9:10 ` Juri Lelli [this message]
2026-03-06 16:10 ` [PATCH RFC 2/7] selftests/sched: Add SCHED_DEADLINE utility library Juri Lelli
2026-03-11 9:39 ` Christian Loehle
2026-03-11 13:15 ` Juri Lelli
2026-03-06 16:10 ` [PATCH RFC 3/7] selftests/sched: Integrate SCHED_DEADLINE tests into kselftest framework Juri Lelli
2026-03-06 16:10 ` [PATCH RFC 4/7] selftests/sched: Add basic SCHED_DEADLINE functionality tests Juri Lelli
2026-03-09 8:15 ` Gabriele Monaco
2026-03-09 9:11 ` Juri Lelli
2026-03-06 16:10 ` [PATCH RFC 5/7] selftests/sched: Add SCHED_DEADLINE bandwidth tests to kselftest Juri Lelli
2026-03-11 9:31 ` Christian Loehle
2026-03-11 13:23 ` Juri Lelli
2026-03-11 13:44 ` Christian Loehle
2026-03-11 14:26 ` Christian Loehle
2026-03-12 10:43 ` Christian Loehle
2026-03-12 11:30 ` Christian Loehle
2026-03-12 14:13 ` Juri Lelli
2026-03-06 16:10 ` [PATCH RFC 6/7] selftests/sched: Add SCHED_DEADLINE fair_server " Juri Lelli
2026-03-06 16:10 ` [PATCH RFC 7/7] selftests/sched: Add SCHED_DEADLINE ENQUEUE_REPLENISH bug test Juri Lelli
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=aa6Oj9beuCtpS0nk@jlelli-thinkpadt14gen4.remote.csb \
--to=juri.lelli@redhat.com \
--cc=dietmar.eggemann@arm.com \
--cc=gmonaco@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luca.abeni@santannapisa.it \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=shuah@kernel.org \
--cc=tommaso.cucinotta@santannapisa.it \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=williams@redhat.com \
/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