[Piglit] [PATCH v2 04/12] egl_android_native_fence_sync: Verify eglDupNativeFenceFDANDROID.

Eric Anholt eric at anholt.net
Fri Jun 16 19:13:17 UTC 2017


Rafael Antognolli <rafael.antognolli at intel.com> writes:

> Verify that eglDupNativeFenceFDANDROID() correctly returns a new file
> descriptor.
>
> Signed-off-by: Rafael Antognolli <rafael.antognolli at intel.com>
> ---
>  .../egl_android_native_fence_sync.c                | 45 ++++++++++++++++++++++
>  1 file changed, 45 insertions(+)
>
> diff --git a/tests/egl/spec/egl_android_native_fence_sync/egl_android_native_fence_sync.c b/tests/egl/spec/egl_android_native_fence_sync/egl_android_native_fence_sync.c
> index b32e26a..194e9d5 100644
> --- a/tests/egl/spec/egl_android_native_fence_sync/egl_android_native_fence_sync.c
> +++ b/tests/egl/spec/egl_android_native_fence_sync/egl_android_native_fence_sync.c
> @@ -471,6 +471,46 @@ cleanup:
>  	return result;
>  }
>  
> +static enum piglit_result
> +test_eglCreateSyncKHR_native_dup_fence(void *test_data)
> +{
> +	enum piglit_result result = PIGLIT_PASS;
> +	EGLSyncKHR sync = 0;
> +	int sync_fd = canary;
> +
> +	result = test_setup();
> +	if (result != PIGLIT_PASS) {
> +		return result;
> +	}
> +
> +	sync = peglCreateSyncKHR(g_dpy, EGL_SYNC_NATIVE_FENCE_ANDROID, NULL);
> +	if (sync == EGL_NO_SYNC_KHR) {
> +		piglit_loge("eglCreateSyncKHR(EGL_SYNC_NATIVE_FENCE_ANDROID) failed");
> +		result = PIGLIT_FAIL;
> +		goto cleanup;
> +	}
> +
> +	glFlush();
> +
> +	if (result == PIGLIT_FAIL)
> +		goto cleanup;

This check looks like it's unreachable.

Other than that, patches 3-4 are:

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20170616/3b627081/attachment-0001.sig>


More information about the Piglit mailing list