Hi Krzysztof,

> The i915_active selftests operate on an active attached to a mock
Instead of "selftests", you could mention explicitly the two
selftests that depend on this call. It took me a second to
figure out that not all of the three live_active* tests suffer
from this race.

Apart from that, the change looks good:
Reviewed-by: Krzysztof Karas <[email protected]>

> request. This request is created during the test, and a fence is
> attached to it for the test to control when the request is processed.
> However, because signalling the fence happens inside the same thread as
> the test, and before a call to __i915_active_wait(), a race condition is
> created where if the request is processed before the aforementioned
> call, the active callback will not be called.
> 
> Defer signalling the request's fence, so that the request completes only
> after the test's call to __i915_active_wait().
> 
> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14808
> Signed-off-by: Krzysztof Niemiec <[email protected]>
> ---

-- 
Best Regards,
Krzysztof

Reply via email to