[Piglit] [PATCH] tex-miplevel-selection: stop after 100 failures

Brian Paul brianp at vmware.com
Wed Jul 16 14:35:50 PDT 2014


rather than continuing.  As it was, if something is majorly broken in
the driver, this test could report nearly 60,000 failure messages.
The results.json file is pretty huge in this case.
---
 tests/texturing/tex-miplevel-selection.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/texturing/tex-miplevel-selection.c b/tests/texturing/tex-miplevel-selection.c
index 0f03c6e..11e4292 100644
--- a/tests/texturing/tex-miplevel-selection.c
+++ b/tests/texturing/tex-miplevel-selection.c
@@ -1456,6 +1456,10 @@ piglit_display(void)
 											  maxlevel, minlod, maxlod,
 											  bias, mipfilter)) {
 										failed++;
+										if (failed > 100) {
+											printf("Stopping after 100 failures\n");
+											goto end;
+										}
 									}
 								}
 								total++;
@@ -1492,12 +1496,17 @@ piglit_display(void)
 											  baselevel, maxlevel, minlod,
 											  maxlod, bias, mipfilter)) {
 										failed++;
+										if (failed > 100) {
+											printf("Stopping after 100 failures\n");
+											goto end;
+										}
 									}
 									total++;
 								}
 		free(pix);
 	}
 
+end:
 	assert(glGetError() == 0);
 	printf("Summary: %i/%i passed\n", total-failed, total);
 
-- 
1.7.10.4



More information about the Piglit mailing list