drm/i915/selftests: fixup igt_shrink_thp
authorMatthew Auld <matthew.auld@intel.com>
Mon, 6 Sep 2021 09:17:29 +0000 (10:17 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Wed, 8 Sep 2021 08:41:26 +0000 (09:41 +0100)
commitf503eb0cf2badfd8a70dac5d2a48a3e83550278e
treef2e719e8f9aedb2ee8064efe099aea7ac025f3a1
parent502d0609fc418e674f1e8bd30aa02748e4c6b465
drm/i915/selftests: fixup igt_shrink_thp

Since the object might still be active here, the shrink_all will simply
ignore it, which blows up in the test, since the pages will still be
there. Currently THP is disabled which should result in the test being
skipped, but if we ever re-enable THP we might start seeing the failure.
Fix this by forcing I915_SHRINK_ACTIVE.

v2: Some machine in the shard runs doesn't seem to have any available
swap when running this test. Try to handle this.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210906091729.2093312-1-matthew.auld@intel.com
drivers/gpu/drm/i915/gem/selftests/huge_pages.c