[Beignet] [PATCH] Fix the problem by kernel file open in utest

Sun, Yi yi.sun at intel.com
Sun Jan 26 07:16:46 PST 2014


This patch works well for me. :p
Thanks Junyan for the quick response.

Thanks
  --Sun, Yi

> -----Original Message-----
> From: beignet-bounces at lists.freedesktop.org
> [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> junyan.he at inbox.com
> Sent: Sunday, January 26, 2014 6:16 PM
> To: beignet at lists.freedesktop.org
> Cc: Junyan He
> Subject: [Beignet] [PATCH] Fix the problem by kernel file open in utest
> 
> From: Junyan He <junyan.he at linux.intel.com>
> 
> Signed-off-by: Junyan He <junyan.he at linux.intel.com>
> ---
>  utests/utest_file_map.cpp |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utests/utest_file_map.cpp b/utests/utest_file_map.cpp index
> da3361c..55b7771 100644
> --- a/utests/utest_file_map.cpp
> +++ b/utests/utest_file_map.cpp
> @@ -88,7 +88,7 @@ cl_file_map_open(cl_file_map_t *fm, const char *name)
> 
>    /* Open the file */
>    fm->fd = open(name, O_RDONLY);
> -  if(fm->fd <= 0) {
> +  if(fm->fd < 0) {
>      err = CL_FILE_MAP_FILE_NOT_FOUND;
>      goto error;
>    }
> --
> 1.7.9.5
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list