[1/8] tests/kms_addfb_basic: skip i915-specific tests on other platforms

Submitted by Ulrich Hecht on March 15, 2018, 2:45 p.m.

Details

Message ID 1521125144-28614-2-git-send-email-ulrich.hecht+renesas@gmail.com
State New
Headers show
Series "Non-Intel test suite fixes" ( rev: 1 ) in IGT (deprecated)

Not browsing as part of any series.

Commit Message

Ulrich Hecht March 15, 2018, 2:45 p.m.
Add is_i915_device() requirement to tests using Intel-specific APIs.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 tests/kms_addfb_basic.c | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
index 7d8852f..cf9ba37 100644
--- a/tests/kms_addfb_basic.c
+++ b/tests/kms_addfb_basic.c
@@ -104,6 +104,7 @@  static void invalid_tests(int fd)
 	}
 
 	igt_subtest("clobberred-modifier") {
+		igt_require(is_i915_device(fd));
 		f.flags = 0;
 		f.modifier[0] = 0;
 		gem_set_tiling(fd, gem_bo, I915_TILING_X, 512*4);
@@ -318,6 +319,7 @@  static void size_tests(int fd)
 	}
 
 	igt_subtest("bo-too-small-due-to-tiling") {
+		igt_require(is_i915_device(fd));
 		gem_set_tiling(fd, gem_bo_small, I915_TILING_X, 1024*4);
 		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
 			   errno == EINVAL);
@@ -369,6 +371,7 @@  static void addfb25_tests(int fd)
 
 	igt_subtest_group {
 		igt_fixture {
+			igt_require(is_i915_device(fd));
 			gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
 			igt_require_fb_modifiers(fd);
 		}

Comments

On Thu, Mar 15, 2018 at 03:45:37PM +0100, Ulrich Hecht wrote:
> Add is_i915_device() requirement to tests using Intel-specific APIs.
> 
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  tests/kms_addfb_basic.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
> index 7d8852f..cf9ba37 100644
> --- a/tests/kms_addfb_basic.c
> +++ b/tests/kms_addfb_basic.c
> @@ -104,6 +104,7 @@ static void invalid_tests(int fd)
>  	}
>  
>  	igt_subtest("clobberred-modifier") {
> +		igt_require(is_i915_device(fd));
>  		f.flags = 0;
>  		f.modifier[0] = 0;
>  		gem_set_tiling(fd, gem_bo, I915_TILING_X, 512*4);
> @@ -318,6 +319,7 @@ static void size_tests(int fd)
>  	}
>  
>  	igt_subtest("bo-too-small-due-to-tiling") {
> +		igt_require(is_i915_device(fd));
>  		gem_set_tiling(fd, gem_bo_small, I915_TILING_X, 1024*4);
>  		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
>  			   errno == EINVAL);
> @@ -369,6 +371,7 @@ static void addfb25_tests(int fd)
>  
>  	igt_subtest_group {
>  		igt_fixture {
> +			igt_require(is_i915_device(fd));
>  			gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
>  			igt_require_fb_modifiers(fd);
>  		}
> -- 
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi Ulrich,

Thank you for the patch.

On Thursday, 15 March 2018 16:45:37 EET Ulrich Hecht wrote:
> Add is_i915_device() requirement to tests using Intel-specific APIs.
> 
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  tests/kms_addfb_basic.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
> index 7d8852f..cf9ba37 100644
> --- a/tests/kms_addfb_basic.c
> +++ b/tests/kms_addfb_basic.c
> @@ -104,6 +104,7 @@ static void invalid_tests(int fd)
>  	}
> 
>  	igt_subtest("clobberred-modifier") {
> +		igt_require(is_i915_device(fd));
>  		f.flags = 0;
>  		f.modifier[0] = 0;
>  		gem_set_tiling(fd, gem_bo, I915_TILING_X, 512*4);
> @@ -318,6 +319,7 @@ static void size_tests(int fd)
>  	}
> 
>  	igt_subtest("bo-too-small-due-to-tiling") {
> +		igt_require(is_i915_device(fd));
>  		gem_set_tiling(fd, gem_bo_small, I915_TILING_X, 1024*4);
>  		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
>  			   errno == EINVAL);
> @@ -369,6 +371,7 @@ static void addfb25_tests(int fd)
> 
>  	igt_subtest_group {
>  		igt_fixture {
> +			igt_require(is_i915_device(fd));
>  			gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
>  			igt_require_fb_modifiers(fd);
>  		}