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.

 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;
 
-- 
1.7.10.4

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to