From 11289898854dda5f6dbbfe99c62ed8c8aa3aae5f Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Sun, 5 May 2024 17:30:59 +0200 Subject: [PATCH] test: fflush between printf and abort This is necessary to show the output with meson test. Followup to 06edb04692. --- test/paths.c | 2 ++ test/scale_test.c | 1 + 2 files changed, 3 insertions(+) diff --git a/test/paths.c b/test/paths.c index aa610db437..90c1ddf94a 100644 --- a/test/paths.c +++ b/test/paths.c @@ -10,6 +10,7 @@ static void test_join(char *file, int line, char *a, char *b, char *c) if (strcmp(res, c) != 0) { printf("%s:%d: '%s' + '%s' = '%s', expected '%s'\n", file, line, a, b, res, c); + fflush(stdout); abort(); } talloc_free(res); @@ -20,6 +21,7 @@ static void test_abs(char *file, int line, bool abs, char *a) if (mp_path_is_absolute(bstr0(a)) != abs) { printf("%s:%d: mp_path_is_absolute('%s') => %d, expected %d\n", file, line, a, !abs, abs); + fflush(stdout); abort(); } } diff --git a/test/scale_test.c b/test/scale_test.c index 6e012712da..346fbfbda2 100644 --- a/test/scale_test.c +++ b/test/scale_test.c @@ -62,6 +62,7 @@ static void dump_image(struct scale_test *stest, const char *name, if (!write_image(img, &opts, path, NULL, NULL, true)) { printf("Failed to write '%s'.\n", path); + fflush(stdout); abort(); } }