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.pur...@linuxfoundation.org> --- README.md | 2 +- utils.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 85ef58a..e6f548e 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ $ mtrace ./ptest-runner $MALLOC_TRACE ## Contributions For contribute please send a patch with subject prefix "[ptest-runner]" to -yo...@yoctoproject.org. +yocto@lists.yoctoproject.org. ## Links diff --git a/utils.c b/utils.c index a67ac11..ec57fa4 100644 --- a/utils.c +++ b/utils.c @@ -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; -- 2.39.2
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#60333): https://lists.yoctoproject.org/g/yocto/message/60333 Mute This Topic: https://lists.yoctoproject.org/mt/99601736/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/leave/6691583/21656/737036229/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-