test: flush stdout after forking
authorJohn Levon <john.levon@nutanix.com>
Mon, 26 Jul 2021 12:16:27 +0000 (13:16 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sat, 31 Jul 2021 18:04:07 +0000 (20:04 +0200)
meson test was not capturing the intended output from the child
process; force a flush to ensure it reaches the test log.

Signed-off-by: John Levon <john.levon@nutanix.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
app/test/process.h

index a09a088..0ed91a9 100644 (file)
@@ -110,6 +110,7 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
                for (i = 0; i < num; i++)
                        printf("'%s' ", argv_cpy[i]);
                printf("\n");
+               fflush(stdout);
 
                /* set the environment variable */
                if (setenv(RECURSIVE_ENV_VAR, env_value, 1) != 0)