[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aE_8lDuMFFhJBeUY@pollux>
Date: Mon, 16 Jun 2025 13:14:28 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Tvrtko Ursulin <tvrtko.ursulin@...lia.com>
Cc: Philipp Stanner <phasta@...nel.org>,
Matthew Brost <matthew.brost@...el.com>,
Christian König <ckoenig.leichtzumerken@...il.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@....com>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/sched/tests: Make timedout_job callback a better
role model
On Mon, Jun 16, 2025 at 11:57:47AM +0100, Tvrtko Ursulin wrote:
> Code looks fine, but currently nothing is broken and I disagree with the
> goal that the _mock_^1 components should be role models. The idea is to
> implement as little in the mock components as it is required to exercise the
> tested functionality.
No, please consider the following.
1) When we write tests for common infrastructure we should be testing things
as close as possible to how we intend real code to use this infrastructure.
Relying on internals in creative ways is likely to underrun this testing.
2) Being close to a reference design is a good thing, why wouldn't we want
that? The reality is that people *will* look at this code for reference.
> Also, there are various ways drivers use the scheduler API. Trying to make
> the mock scheduler a reference driver implementation would only be able to
> make it a reference for one possible use.
Why? Nothing prevents us from covering all of them eventually.
If for now, we just implement one of them, that's better than none, so why not?
Powered by blists - more mailing lists