@@ -49,7 +49,7 @@ $ mtrace ./ptest-runner $MALLOC_TRACE
## Contributions
For contribute please send a patch with subject prefix "[ptest-runner]" to
-yocto@yoctoproject.org.
+yocto@lists.yoctoproject.org.
## Links
@@ -535,6 +535,9 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
entime = time(NULL);
duration = entime - sttime;
+ /* Now the child has exited, ensure buffers are in sync before writing */
+ fflush(NULL);
+
if (status) {
fprintf(fp, "\nERROR: Exit status is %d\n", status);
rc += 1;
We currently wait for the child to exit but we don't flush the buffers. This can mean the output ends up out of sync and the END: line isn't at the end of the logs. We've recently seen a lot of issues related to this on the autobuilder. Add in a flush call for all fds to ensure buffers are in sync. This does appear to improve warnings on the autobuilder now we started detecting the issue. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- README.md | 2 +- utils.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)