Thread (4 messages) 4 messages, 3 authors, 2021-07-31

Re: [dpdk-dev] [PATCH] app/test: flush stdout after forking

From: Bruce Richardson <hidden>
Date: 2021-07-26 12:27:58

On Mon, Jul 26, 2021 at 01:16:27PM +0100, John Levon wrote:
quoted hunk ↗ jump to hunk
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 <redacted>
---
 app/test/process.h | 1 +
 1 file changed, 1 insertion(+)
diff --git a/app/test/process.h b/app/test/process.h
index a09a088477..0ed91a939e 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -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);
 
I thought that "\n" normally flushes in most cases, but if explicit flush
is necessary for some cases, let's add it.

Acked-by: Bruce Richardson <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help