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

Eric Anholt eric at anholt.net
Wed Jul 18 17:20:05 PDT 2012


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.
---
 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



More information about the Piglit mailing list