[Intel-gfx] [PATCH 01/15] drm/i915/selftests: Common live setup/teardown

Chris Wilson chris at chris-wilson.co.uk
Wed Jul 3 10:04:18 UTC 2019


Quoting Matthew Auld (2019-07-03 10:48:28)
> On 03/07/2019 10:17, Chris Wilson wrote:
> > We frequently, and not frequently enough, remember to flush residual
> > openations and objects at the end of a live subtest. The purpose is to
> 
> operations
> 
> > cleanup after every subtest, leaving a clean slate for the next subtest,
> > and perform early detection of leaky state.
> > 
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Reviewed-by: Matthew Auld <matthew.auld at intel.com>
> 
> A variant with separate arguments for data and i915? Meh.

My first attempt was to use

struct i915_live_data {
	struct drm_i915_private *i915;
};

but for this pass everything is basically using i915 as the data
parameter, so went with that for a smaller patch.

It may also be interesting to a do a i915_mock_subtests() that creates
and destroy a mock_gem_device around each subtest. I am sure we will
start using setup/teardown more creatively in future :)

Also remind me to pay attention to kunit and see if we can have a smooth
transition over to a central framework.
-Chris


More information about the Intel-gfx mailing list