[Mesa-dev] [PATCH 1/2] llvmpipe: Flush stdout on lp_test_* unit tests.

jfonseca at vmware.com jfonseca at vmware.com
Fri Oct 24 12:34:51 PDT 2014


From: José Fonseca <jfonseca at vmware.com>

So that the order of test messages and gallivm/llvmpipe debug output is
preserved.

Trivial.
---
 src/gallium/drivers/llvmpipe/lp_test_arit.c   | 1 +
 src/gallium/drivers/llvmpipe/lp_test_format.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/gallium/drivers/llvmpipe/lp_test_arit.c b/src/gallium/drivers/llvmpipe/lp_test_arit.c
index 660ad4d..3fc64ce 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_arit.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_arit.c
@@ -395,6 +395,7 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test)
             printf("%s(%.9g): ref = %.9g, out = %.9g, precision = %f bits, %s\n",
                   test->name, in[i], ref, out[i], precision,
                   pass ? "PASS" : "FAIL");
+            fflush(stdout);
          }
 
          if (!pass) {
diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/src/gallium/drivers/llvmpipe/lp_test_format.c
index cdacb1b..a4b3b56 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_format.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_format.c
@@ -156,6 +156,7 @@ test_format_float(unsigned verbose, FILE *fp,
          if (first) {
             printf("Testing %s (float) ...\n",
                    desc->name);
+            fflush(stdout);
             first = FALSE;
          }
 
@@ -194,6 +195,7 @@ test_format_float(unsigned verbose, FILE *fp,
                          test->unpacked[i][j][1],
                          test->unpacked[i][j][2],
                          test->unpacked[i][j][3]);
+                  fflush(stdout);
                   success = FALSE;
                }
             }
-- 
1.9.1



More information about the mesa-dev mailing list