From: Joshua Watt <jpewhacker@gmail.com>
To: yocto@lists.yoctoproject.org
Cc: Joshua Watt <JPEWhacker@gmail.com>
Subject: [ptest-runner][PATCH 5/5] Flush stdout and stderr after test
Date: Tue, 18 Jul 2023 11:26:14 -0600 [thread overview]
Message-ID: <20230718172614.469304-6-JPEWhacker@gmail.com> (raw)
In-Reply-To: <20230718172614.469304-1-JPEWhacker@gmail.com>
After reporting test results, flush the output buffers to ensure the
files are written out. Also flush again at the end of running all tests
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
utils.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/utils.c b/utils.c
index bd52544..59b8b77 100644
--- a/utils.c
+++ b/utils.c
@@ -601,6 +601,9 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
do_close(&pipefd_stderr[PIPE_READ]);
do_close(&pipefd_stderr[PIPE_WRITE]);
+ fflush(fp);
+ fflush(fp_stderr);
+
PTEST_LIST_ITERATE_END
fprintf(fp, "STOP: %s\n", progname);
} while (0);
@@ -611,6 +614,9 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
if (opts.xml_filename)
xml_finish(xh);
+ fflush(fp);
+ fflush(fp_stderr);
+
return rc;
}
--
2.33.0
prev parent reply other threads:[~2023-07-18 17:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 17:26 [ptest-runner][PATCH 0/5] Fix ptest timeout errors Joshua Watt
2023-07-18 17:26 ` [ptest-runner][PATCH 1/5] Revert "Change test timeout to be total elapsed time" Joshua Watt
2023-07-18 17:26 ` [ptest-runner][PATCH 2/5] Only collect system state on timeout Joshua Watt
2023-07-18 17:26 ` [ptest-runner][PATCH 3/5] Report test failure " Joshua Watt
2023-07-18 17:26 ` [ptest-runner][PATCH 4/5] Remove _child_reader singleton Joshua Watt
2023-07-18 17:26 ` Joshua Watt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230718172614.469304-6-JPEWhacker@gmail.com \
--to=jpewhacker@gmail.com \
--cc=yocto@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox