From 60e4023e6f94e7f847fc1f000e013be3cb99323e Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Tue, 8 Jul 2025 22:24:46 +0100 Subject: [PATCH] Fix log output ordering for vpi_control test when running in Windows. MSYS2 buffers stderr, so we need to flush the buffers to ensure the log file matches the gold file. --- ivtest/vpi/vpi_control.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ivtest/vpi/vpi_control.c b/ivtest/vpi/vpi_control.c index 6625da1fc..d936358d8 100644 --- a/ivtest/vpi/vpi_control.c +++ b/ivtest/vpi/vpi_control.c @@ -1,3 +1,4 @@ +#include #include static PLI_INT32 test_control(PLI_BYTE8 *xx) @@ -8,10 +9,12 @@ static PLI_INT32 test_control(PLI_BYTE8 *xx) (void)xx; /* Parameter is not used. */ ret_val = vpi_control(9999); + fflush(stderr); //vpi_printf("vpi_control(9999) returned %i\n", ret_val); if (ret_val != 0) failed = 1; ret_val = vpi_sim_control(9999); + fflush(stderr); //vpi_printf("vpi_sim_control(9999) returned %i\n", ret_val); if (ret_val != 0) failed = 1;