[igt-dev] [PATCH i-g-t] tests/i915/gem_exec_basic: Skip subtest gtt if gtt mapping is unavailable

Petri Latvala petri.latvala at intel.com
Fri Jan 31 10:50:37 UTC 2020


On Thu, Jan 30, 2020 at 04:15:16PM -0800, Antonio Argenziano wrote:
> The subtest tries to do a gtt mapping but if there is no mappable
> aperture that is not possible.
> 
> Signed-off-by: Antonio Argenziano <antonio.argenziano at intel.com>
> ---
>  tests/i915/gem_exec_basic.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/i915/gem_exec_basic.c b/tests/i915/gem_exec_basic.c
> index 70dce34b..08336168 100644
> --- a/tests/i915/gem_exec_basic.c
> +++ b/tests/i915/gem_exec_basic.c
> @@ -93,6 +93,7 @@ static void gtt(int fd, uint64_t flags)
>  	struct drm_i915_gem_exec_object2 *exec;
>  	uint32_t handle;
>  
> +	gem_require_mappable_ggtt(fd);
>  	gem_require_ring(fd, flags);


Hmm, without mappable aperture this ends up yielding a SKIP for each
dynamic subtest. Note to self: Check that it gets properly handled...

Anyway, it's useless to loop and yield multiple SKIPs when you know a
priori you're going to do it for each loop element.



diff --git a/tests/i915/gem_exec_basic.c b/tests/i915/gem_exec_basic.c
index 70dce34b..b3c56369 100644
--- a/tests/i915/gem_exec_basic.c
+++ b/tests/i915/gem_exec_basic.c
@@ -141,6 +141,8 @@ igt_main
 	}
 
 	igt_subtest_with_dynamic("gtt") {
+		gem_require_mappable_ggtt(fd);
+
 		__for_each_physical_engine(fd, e) {
 			igt_dynamic_f("%s", e->name)
 				gtt(fd, e->flags);


More information about the igt-dev mailing list