Skip to content

Commit

Permalink
drm/i915: Add a live dmabuf selftest
Browse files Browse the repository at this point in the history
Though we have good coverage of our dmabuf interface through the mock
tests, we also want to check the heavy module unload paths of the live
i915 driver.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-26-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Feb 13, 2017
1 parent 6cca22e commit ced01af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,12 @@ int i915_gem_dmabuf_mock_selftests(void)
drm_dev_unref(&i915->drm);
return err;
}

int i915_gem_dmabuf_live_selftests(struct drm_i915_private *i915)
{
static const struct i915_subtest tests[] = {
SUBTEST(igt_dmabuf_export),
};

return i915_subtests(tests, i915);
}
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/selftests/i915_live_selftests.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ selftest(sanitycheck, i915_live_sanitycheck) /* keep first (igt selfcheck) */
selftest(uncore, intel_uncore_live_selftests)
selftest(requests, i915_gem_request_live_selftests)
selftest(objects, i915_gem_object_live_selftests)
selftest(dmabuf, i915_gem_dmabuf_live_selftests)
selftest(coherency, i915_gem_coherency_live_selftests)

0 comments on commit ced01af

Please sign in to comment.