[Piglit] [PATCH] util: Warn and report SKIP when we get a window resize during an auto run.

Paul Berry stereotype441 at gmail.com
Thu Jul 19 07:14:20 PDT 2012


On 18 July 2012 17:20, Eric Anholt <eric at anholt.net> 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 just report
> SKIP.
>

I think detecting spurious window resizes is a fantastic idea.  Can we
report WARN instead of SKIP?  I'm worried that SKIP will hide problems a
little too well.  For example, if for some reason a certain test receives a
spurious resize event *every* time it is run, it will skip every time and
it will blend in with all the other skips.


> ---
>  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..1487edb 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_SKIP);
> +       }
> +
>         piglit_width = w;
>         piglit_height = h;
>
> --
> 1.7.10.4
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20120719/753ae184/attachment.html>


More information about the Piglit mailing list