* [PATCH] drm/tests: Mark slow tests as slow
@ 2026-02-24 11:03 Maxime Ripard
2026-02-24 11:12 ` Thomas Zimmermann
` (5 more replies)
0 siblings, 6 replies; 15+ messages in thread
From: Maxime Ripard @ 2026-02-24 11:03 UTC (permalink / raw)
To: Matthew Brost, Danilo Krummrich, Philipp Stanner,
Christian Koenig, Maarten Lankhorst, Thomas Zimmermann,
Maxime Ripard, Matthew Auld, Arun Pravin
Cc: Simona Vetter, David Airlie, dri-devel
Some DRM tests cross the 1s execution time threshold that defines a test
as slow. Let's flag them as such.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
drivers/gpu/drm/scheduler/tests/tests_basic.c | 4 ++--
drivers/gpu/drm/tests/drm_buddy_test.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/scheduler/tests/tests_basic.c b/drivers/gpu/drm/scheduler/tests/tests_basic.c
index 82a41a456b0a..a5a5a35a87b0 100644
--- a/drivers/gpu/drm/scheduler/tests/tests_basic.c
+++ b/drivers/gpu/drm/scheduler/tests/tests_basic.c
@@ -419,11 +419,11 @@ static void drm_sched_change_priority(struct kunit *test)
drm_mock_sched_entity_free(entity[i]);
}
static struct kunit_case drm_sched_priority_tests[] = {
KUNIT_CASE(drm_sched_priorities),
- KUNIT_CASE(drm_sched_change_priority),
+ KUNIT_CASE_SLOW(drm_sched_change_priority),
{}
};
static struct kunit_suite drm_sched_priority = {
.name = "drm_sched_basic_priority_tests",
@@ -544,11 +544,11 @@ static void drm_sched_test_credits(struct kunit *test)
drm_mock_sched_entity_free(entity);
drm_mock_sched_fini(sched);
}
static struct kunit_case drm_sched_credits_tests[] = {
- KUNIT_CASE(drm_sched_test_credits),
+ KUNIT_CASE_SLOW(drm_sched_test_credits),
{}
};
static struct kunit_suite drm_sched_credits = {
.name = "drm_sched_basic_credits_tests",
diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c
index e6f8459c6c54..35ca79525f43 100644
--- a/drivers/gpu/drm/tests/drm_buddy_test.c
+++ b/drivers/gpu/drm/tests/drm_buddy_test.c
@@ -908,11 +908,11 @@ static struct kunit_case drm_buddy_tests[] = {
KUNIT_CASE(drm_test_buddy_alloc_pessimistic),
KUNIT_CASE(drm_test_buddy_alloc_pathological),
KUNIT_CASE(drm_test_buddy_alloc_contiguous),
KUNIT_CASE(drm_test_buddy_alloc_clear),
KUNIT_CASE(drm_test_buddy_alloc_range_bias),
- KUNIT_CASE(drm_test_buddy_fragmentation_performance),
+ KUNIT_CASE_SLOW(drm_test_buddy_fragmentation_performance),
KUNIT_CASE(drm_test_buddy_alloc_exceeds_max_order),
{}
};
static struct kunit_suite drm_buddy_test_suite = {
--
2.52.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/tests: Mark slow tests as slow
2026-02-24 11:03 [PATCH] drm/tests: Mark slow tests as slow Maxime Ripard
@ 2026-02-24 11:12 ` Thomas Zimmermann
2026-02-24 11:43 ` Danilo Krummrich
` (4 subsequent siblings)
5 siblings, 0 replies; 15+ messages in thread
From: Thomas Zimmermann @ 2026-02-24 11:12 UTC (permalink / raw)
To: Maxime Ripard, Matthew Brost, Danilo Krummrich, Philipp Stanner,
Christian Koenig, Maarten Lankhorst, Matthew Auld, Arun Pravin
Cc: Simona Vetter, David Airlie, dri-devel
Am 24.02.26 um 12:03 schrieb Maxime Ripard:
> Some DRM tests cross the 1s execution time threshold that defines a test
> as slow. Let's flag them as such.
>
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/gpu/drm/scheduler/tests/tests_basic.c | 4 ++--
> drivers/gpu/drm/tests/drm_buddy_test.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/scheduler/tests/tests_basic.c b/drivers/gpu/drm/scheduler/tests/tests_basic.c
> index 82a41a456b0a..a5a5a35a87b0 100644
> --- a/drivers/gpu/drm/scheduler/tests/tests_basic.c
> +++ b/drivers/gpu/drm/scheduler/tests/tests_basic.c
> @@ -419,11 +419,11 @@ static void drm_sched_change_priority(struct kunit *test)
> drm_mock_sched_entity_free(entity[i]);
> }
>
> static struct kunit_case drm_sched_priority_tests[] = {
> KUNIT_CASE(drm_sched_priorities),
> - KUNIT_CASE(drm_sched_change_priority),
> + KUNIT_CASE_SLOW(drm_sched_change_priority),
> {}
> };
>
> static struct kunit_suite drm_sched_priority = {
> .name = "drm_sched_basic_priority_tests",
> @@ -544,11 +544,11 @@ static void drm_sched_test_credits(struct kunit *test)
> drm_mock_sched_entity_free(entity);
> drm_mock_sched_fini(sched);
> }
>
> static struct kunit_case drm_sched_credits_tests[] = {
> - KUNIT_CASE(drm_sched_test_credits),
> + KUNIT_CASE_SLOW(drm_sched_test_credits),
> {}
> };
>
> static struct kunit_suite drm_sched_credits = {
> .name = "drm_sched_basic_credits_tests",
> diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c
> index e6f8459c6c54..35ca79525f43 100644
> --- a/drivers/gpu/drm/tests/drm_buddy_test.c
> +++ b/drivers/gpu/drm/tests/drm_buddy_test.c
> @@ -908,11 +908,11 @@ static struct kunit_case drm_buddy_tests[] = {
> KUNIT_CASE(drm_test_buddy_alloc_pessimistic),
> KUNIT_CASE(drm_test_buddy_alloc_pathological),
> KUNIT_CASE(drm_test_buddy_alloc_contiguous),
> KUNIT_CASE(drm_test_buddy_alloc_clear),
> KUNIT_CASE(drm_test_buddy_alloc_range_bias),
> - KUNIT_CASE(drm_test_buddy_fragmentation_performance),
> + KUNIT_CASE_SLOW(drm_test_buddy_fragmentation_performance),
> KUNIT_CASE(drm_test_buddy_alloc_exceeds_max_order),
> {}
> };
>
> static struct kunit_suite drm_buddy_test_suite = {
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/tests: Mark slow tests as slow
2026-02-24 11:03 [PATCH] drm/tests: Mark slow tests as slow Maxime Ripard
2026-02-24 11:12 ` Thomas Zimmermann
@ 2026-02-24 11:43 ` Danilo Krummrich
2026-02-24 12:29 ` Tvrtko Ursulin
2026-02-24 12:49 ` Tvrtko Ursulin
` (3 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Danilo Krummrich @ 2026-02-24 11:43 UTC (permalink / raw)
To: Maxime Ripard
Cc: Matthew Brost, Philipp Stanner, Christian Koenig,
Maarten Lankhorst, Thomas Zimmermann, Matthew Auld, Arun Pravin,
Simona Vetter, David Airlie, dri-devel, Tvrtko Ursulin
(Cc: Tvrtko)
On Tue Feb 24, 2026 at 12:03 PM CET, Maxime Ripard wrote:
> Some DRM tests cross the 1s execution time threshold that defines a test
> as slow. Let's flag them as such.
<snip>
> static struct kunit_case drm_sched_credits_tests[] = {
> - KUNIT_CASE(drm_sched_test_credits),
> + KUNIT_CASE_SLOW(drm_sched_test_credits),
Hm..I don't think this test should be that slow.
Looking at the code, I see intentional timeouts through:
done = drm_mock_sched_job_wait_scheduled(job[1], HZ);
KUNIT_ASSERT_FALSE(test, done);
Since the timeout is in jiffies, this should be always 1s, which seems a bit
overkill.
Maybe we should just change this to msecs_to_jiffies(200), which should still be
plenty and keep the test below 500ms.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/tests: Mark slow tests as slow
2026-02-24 11:43 ` Danilo Krummrich
@ 2026-02-24 12:29 ` Tvrtko Ursulin
2026-02-24 12:44 ` Philipp Stanner
0 siblings, 1 reply; 15+ messages in thread
From: Tvrtko Ursulin @ 2026-02-24 12:29 UTC (permalink / raw)
To: Danilo Krummrich, Maxime Ripard
Cc: Matthew Brost, Philipp Stanner, Christian Koenig,
Maarten Lankhorst, Thomas Zimmermann, Matthew Auld, Arun Pravin,
Simona Vetter, David Airlie, dri-devel
On 24/02/2026 11:43, Danilo Krummrich wrote:
> (Cc: Tvrtko)
>
> On Tue Feb 24, 2026 at 12:03 PM CET, Maxime Ripard wrote:
>> Some DRM tests cross the 1s execution time threshold that defines a test
>> as slow. Let's flag them as such.
>
> <snip>
>
>> static struct kunit_case drm_sched_credits_tests[] = {
>> - KUNIT_CASE(drm_sched_test_credits),
>> + KUNIT_CASE_SLOW(drm_sched_test_credits),
>
> Hm..I don't think this test should be that slow.
>
> Looking at the code, I see intentional timeouts through:
>
> done = drm_mock_sched_job_wait_scheduled(job[1], HZ);
> KUNIT_ASSERT_FALSE(test, done);
>
> Since the timeout is in jiffies, this should be always 1s, which seems a bit
> overkill.
>
> Maybe we should just change this to msecs_to_jiffies(200), which should still be
> plenty and keep the test below 500ms.
Right, 200ms should be more than plenty. It is only making sure the
scheduler is not oversubscribing the configured credits, and the delay
needed to be sure about that is around two worker wake up to run cycles.
Regards,
Tvrtko
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/tests: Mark slow tests as slow
2026-02-24 12:29 ` Tvrtko Ursulin
@ 2026-02-24 12:44 ` Philipp Stanner
0 siblings, 0 replies; 15+ messages in thread
From: Philipp Stanner @ 2026-02-24 12:44 UTC (permalink / raw)
To: Tvrtko Ursulin, Danilo Krummrich, Maxime Ripard
Cc: Matthew Brost, Philipp Stanner, Christian Koenig,
Maarten Lankhorst, Thomas Zimmermann, Matthew Auld, Arun Pravin,
Simona Vetter, David Airlie, dri-devel
On Tue, 2026-02-24 at 12:29 +0000, Tvrtko Ursulin wrote:
>
> On 24/02/2026 11:43, Danilo Krummrich wrote:
> > (Cc: Tvrtko)
> >
> > On Tue Feb 24, 2026 at 12:03 PM CET, Maxime Ripard wrote:
> > > Some DRM tests cross the 1s execution time threshold that defines a test
> > > as slow. Let's flag them as such.
> >
> > <snip>
> >
> > > static struct kunit_case drm_sched_credits_tests[] = {
> > > - KUNIT_CASE(drm_sched_test_credits),
> > > + KUNIT_CASE_SLOW(drm_sched_test_credits),
> >
> > Hm..I don't think this test should be that slow.
> >
> > Looking at the code, I see intentional timeouts through:
> >
> > done = drm_mock_sched_job_wait_scheduled(job[1], HZ);
> > KUNIT_ASSERT_FALSE(test, done);
> >
> > Since the timeout is in jiffies, this should be always 1s, which seems a bit
> > overkill.
> >
> > Maybe we should just change this to msecs_to_jiffies(200), which should still be
> > plenty and keep the test below 500ms.
>
> Right, 200ms should be more than plenty.
>
Who volunteers for implementing that change? :)
P.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/tests: Mark slow tests as slow
2026-02-24 11:03 [PATCH] drm/tests: Mark slow tests as slow Maxime Ripard
2026-02-24 11:12 ` Thomas Zimmermann
2026-02-24 11:43 ` Danilo Krummrich
@ 2026-02-24 12:49 ` Tvrtko Ursulin
2026-02-26 10:56 ` Maxime Ripard
2026-02-24 13:07 ` Arunpravin Paneer Selvam
` (2 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Tvrtko Ursulin @ 2026-02-24 12:49 UTC (permalink / raw)
To: Maxime Ripard, Matthew Brost, Danilo Krummrich, Philipp Stanner,
Christian Koenig, Maarten Lankhorst, Thomas Zimmermann,
Matthew Auld, Arun Pravin
Cc: Simona Vetter, David Airlie, dri-devel
On 24/02/2026 11:03, Maxime Ripard wrote:
> Some DRM tests cross the 1s execution time threshold that defines a test
> as slow. Let's flag them as such.
Curious that both did not trigger for me and I even run them under
nested qemu most of the time.
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
> ---
> drivers/gpu/drm/scheduler/tests/tests_basic.c | 4 ++--
> drivers/gpu/drm/tests/drm_buddy_test.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/scheduler/tests/tests_basic.c b/drivers/gpu/drm/scheduler/tests/tests_basic.c
> index 82a41a456b0a..a5a5a35a87b0 100644
> --- a/drivers/gpu/drm/scheduler/tests/tests_basic.c
> +++ b/drivers/gpu/drm/scheduler/tests/tests_basic.c
> @@ -419,11 +419,11 @@ static void drm_sched_change_priority(struct kunit *test)
> drm_mock_sched_entity_free(entity[i]);
> }
>
> static struct kunit_case drm_sched_priority_tests[] = {
> KUNIT_CASE(drm_sched_priorities),
> - KUNIT_CASE(drm_sched_change_priority),
> + KUNIT_CASE_SLOW(drm_sched_change_priority),
This one deliberately aims to run for ~1s and I don't have an immediate
idea how it would go over 2s.
> {}
> };
>
> static struct kunit_suite drm_sched_priority = {
> .name = "drm_sched_basic_priority_tests",
> @@ -544,11 +544,11 @@ static void drm_sched_test_credits(struct kunit *test)
> drm_mock_sched_entity_free(entity);
> drm_mock_sched_fini(sched);
> }
>
> static struct kunit_case drm_sched_credits_tests[] = {
> - KUNIT_CASE(drm_sched_test_credits),
> + KUNIT_CASE_SLOW(drm_sched_test_credits),
Same really.
Anyway, the scheduler parts LGTM and I can follow up trying to optimise
these two later.
For the scheduler:
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Regards,
Tvrtko
> {}
> };
>
> static struct kunit_suite drm_sched_credits = {
> .name = "drm_sched_basic_credits_tests",
> diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c
> index e6f8459c6c54..35ca79525f43 100644
> --- a/drivers/gpu/drm/tests/drm_buddy_test.c
> +++ b/drivers/gpu/drm/tests/drm_buddy_test.c
> @@ -908,11 +908,11 @@ static struct kunit_case drm_buddy_tests[] = {
> KUNIT_CASE(drm_test_buddy_alloc_pessimistic),
> KUNIT_CASE(drm_test_buddy_alloc_pathological),
> KUNIT_CASE(drm_test_buddy_alloc_contiguous),
> KUNIT_CASE(drm_test_buddy_alloc_clear),
> KUNIT_CASE(drm_test_buddy_alloc_range_bias),
> - KUNIT_CASE(drm_test_buddy_fragmentation_performance),
> + KUNIT_CASE_SLOW(drm_test_buddy_fragmentation_performance),
> KUNIT_CASE(drm_test_buddy_alloc_exceeds_max_order),
> {}
> };
>
> static struct kunit_suite drm_buddy_test_suite = {
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/tests: Mark slow tests as slow
2026-02-24 11:03 [PATCH] drm/tests: Mark slow tests as slow Maxime Ripard
` (2 preceding siblings ...)
2026-02-24 12:49 ` Tvrtko Ursulin
@ 2026-02-24 13:07 ` Arunpravin Paneer Selvam
2026-02-27 5:13 ` Claude review: " Claude Code Review Bot
2026-02-27 5:13 ` Claude Code Review Bot
5 siblings, 0 replies; 15+ messages in thread
From: Arunpravin Paneer Selvam @ 2026-02-24 13:07 UTC (permalink / raw)
To: Maxime Ripard, Matthew Brost, Danilo Krummrich, Philipp Stanner,
Christian Koenig, Maarten Lankhorst, Thomas Zimmermann,
Matthew Auld
Cc: Simona Vetter, David Airlie, dri-devel
On 2/24/2026 4:33 PM, Maxime Ripard wrote:
> Some DRM tests cross the 1s execution time threshold that defines a test
> as slow. Let's flag them as such.
>
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
> ---
> drivers/gpu/drm/scheduler/tests/tests_basic.c | 4 ++--
> drivers/gpu/drm/tests/drm_buddy_test.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/scheduler/tests/tests_basic.c b/drivers/gpu/drm/scheduler/tests/tests_basic.c
> index 82a41a456b0a..a5a5a35a87b0 100644
> --- a/drivers/gpu/drm/scheduler/tests/tests_basic.c
> +++ b/drivers/gpu/drm/scheduler/tests/tests_basic.c
> @@ -419,11 +419,11 @@ static void drm_sched_change_priority(struct kunit *test)
> drm_mock_sched_entity_free(entity[i]);
> }
>
> static struct kunit_case drm_sched_priority_tests[] = {
> KUNIT_CASE(drm_sched_priorities),
> - KUNIT_CASE(drm_sched_change_priority),
> + KUNIT_CASE_SLOW(drm_sched_change_priority),
> {}
> };
>
> static struct kunit_suite drm_sched_priority = {
> .name = "drm_sched_basic_priority_tests",
> @@ -544,11 +544,11 @@ static void drm_sched_test_credits(struct kunit *test)
> drm_mock_sched_entity_free(entity);
> drm_mock_sched_fini(sched);
> }
>
> static struct kunit_case drm_sched_credits_tests[] = {
> - KUNIT_CASE(drm_sched_test_credits),
> + KUNIT_CASE_SLOW(drm_sched_test_credits),
> {}
> };
>
> static struct kunit_suite drm_sched_credits = {
> .name = "drm_sched_basic_credits_tests",
> diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c
> index e6f8459c6c54..35ca79525f43 100644
> --- a/drivers/gpu/drm/tests/drm_buddy_test.c
> +++ b/drivers/gpu/drm/tests/drm_buddy_test.c
> @@ -908,11 +908,11 @@ static struct kunit_case drm_buddy_tests[] = {
> KUNIT_CASE(drm_test_buddy_alloc_pessimistic),
> KUNIT_CASE(drm_test_buddy_alloc_pathological),
> KUNIT_CASE(drm_test_buddy_alloc_contiguous),
> KUNIT_CASE(drm_test_buddy_alloc_clear),
> KUNIT_CASE(drm_test_buddy_alloc_range_bias),
> - KUNIT_CASE(drm_test_buddy_fragmentation_performance),
> + KUNIT_CASE_SLOW(drm_test_buddy_fragmentation_performance),
> KUNIT_CASE(drm_test_buddy_alloc_exceeds_max_order),
> {}
> };
For the buddy allocator part,
Reviewed-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
>
> static struct kunit_suite drm_buddy_test_suite = {
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/tests: Mark slow tests as slow
2026-02-24 12:49 ` Tvrtko Ursulin
@ 2026-02-26 10:56 ` Maxime Ripard
2026-02-26 12:42 ` Tvrtko Ursulin
0 siblings, 1 reply; 15+ messages in thread
From: Maxime Ripard @ 2026-02-26 10:56 UTC (permalink / raw)
To: Tvrtko Ursulin
Cc: Matthew Brost, Danilo Krummrich, Philipp Stanner,
Christian Koenig, Maarten Lankhorst, Thomas Zimmermann,
Matthew Auld, Arun Pravin, Simona Vetter, David Airlie, dri-devel
[-- Attachment #1: Type: text/plain, Size: 2228 bytes --]
Hi Tvrtko,
On Tue, Feb 24, 2026 at 12:49:01PM +0000, Tvrtko Ursulin wrote:
>
> On 24/02/2026 11:03, Maxime Ripard wrote:
> > Some DRM tests cross the 1s execution time threshold that defines a test
> > as slow. Let's flag them as such.
>
> Curious that both did not trigger for me and I even run them under nested
> qemu most of the time.
>
> > Signed-off-by: Maxime Ripard <mripard@kernel.org>
> > ---
> > drivers/gpu/drm/scheduler/tests/tests_basic.c | 4 ++--
> > drivers/gpu/drm/tests/drm_buddy_test.c | 2 +-
> > 2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/scheduler/tests/tests_basic.c b/drivers/gpu/drm/scheduler/tests/tests_basic.c
> > index 82a41a456b0a..a5a5a35a87b0 100644
> > --- a/drivers/gpu/drm/scheduler/tests/tests_basic.c
> > +++ b/drivers/gpu/drm/scheduler/tests/tests_basic.c
> > @@ -419,11 +419,11 @@ static void drm_sched_change_priority(struct kunit *test)
> > drm_mock_sched_entity_free(entity[i]);
> > }
> > static struct kunit_case drm_sched_priority_tests[] = {
> > KUNIT_CASE(drm_sched_priorities),
> > - KUNIT_CASE(drm_sched_change_priority),
> > + KUNIT_CASE_SLOW(drm_sched_change_priority),
>
> This one deliberately aims to run for ~1s and I don't have an immediate idea
> how it would go over 2s.
1s is the threshold for a slow test:
https://elixir.bootlin.com/linux/v6.19.3/source/lib/kunit/test.c#L365
It only warns about it if it crosses 2s, but if it's expected to take
1s, it should be flagged as such still.
> > {}
> > };
> > static struct kunit_suite drm_sched_priority = {
> > .name = "drm_sched_basic_priority_tests",
> > @@ -544,11 +544,11 @@ static void drm_sched_test_credits(struct kunit *test)
> > drm_mock_sched_entity_free(entity);
> > drm_mock_sched_fini(sched);
> > }
> > static struct kunit_case drm_sched_credits_tests[] = {
> > - KUNIT_CASE(drm_sched_test_credits),
> > + KUNIT_CASE_SLOW(drm_sched_test_credits),
>
> Same really.
>
> Anyway, the scheduler parts LGTM and I can follow up trying to optimise
> these two later.
>
> For the scheduler:
>
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/tests: Mark slow tests as slow
2026-02-26 10:56 ` Maxime Ripard
@ 2026-02-26 12:42 ` Tvrtko Ursulin
2026-02-26 12:48 ` Philipp Stanner
0 siblings, 1 reply; 15+ messages in thread
From: Tvrtko Ursulin @ 2026-02-26 12:42 UTC (permalink / raw)
To: Maxime Ripard
Cc: Matthew Brost, Danilo Krummrich, Philipp Stanner,
Christian Koenig, Maarten Lankhorst, Thomas Zimmermann,
Matthew Auld, Arun Pravin, Simona Vetter, David Airlie, dri-devel
On 26/02/2026 10:56, Maxime Ripard wrote:
> Hi Tvrtko,
>
> On Tue, Feb 24, 2026 at 12:49:01PM +0000, Tvrtko Ursulin wrote:
>>
>> On 24/02/2026 11:03, Maxime Ripard wrote:
>>> Some DRM tests cross the 1s execution time threshold that defines a test
>>> as slow. Let's flag them as such.
>>
>> Curious that both did not trigger for me and I even run them under nested
>> qemu most of the time.
>>
>>> Signed-off-by: Maxime Ripard <mripard@kernel.org>
>>> ---
>>> drivers/gpu/drm/scheduler/tests/tests_basic.c | 4 ++--
>>> drivers/gpu/drm/tests/drm_buddy_test.c | 2 +-
>>> 2 files changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/scheduler/tests/tests_basic.c b/drivers/gpu/drm/scheduler/tests/tests_basic.c
>>> index 82a41a456b0a..a5a5a35a87b0 100644
>>> --- a/drivers/gpu/drm/scheduler/tests/tests_basic.c
>>> +++ b/drivers/gpu/drm/scheduler/tests/tests_basic.c
>>> @@ -419,11 +419,11 @@ static void drm_sched_change_priority(struct kunit *test)
>>> drm_mock_sched_entity_free(entity[i]);
>>> }
>>> static struct kunit_case drm_sched_priority_tests[] = {
>>> KUNIT_CASE(drm_sched_priorities),
>>> - KUNIT_CASE(drm_sched_change_priority),
>>> + KUNIT_CASE_SLOW(drm_sched_change_priority),
>>
>> This one deliberately aims to run for ~1s and I don't have an immediate idea
>> how it would go over 2s.
>
> 1s is the threshold for a slow test:
> https://elixir.bootlin.com/linux/v6.19.3/source/lib/kunit/test.c#L365
>
> It only warns about it if it crosses 2s, but if it's expected to take
> 1s, it should be flagged as such still.
I know, just curious which environment managed to trigger the warning.
Because I thought my test setup was the slowest one (nested
virtualization - qemu-system inside vmware).
>>> {}
>>> };
>>> static struct kunit_suite drm_sched_priority = {
>>> .name = "drm_sched_basic_priority_tests",
>>> @@ -544,11 +544,11 @@ static void drm_sched_test_credits(struct kunit *test)
>>> drm_mock_sched_entity_free(entity);
>>> drm_mock_sched_fini(sched);
>>> }
>>> static struct kunit_case drm_sched_credits_tests[] = {
>>> - KUNIT_CASE(drm_sched_test_credits),
>>> + KUNIT_CASE_SLOW(drm_sched_test_credits),
>>
>> Same really.
>>
>> Anyway, the scheduler parts LGTM and I can follow up trying to optimise
>> these two later.
>>
>> For the scheduler:
>>
>> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
>
> Thanks!
I have a patch already which makes those (and one more) test cases
faster, but I will wait sending it until you merge this one.
Regards,
Tvrtko
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/tests: Mark slow tests as slow
2026-02-26 12:42 ` Tvrtko Ursulin
@ 2026-02-26 12:48 ` Philipp Stanner
2026-02-26 13:02 ` Tvrtko Ursulin
0 siblings, 1 reply; 15+ messages in thread
From: Philipp Stanner @ 2026-02-26 12:48 UTC (permalink / raw)
To: Tvrtko Ursulin, Maxime Ripard
Cc: Matthew Brost, Danilo Krummrich, Philipp Stanner,
Christian Koenig, Maarten Lankhorst, Thomas Zimmermann,
Matthew Auld, Arun Pravin, Simona Vetter, David Airlie, dri-devel
On Thu, 2026-02-26 at 12:42 +0000, Tvrtko Ursulin wrote:
>
> On 26/02/2026 10:56, Maxime Ripard wrote:
>
>
[…]
> > > > {}
> > > > };
> > > > static struct kunit_suite drm_sched_priority = {
> > > > .name = "drm_sched_basic_priority_tests",
> > > > @@ -544,11 +544,11 @@ static void drm_sched_test_credits(struct kunit *test)
> > > > drm_mock_sched_entity_free(entity);
> > > > drm_mock_sched_fini(sched);
> > > > }
> > > > static struct kunit_case drm_sched_credits_tests[] = {
> > > > - KUNIT_CASE(drm_sched_test_credits),
> > > > + KUNIT_CASE_SLOW(drm_sched_test_credits),
> > >
> > > Same really.
> > >
> > > Anyway, the scheduler parts LGTM and I can follow up trying to optimise
> > > these two later.
> > >
> > > For the scheduler:
> > >
> > > Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
> >
> > Thanks!
>
> I have a patch already which makes those (and one more) test cases
> faster, but I will wait sending it until you merge this one.
And why would we want to flag a test as slow just to immediately
afterwards make it faster?
Would it not be wiser to drop Maxime's change?
P.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/tests: Mark slow tests as slow
2026-02-26 12:48 ` Philipp Stanner
@ 2026-02-26 13:02 ` Tvrtko Ursulin
2026-02-26 13:17 ` Philipp Stanner
0 siblings, 1 reply; 15+ messages in thread
From: Tvrtko Ursulin @ 2026-02-26 13:02 UTC (permalink / raw)
To: phasta, Maxime Ripard
Cc: Matthew Brost, Danilo Krummrich, Christian Koenig,
Maarten Lankhorst, Thomas Zimmermann, Matthew Auld, Arun Pravin,
Simona Vetter, David Airlie, dri-devel
On 26/02/2026 12:48, Philipp Stanner wrote:
> On Thu, 2026-02-26 at 12:42 +0000, Tvrtko Ursulin wrote:
>>
>> On 26/02/2026 10:56, Maxime Ripard wrote:
>>
>>
>
> […]
>
>>>>> {}
>>>>> };
>>>>> static struct kunit_suite drm_sched_priority = {
>>>>> .name = "drm_sched_basic_priority_tests",
>>>>> @@ -544,11 +544,11 @@ static void drm_sched_test_credits(struct kunit *test)
>>>>> drm_mock_sched_entity_free(entity);
>>>>> drm_mock_sched_fini(sched);
>>>>> }
>>>>> static struct kunit_case drm_sched_credits_tests[] = {
>>>>> - KUNIT_CASE(drm_sched_test_credits),
>>>>> + KUNIT_CASE_SLOW(drm_sched_test_credits),
>>>>
>>>> Same really.
>>>>
>>>> Anyway, the scheduler parts LGTM and I can follow up trying to optimise
>>>> these two later.
>>>>
>>>> For the scheduler:
>>>>
>>>> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
>>>
>>> Thanks!
>>
>> I have a patch already which makes those (and one more) test cases
>> faster, but I will wait sending it until you merge this one.
>
> And why would we want to flag a test as slow just to immediately
> afterwards make it faster?
>
> Would it not be wiser to drop Maxime's change?
Just so he doesn't have to respin, or that we don't end up merging my
patch on top of the test already marked as slow. I am okay either way.
Regards,
Tvrtko
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/tests: Mark slow tests as slow
2026-02-26 13:02 ` Tvrtko Ursulin
@ 2026-02-26 13:17 ` Philipp Stanner
2026-02-26 13:23 ` Tvrtko Ursulin
0 siblings, 1 reply; 15+ messages in thread
From: Philipp Stanner @ 2026-02-26 13:17 UTC (permalink / raw)
To: Tvrtko Ursulin, phasta, Maxime Ripard
Cc: Matthew Brost, Danilo Krummrich, Christian Koenig,
Maarten Lankhorst, Thomas Zimmermann, Matthew Auld, Arun Pravin,
Simona Vetter, David Airlie, dri-devel
On Thu, 2026-02-26 at 13:02 +0000, Tvrtko Ursulin wrote:
>
> On 26/02/2026 12:48, Philipp Stanner wrote:
> > On Thu, 2026-02-26 at 12:42 +0000, Tvrtko Ursulin wrote:
> > >
> > > On 26/02/2026 10:56, Maxime Ripard wrote:
> > >
> > >
> >
> > […]
> >
> > > > > > {}
> > > > > > };
> > > > > > static struct kunit_suite drm_sched_priority = {
> > > > > > .name = "drm_sched_basic_priority_tests",
> > > > > > @@ -544,11 +544,11 @@ static void drm_sched_test_credits(struct kunit *test)
> > > > > > drm_mock_sched_entity_free(entity);
> > > > > > drm_mock_sched_fini(sched);
> > > > > > }
> > > > > > static struct kunit_case drm_sched_credits_tests[] = {
> > > > > > - KUNIT_CASE(drm_sched_test_credits),
> > > > > > + KUNIT_CASE_SLOW(drm_sched_test_credits),
> > > > >
> > > > > Same really.
> > > > >
> > > > > Anyway, the scheduler parts LGTM and I can follow up trying to optimise
> > > > > these two later.
> > > > >
> > > > > For the scheduler:
> > > > >
> > > > > Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
> > > >
> > > > Thanks!
> > >
> > > I have a patch already which makes those (and one more) test cases
> > > faster, but I will wait sending it until you merge this one.
> >
> > And why would we want to flag a test as slow just to immediately
> > afterwards make it faster?
> >
> > Would it not be wiser to drop Maxime's change?
>
> Just so he doesn't have to respin, or that we don't end up merging my
> patch on top of the test already marked as slow. I am okay either way.
>From my POV Maxime can decide that.
But if your speed-up patches go in after, they should probably remove
the marker again, shouldn't they?
P.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/tests: Mark slow tests as slow
2026-02-26 13:17 ` Philipp Stanner
@ 2026-02-26 13:23 ` Tvrtko Ursulin
0 siblings, 0 replies; 15+ messages in thread
From: Tvrtko Ursulin @ 2026-02-26 13:23 UTC (permalink / raw)
To: phasta, Maxime Ripard
Cc: Matthew Brost, Danilo Krummrich, Christian Koenig,
Maarten Lankhorst, Thomas Zimmermann, Matthew Auld, Arun Pravin,
Simona Vetter, David Airlie, dri-devel
On 26/02/2026 13:17, Philipp Stanner wrote:
> On Thu, 2026-02-26 at 13:02 +0000, Tvrtko Ursulin wrote:
>>
>> On 26/02/2026 12:48, Philipp Stanner wrote:
>>> On Thu, 2026-02-26 at 12:42 +0000, Tvrtko Ursulin wrote:
>>>>
>>>> On 26/02/2026 10:56, Maxime Ripard wrote:
>>>>
>>>>
>>>
>>> […]
>>>
>>>>>>> {}
>>>>>>> };
>>>>>>> static struct kunit_suite drm_sched_priority = {
>>>>>>> .name = "drm_sched_basic_priority_tests",
>>>>>>> @@ -544,11 +544,11 @@ static void drm_sched_test_credits(struct kunit *test)
>>>>>>> drm_mock_sched_entity_free(entity);
>>>>>>> drm_mock_sched_fini(sched);
>>>>>>> }
>>>>>>> static struct kunit_case drm_sched_credits_tests[] = {
>>>>>>> - KUNIT_CASE(drm_sched_test_credits),
>>>>>>> + KUNIT_CASE_SLOW(drm_sched_test_credits),
>>>>>>
>>>>>> Same really.
>>>>>>
>>>>>> Anyway, the scheduler parts LGTM and I can follow up trying to optimise
>>>>>> these two later.
>>>>>>
>>>>>> For the scheduler:
>>>>>>
>>>>>> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
>>>>>
>>>>> Thanks!
>>>>
>>>> I have a patch already which makes those (and one more) test cases
>>>> faster, but I will wait sending it until you merge this one.
>>>
>>> And why would we want to flag a test as slow just to immediately
>>> afterwards make it faster?
>>>
>>> Would it not be wiser to drop Maxime's change?
>>
>> Just so he doesn't have to respin, or that we don't end up merging my
>> patch on top of the test already marked as slow. I am okay either way.
>
> From my POV Maxime can decide that.
>
> But if your speed-up patches go in after, they should probably remove
> the marker again, shouldn't they?
Yes, that's why I said I was sitting on the patch.
Regards,
Tvrtko
^ permalink raw reply [flat|nested] 15+ messages in thread
* Claude review: drm/tests: Mark slow tests as slow
2026-02-24 11:03 [PATCH] drm/tests: Mark slow tests as slow Maxime Ripard
` (3 preceding siblings ...)
2026-02-24 13:07 ` Arunpravin Paneer Selvam
@ 2026-02-27 5:13 ` Claude Code Review Bot
2026-02-27 5:13 ` Claude Code Review Bot
5 siblings, 0 replies; 15+ messages in thread
From: Claude Code Review Bot @ 2026-02-27 5:13 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: drm/tests: Mark slow tests as slow
Author: Maxime Ripard <mripard@kernel.org>
Patches: 13
Reviewed: 2026-02-27T15:13:20.236229
---
This is a single, straightforward patch from Maxime Ripard that marks three DRM KUnit tests as slow using the `KUNIT_CASE_SLOW()` macro. The change is correct, well-scoped, and follows established KUnit conventions. The commit message is clear and concise.
The `KUNIT_CASE_SLOW` macro (defined in `include/kunit/test.h:187`) sets the `attr.speed` to `KUNIT_SPEED_SLOW`, which allows test runners to filter out slow tests (those exceeding the 1-second threshold) for faster iteration during development.
No issues found. This is a good cleanup patch.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 15+ messages in thread
* Claude review: drm/tests: Mark slow tests as slow
2026-02-24 11:03 [PATCH] drm/tests: Mark slow tests as slow Maxime Ripard
` (4 preceding siblings ...)
2026-02-27 5:13 ` Claude review: " Claude Code Review Bot
@ 2026-02-27 5:13 ` Claude Code Review Bot
5 siblings, 0 replies; 15+ messages in thread
From: Claude Code Review Bot @ 2026-02-27 5:13 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Reviewed files:**
- `drivers/gpu/drm/scheduler/tests/tests_basic.c` — two changes
- `drivers/gpu/drm/tests/drm_buddy_test.c` — one change
All three changes are identical in nature: `KUNIT_CASE(...)` → `KUNIT_CASE_SLOW(...)`.
**scheduler/tests/tests_basic.c:**
```c
- KUNIT_CASE(drm_sched_change_priority),
+ KUNIT_CASE_SLOW(drm_sched_change_priority),
```
```c
- KUNIT_CASE(drm_sched_test_credits),
+ KUNIT_CASE_SLOW(drm_sched_test_credits),
```
Both are reasonable candidates. `drm_sched_change_priority` uses `usleep_range` polling loops and `drm_sched_test_credits` calls `drm_mock_sched_job_wait_finished(job, HZ)` which waits up to 1 second by design, so it can plausibly cross the threshold.
**tests/drm_buddy_test.c:**
```c
- KUNIT_CASE(drm_test_buddy_fragmentation_performance),
+ KUNIT_CASE_SLOW(drm_test_buddy_fragmentation_performance),
```
A performance/stress test is a natural candidate for the slow annotation.
**Minor observation:** The commit message says tests "cross the 1s execution time threshold" but doesn't mention which specific tests or on what hardware. This is fine for a patch of this scope, but if reviewers want reproducibility context, it could be worth noting whether these were measured on a particular CI system. This is not a blocker.
**Verdict:** Patch looks good.
Reviewed-by: AI Review <ai@review>
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2026-02-27 5:13 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-24 11:03 [PATCH] drm/tests: Mark slow tests as slow Maxime Ripard
2026-02-24 11:12 ` Thomas Zimmermann
2026-02-24 11:43 ` Danilo Krummrich
2026-02-24 12:29 ` Tvrtko Ursulin
2026-02-24 12:44 ` Philipp Stanner
2026-02-24 12:49 ` Tvrtko Ursulin
2026-02-26 10:56 ` Maxime Ripard
2026-02-26 12:42 ` Tvrtko Ursulin
2026-02-26 12:48 ` Philipp Stanner
2026-02-26 13:02 ` Tvrtko Ursulin
2026-02-26 13:17 ` Philipp Stanner
2026-02-26 13:23 ` Tvrtko Ursulin
2026-02-24 13:07 ` Arunpravin Paneer Selvam
2026-02-27 5:13 ` Claude review: " Claude Code Review Bot
2026-02-27 5:13 ` Claude Code Review Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox