[igt-dev] [PATCH i-g-t] runner: Remember to sync journal.txt for all writes
Chris Wilson
chris at chris-wilson.co.uk
Wed Mar 25 13:37:30 UTC 2020
Quoting Petri Latvala (2020-03-25 13:19:43)
> One missing fdatasync() for starting a subtest.
>
> Fixes: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/81
> Signed-off-by: Petri Latvala <petri.latvala at intel.com>
> Cc: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
> ---
> runner/executor.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/runner/executor.c b/runner/executor.c
> index c4b99115..d2ced797 100644
> --- a/runner/executor.c
> +++ b/runner/executor.c
> @@ -868,6 +868,9 @@ static int monitor_output(pid_t child,
> !memcmp(outbuf, STARTING_SUBTEST, strlen(STARTING_SUBTEST))) {
> write(outputs[_F_JOURNAL], outbuf + strlen(STARTING_SUBTEST),
> linelen - strlen(STARTING_SUBTEST));
> + if (settings->sync) {
> + fdatasync(outputs[_F_JOURNAL]);
> + }
Hmm, I wonder if O_SYNC would work and then we wouldn't have to worry
about forgetting.
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
More information about the igt-dev
mailing list