[Piglit] [PATCH 3/4] shader_runner: Generate an error for an unrecognized [section] block

Ian Romanick idr at freedesktop.org
Tue Mar 17 14:51:32 PDT 2015


From: Ian Romanick <ian.d.romanick at intel.com>

This would have caught the "[vertex shader passthrough" error in the
fs-frontfacing-ternary-* tests.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 tests/shaders/shader_runner.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index c193de9..ad8f618 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -935,6 +935,11 @@ process_test_script(const char *script_name)
 				if (test_start[0] != '\0')
 					test_start++;
 				return;
+			} else {
+				fprintf(stderr,
+					"Unknown section in test script.  "
+					"Perhaps missing closing ']'?\n");
+				piglit_report_result(PIGLIT_FAIL);
 			}
 		} else {
 			switch (state) {
-- 
2.1.0



More information about the Piglit mailing list