From 80807b30c55020a6e974a4a5d8f91b94162ff702 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 13 Sep 2019 11:16:58 +0200 Subject: [PATCH] WASI can't read its own writes without an explicit fflush() --- test/default/cmptest.h | 1 + 1 file changed, 1 insertion(+) diff --git a/test/default/cmptest.h b/test/default/cmptest.h index 1ecc5cd9..b1261bdb 100644 --- a/test/default/cmptest.h +++ b/test/default/cmptest.h @@ -190,6 +190,7 @@ int main(void) if (xmain() != 0) { return 99; } + fflush(fp_res); rewind(fp_res); if ((fp_out = fopen(TEST_NAME_OUT, "r")) == NULL) { perror("fopen(" TEST_NAME_OUT ")");