[Piglit] [v7 05/12] tests: spec: EXT_image_dma_buf_import invalid attributes

Eric Anholt eric at anholt.net
Tue May 28 12:01:06 PDT 2013


Topi Pohjolainen <topi.pohjolainen at intel.com> writes:
> diff --git a/tests/spec/ext_image_dma_buf_import/invalid_attributes.c b/tests/spec/ext_image_dma_buf_import/invalid_attributes.c
> new file mode 100644
> index 0000000..00683a0
> --- /dev/null
> +++ b/tests/spec/ext_image_dma_buf_import/invalid_attributes.c

> +#include "piglit-util-egl.h"
> +#define EGL_EGLEXT_PROTOTYPES 1
> +#include <EGL/eglext.h>

Same note about prototypes.

> +	pass = test_excess_attributes(w, h, fd, stride, offset,
> +				EGL_DMA_BUF_PLANE1_FD_EXT, fd);
> +	pass &= test_excess_attributes(w, h, fd, stride, offset,
> +				EGL_DMA_BUF_PLANE1_OFFSET_EXT, 0);
> +	pass &= test_excess_attributes(w, h, fd, stride, offset,
> +				EGL_DMA_BUF_PLANE1_PITCH_EXT, stride);
> +	pass = test_excess_attributes(w, h, fd, stride, offset,
> +				EGL_DMA_BUF_PLANE2_FD_EXT, fd);

Missing "&" here.  To avoid common copy and paste bugs like this, we
usually initialize pass to "true" in the declaration and always use "&"
or "&&"

Oh, I just noticed that you haven't added any of these testcases to
all.tests.  They need to all be added, or nobody will ever execute your
tests.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130528/614ca3dd/attachment.pgp>


More information about the Piglit mailing list