aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2021-01-29 09:29:26 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2021-04-22 09:40:42 +0000
commit76713be0f593d7b6cea0696024b804888a61547a (patch)
treefc81157262d6ce7afcb0fb816e3858f06b7b059a
parent70a2e9a3d447f4dcabb96a5782d09ef94ffda9fb (diff)
downloadsrc-76713be0f593d7b6cea0696024b804888a61547a.tar.gz
src-76713be0f593d7b6cea0696024b804888a61547a.zip
Avoid double output in fenv_test
This tests fork()s, so if there is still data in the stdout buffer on fork it will print it again in the child process. This was happening in the CheriBSD CI and caused the test to complain about malformed TAP output. Reviewed By: ngie Differential Revision: https://reviews.freebsd.org/D28397 (cherry picked from commit 892a05ee3a6abd8d84f46a1b895b1d2bf805d08a)
-rw-r--r--lib/msun/tests/fenv_test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/msun/tests/fenv_test.c b/lib/msun/tests/fenv_test.c
index 9b615b100e8a..62abfefb4a8a 100644
--- a/lib/msun/tests/fenv_test.c
+++ b/lib/msun/tests/fenv_test.c
@@ -539,6 +539,8 @@ test_feholdupdate(void)
int
main(void)
{
+ /* Avoid double output after fork() */
+ setvbuf(stdout, NULL, _IONBF, 0);
printf("1..8\n");
init_exceptsets();