[Piglit] [PATCH 1/2] util: Warn when we get a window resize during an auto run.

Ian Romanick idr at freedesktop.org
Mon Jul 23 14:35:59 PDT 2012


On 07/20/2012 10:59 AM, Eric Anholt wrote:
> We've got a bunch of instances of this happening intermittently during
> runs with gnome-shell.  Because our tests are not generally able to
> handle resizes, they would show up as spurious failures that are hard
> to reproduce.  Instead, provide a diagnostic message and report WARN.
> ---
>
> I previously didn't want to choose WARN because it would make things
> really nasty when looking at the results.  Then I realized that I
> could just avoid this problem entirely with a little hack to the
> python framework.

/me likes it.

The series is

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

>
>   tests/util/piglit-framework-glut.c |    8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/tests/util/piglit-framework-glut.c b/tests/util/piglit-framework-glut.c
> index bd6fbb7..00aea6e 100644
> --- a/tests/util/piglit-framework-glut.c
> +++ b/tests/util/piglit-framework-glut.c
> @@ -71,6 +71,14 @@ display(void)
>   static void
>   reshape(int w, int h)
>   {
> +	if (piglit_automatic &&
> +	    (w != piglit_width ||
> +	     h != piglit_height)) {
> +		printf("Got spurious window resize in automatic run "
> +		       "(%d,%d to %d,%d)\n", piglit_width, piglit_height, w, h);
> +		piglit_report_result(PIGLIT_WARN);
> +	}
> +
>   	piglit_width = w;
>   	piglit_height = h;
>
>




More information about the Piglit mailing list