Re: [PATCH] drm/sched/tests: Make timedout_job callback a better role model

From: Danilo Krummrich
Date: Mon Jun 30 2025 - 08:50:31 EST


On Thu, Jun 05, 2025 at 03:41:55PM +0200, Philipp Stanner wrote:
> Since the drm_mock_scheduler does not have real users in userspace, nor
> does it have real hardware or firmware rings, it's not necessary to
> signal timedout fences nor free jobs - from a functional standpoint.
>
> The unit tests, however, serve as a reference implementation and a first
> example for new scheduler users. Therefore, they should approximate the
> canonical usage as much as possible.
>
> Make sure timed out hardware fences get signaled with the appropriate
> error code.
>
> Signed-off-by: Philipp Stanner <phasta@xxxxxxxxxx>

Given the discussion on this patch we agree that, unit test should remain to be
unit tests, but at the same time (as far as possible) represent the intended
usage of the scheduler's APIs.

Given that, "reference implementation" might be slightly overstated and we
should just say something along the lines of "make them represent the intended
usage of the scheduler's APIs".

Also, since this patch is a prerequisite of your teardown series, please mention
that in the commit message.

With that:

Acked-by: Danilo Krummrich <dakr@xxxxxxxxxx>

Fine for me if you fix up those two nits when applying the patch.

- Danilo