From: "Knop, Ryszard" <ryszard.knop@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"kamil.konieczny@linux.intel.com"
<kamil.konieczny@linux.intel.com>
Cc: "Karas, Krzysztof" <krzysztof.karas@intel.com>,
"peter.senna@linux.intel.com" <peter.senna@linux.intel.com>
Subject: Re: [i-g-t,1/1] runner/executor: sync outputs after tests end
Date: Wed, 9 Apr 2025 13:57:11 +0000 [thread overview]
Message-ID: <dfd5c54fe1839644d031f070386626867e79a2e0.camel@intel.com> (raw)
In-Reply-To: <20250409125543.49920-2-kamil.konieczny@linux.intel.com>
LGTM:
Reviewed-by: Ryszard Knop <ryszard.knop@intel.com>
On Wed, 2025-04-09 at 14:55 +0200, Kamil Konieczny wrote:
> We observe that sometimes tests are reported as incomplete after
> a crash and there are more such incompletes before a one that
> caused actual crash. It turns out that there were missing ends
> of tests dmesg logs gathered in a test subdirectory. After cross
> checks with a global dmesg log saved outside of igt_runner, it
> seems that all tests before crushed one properly reported its end
> to kernel kmsg.
>
> Try to remediate this and create additional syncs for logs just
> after end of execution, with additional syncs for directories.
>
> Cc: Krzysztof Karas <krzysztof.karas@intel.com>
> Cc: Peter Senna Tschudin <peter.senna@linux.intel.com>
> Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> ---
> runner/executor.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/runner/executor.c b/runner/executor.c
> index 30e2420af..69227a5f2 100644
> --- a/runner/executor.c
> +++ b/runner/executor.c
> @@ -615,6 +615,16 @@ void close_outputs(int *fds)
> }
> }
>
> +void fsync_outputs(int *fds)
> +{
> + int i;
> +
> + for (i = 0; i < _F_LAST; i++) {
> + if (fds[i] >= 0)
> + fsync(fds[i]);
> + }
> +}
> +
> const char *get_out_filename(int fid)
> {
> if (fid >= 0 && fid < _F_LAST)
> @@ -1871,14 +1881,19 @@ static int execute_next_entry(struct execute_state *state,
> out_kmsgfd:
> close(kmsgfd);
> out_pipe:
> - close_outputs(outputs);
> close(outpipe[0]);
> close(outpipe[1]);
> close(errpipe[0]);
> close(errpipe[1]);
> + if (settings->sync)
> + fsync_outputs(outputs);
> close_outputs(outputs);
> out_dirfd:
> + if (settings->sync)
> + fsync(dirfd);
> close(dirfd);
> + if (settings->sync)
> + fsync(resdirfd);
>
> return result;
> }
next prev parent reply other threads:[~2025-04-09 13:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 12:55 [PATCH i-g-t 0/1] Runner: sync files and dirs after execution Kamil Konieczny
2025-04-09 12:55 ` [PATCH i-g-t 1/1] runner/executor: sync outputs after tests end Kamil Konieczny
2025-04-09 13:57 ` Knop, Ryszard [this message]
2025-04-10 9:12 ` Peter Senna Tschudin
2025-04-09 13:47 ` ✓ i915.CI.BAT: success for Runner: sync files and dirs after execution Patchwork
2025-04-09 14:01 ` ✓ Xe.CI.BAT: " Patchwork
2025-04-09 15:43 ` ✓ Xe.CI.Full: " Patchwork
2025-04-09 23:08 ` ✗ i915.CI.Full: failure " Patchwork
2025-04-10 10:15 ` Kamil Konieczny
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=dfd5c54fe1839644d031f070386626867e79a2e0.camel@intel.com \
--to=ryszard.knop@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=krzysztof.karas@intel.com \
--cc=peter.senna@linux.intel.com \
/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