runner: Flush igt_runner outputs before forking
PATCH 1/1 runner: Flush igt_runner outputs before forking
If the output of igt_runner is piped or redirected, buffered prints could be left lingering and read as test executable output if execv() fails. This can happen easily if CI for example generates a testlist with an incorrect binary name, or an optional test binary (say, kms_chamelium) is not built for the deployment in question.
--- runner/executor.c | 8 ++++++++ 1 file changed, 8 insertions(+)
runner/executor.c +8 -0
@@ -780,6 +780,14 @@ static int execute_entry(size_t idx,printf ("\n" ); } +/* +* Flush outputs before forking so our (buffered) output won't +* end up in the test outputs. +*/ + +fflush (stdout); +fflush (stderr); +if ((child =fork ())) {int outfd = outpipe[0 ];int errfd = errpipe[0 ];
Signature · 6 lines
2.18.0 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/1] runner: Flush igt_runner outputs before forking
== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,1/1] runner: Flush igt_runner outputs before forking
URL : https://patchwork.freedesktop.org/series/49907/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4836 -> IGTPW_1858 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/49907/revisions/1/mbox/
== Known issues ==
Here are the changes found in IGTPW_1858 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_module_reload@basic-reload:
fi-glk-j4005: PASS -> DMESG-WARN (fdo#106248, fdo#106725)
igt@gem_exec_suspend@basic-s3:
fi-bdw-samus: PASS -> INCOMPLETE (fdo#107773)
fi-byt-clapper: NOTRUN -> INCOMPLETE (fdo#102657)
igt@kms_flip@basic-flip-vs-modeset:
fi-glk-j4005: PASS -> DMESG-WARN (fdo#106000)
==== Possible fixes ====
igt@drv_module_reload@basic-reload:
fi-blb-e6850: INCOMPLETE (fdo#107718) -> PASS
igt@gem_mmap_gtt@basic-read-write:
fi-glk-dsi: INCOMPLETE (fdo#103359, k.org#198133) -> PASS
igt@prime_vgem@basic-fence-flip:
fi-ilk-650: FAIL (fdo#104008) -> PASS fdo#102657 https://bugs.freedesktop.org/show_bug.cgi?id=102657
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
fdo#106248 https://bugs.freedesktop.org/show_bug.cgi?id=106248
fdo#106725 https://bugs.freedesktop.org/show_bug.cgi?id=106725
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133
== Participating hosts (47 -> 46) ==
Additional (5): fi-bsw-kefka fi-elk-e7500 fi-byt-clapper fi-skl-6700hq fi-pnv-d510
Missing (6): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-snb-2520m fi-ctg-p8600 fi-skl-caroline
== Build changes ==
* IGT: IGT_4645 -> IGTPW_1858
CI_DRM_4836: b2b0444aa439ade1ed809a91a19d382fbb5e7700 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1858: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1858/
IGT_4645: 03b90a39ed12a568c9da752466ea708d6348e110 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1858/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 9 lines · Petri Latvala
If the output of
igt_runneris piped or redirected, buffered prints could be left lingering and read as test executable output ifexecv()fails. This can happen easily if CI for example generates a testlist with an incorrect binary name, or an optional test binary (say,kms_chamelium) is not built for the deployment in question.Signed-off-by Petri Latvala <[email protected]>Cc Tomi Sarvela <[email protected]>Cc Arkadiusz Hiler <[email protected]>
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/1] runner: Flush igt_runner outputs before forking
In reply to Petri Latvala== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,1/1] runner: Flush igt_runner outputs before forking
URL : https://patchwork.freedesktop.org/series/49907/
State : success
== Summary ==
= CI Bug Log - changes from IGT_4645_full -> IGTPW_1858_full =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/49907/revisions/1/mbox/
== Known issues ==
Here are the changes found in IGTPW_1858_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
shard-glk: PASS -> DMESG-WARN (fdo#107956)
igt@kms_cursor_legacy@cursorb-vs-flipb-toggle:
shard-glk: PASS -> DMESG-WARN (fdo#105763, fdo#106538)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
shard-kbl: PASS -> INCOMPLETE (fdo#103665)
igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
shard-snb: PASS -> FAIL (fdo#103166)
igt@kms_vblank@pipe-b-wait-forked:
shard-apl: PASS -> DMESG-WARN (fdo#103558, fdo#105602) +5
==== Possible fixes ====
igt@kms_cursor_legacy@cursor-vs-flip-toggle:
shard-hsw: FAIL (fdo#103355) -> PASS
igt@kms_draw_crc@draw-method-xrgb8888-mmap-cpu-ytiled:
shard-glk: FAIL (fdo#107791) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
shard-kbl: INCOMPLETE (fdo#103665) -> PASS
igt@kms_rotation_crc@primary-rotation-180:
shard-snb: FAIL (fdo#103925) -> PASS fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#107791 https://bugs.freedesktop.org/show_bug.cgi?id=107791
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* IGT: IGT_4645 -> IGTPW_1858
* Linux: CI_DRM_4833 -> CI_DRM_4836
CI_DRM_4833: 75bb460b367a614d10b0fba220143bee42657d7e @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4836: b2b0444aa439ade1ed809a91a19d382fbb5e7700 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1858: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1858/
IGT_4645: 03b90a39ed12a568c9da752466ea708d6348e110 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1858/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev