[Beignet] [PATCH] utests: Fix a bug in movforphi test case.

Zhigang Gong zhigang.gong at linux.intel.com
Thu May 16 23:26:39 PDT 2013


This fix is very trival, without any comment for 2 days, I decide to
push it without comment.

On Wed, May 15, 2013 at 06:18:42PM +0800, Zhigang Gong wrote:
> This test case is to trigger a old MovForPHI bug, and it
> just use read/write_image. But it has a bug in itself.
> As in the kernel, the write image will only write the
> first lane data not all the 16 lanes. As the previous
> patch fix the write_image bug, thus now the write_image
> work correctly and thus it only touch the first data element
> thus it trigger the bug in this test case. Now fix it.
> 
> Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
> ---
>  utests/compiler_movforphi_undef.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/utests/compiler_movforphi_undef.cpp b/utests/compiler_movforphi_undef.cpp
> index 30e53bb..17bde8c 100644
> --- a/utests/compiler_movforphi_undef.cpp
> +++ b/utests/compiler_movforphi_undef.cpp
> @@ -47,8 +47,8 @@ static void compiler_movforphi_undef(void)
>    for (uint32_t j = 0; j < 1; ++j)
>      for (uint32_t i = 0; i < 3; i++)
>      {
> -      if (i < w - 1)
> -       OCL_ASSERT(((uint32_t*)buf_data[0])[j * w + i + 1] == ((uint32_t*)buf_data[1])[j * w + i]);
> +      if (i == 0)
> +        OCL_ASSERT(((uint32_t*)buf_data[0])[j * w + i + 1] == ((uint32_t*)buf_data[1])[j * w + i]);
>      }
>    OCL_UNMAP_BUFFER(0);
>    OCL_UNMAP_BUFFER(1);
> -- 
> 1.7.11.7
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list