diff mbox

[i-g-t,03/17] igt/gem_set_tiling_vs_pwrite: Show the erroneous value

Message ID 20180702090727.7721-3-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson July 2, 2018, 9:07 a.m. UTC
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/gem_set_tiling_vs_pwrite.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Tvrtko Ursulin July 2, 2018, noon UTC | #1
On 02/07/2018 10:07, Chris Wilson wrote:
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   tests/gem_set_tiling_vs_pwrite.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/gem_set_tiling_vs_pwrite.c b/tests/gem_set_tiling_vs_pwrite.c
> index 006edfe4e..f0126b648 100644
> --- a/tests/gem_set_tiling_vs_pwrite.c
> +++ b/tests/gem_set_tiling_vs_pwrite.c
> @@ -75,7 +75,7 @@ igt_simple_main
>   	memset(data, 0, OBJECT_SIZE);
>   	gem_read(fd, handle, 0, data, OBJECT_SIZE);
>   	for (i = 0; i < OBJECT_SIZE/4; i++)
> -		igt_assert(i == data[i]);
> +		igt_assert_eq_u32(data[i], i);
>   
>   	/* touch it before changing the tiling, so that the fence sticks around */
>   	gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
> @@ -88,7 +88,7 @@ igt_simple_main
>   	memset(data, 0, OBJECT_SIZE);
>   	gem_read(fd, handle, 0, data, OBJECT_SIZE);
>   	for (i = 0; i < OBJECT_SIZE/4; i++)
> -		igt_assert(i == data[i]);
> +		igt_assert_eq_u32(data[i], i);
>   
>   	munmap(ptr, OBJECT_SIZE);
>   
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
diff mbox

Patch

diff --git a/tests/gem_set_tiling_vs_pwrite.c b/tests/gem_set_tiling_vs_pwrite.c
index 006edfe4e..f0126b648 100644
--- a/tests/gem_set_tiling_vs_pwrite.c
+++ b/tests/gem_set_tiling_vs_pwrite.c
@@ -75,7 +75,7 @@  igt_simple_main
 	memset(data, 0, OBJECT_SIZE);
 	gem_read(fd, handle, 0, data, OBJECT_SIZE);
 	for (i = 0; i < OBJECT_SIZE/4; i++)
-		igt_assert(i == data[i]);
+		igt_assert_eq_u32(data[i], i);
 
 	/* touch it before changing the tiling, so that the fence sticks around */
 	gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
@@ -88,7 +88,7 @@  igt_simple_main
 	memset(data, 0, OBJECT_SIZE);
 	gem_read(fd, handle, 0, data, OBJECT_SIZE);
 	for (i = 0; i < OBJECT_SIZE/4; i++)
-		igt_assert(i == data[i]);
+		igt_assert_eq_u32(data[i], i);
 
 	munmap(ptr, OBJECT_SIZE);