From: Jérémie Galarneau Date: Wed, 4 Feb 2015 20:55:07 +0000 (-0500) Subject: Tests: Don't use diag() to output errors from child processes X-Git-Tag: v2.0.0-pre1~1417 X-Git-Url: https://git.efficios.com/?a=commitdiff_plain;h=406b1e2cb6c29c364ad1510c25402637a088c5c1;p=babeltrace.git Tests: Don't use diag() to output errors from child processes diag() appends a newline character to the child processes' output which causes the test's output to have extra blank lines. Signed-off-by: Jérémie Galarneau --- diff --git a/tests/lib/test_ctf_writer.c b/tests/lib/test_ctf_writer.c index 52106f2d..e58c6cac 100644 --- a/tests/lib/test_ctf_writer.c +++ b/tests/lib/test_ctf_writer.c @@ -158,12 +158,12 @@ result: /* Output the metadata and parser output as diagnostic */ while (getline(&line, &len, metadata_fp) > 0) { - diag("%s", line); + fprintf(stderr, "# %s", line); } rewind(parser_output_fp); while (getline(&line, &len, parser_output_fp) > 0) { - diag("%s", line); + fprintf(stderr, "# %s", line); } free(line);