runner: Plug more fd leaks
PATCH 1/2 runner: Plug more fd leaks
--- runner/resultgen.c | 4 ++++ runner/runner_tests.c | 2 ++ 2 files changed, 6 insertions(+)
runner/resultgen.c +4 -0
@@ -809,6 +809,7 @@ static void fill_from_journal(int fd, }free (line); +fclose (f); }static void override_result_single (struct json_object *obj)
@@ -1058,13 +1059,16 @@ bool generate_results(int dirfd) }if (!parse_test_directory (testdirfd, &job_list.entries[i], &settings, &results)) { +close (testdirfd);close (resultsfd);return false; } +close (testdirfd); } json_string =json_object_to_json_string_ext (obj,JSON_C_TO_STRING_PRETTY );write (resultsfd, json_string,strlen (json_string)); +close (resultsfd);return true; }
runner/runner_tests.c +2 -0
@@ -50,6 +50,8 @@ static char *dump_file(int dirfd, char *name) } s =read (fd, buf,255 ); +close (fd); +if (s <0 ) {free (buf);return NULL ;
Signature · 6 lines
2.18.0 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH 2/2 runner: Add a unit test that checks for fd leaks
Pretty much needed, as proven.
--- runner/runner_tests.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
runner/runner_tests.c +18 -0
@@ -1003,6 +1003,24 @@ igt_main } } + igt_subtest("file-descriptor-leakage") { +int i; + +/* +* This is a build-time test, and it's expected that +* all subtests are normally run. Keep this one at the +* end. +* +* Try to close some number of fds after stderr and +* expect EBADF for each one. +*/ +for (i =3 ; i <400 ; i++) { + errno =0 ; +igt_assert_neq (close (i),0 ); +igt_assert_eq (errno,EBADF ); + } + } +igt_fixture free_settings(&settings); }
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/2] runner: Plug more fd leaks
In reply to Petri Latvala== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,1/2] runner: Plug more fd leaks
URL : https://patchwork.freedesktop.org/series/50429/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4910 -> IGTPW_1889 =
== Summary - WARNING ==
Minor unknown changes coming with IGTPW_1889 need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_1889, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/50429/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1889:
=== IGT changes ===
==== Warnings ====
igt@drv_selftest@live_requests:
fi-bxt-j4205: PASS -> SKIP +14
igt@kms_pipe_crc_basic@bad-source:
fi-kbl-8809g: PASS -> SKIP== Known issues ==
Here are the changes found in IGTPW_1889 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@amdgpu/amd_prime@amd-to-i915:
fi-bxt-j4205: SKIP -> TIMEOUT (fdo#108075) +1
igt@gem_exec_suspend@basic-s4-devices:
fi-bdw-samus: NOTRUN -> INCOMPLETE (fdo#107773)
igt@kms_frontbuffer_tracking@basic:
fi-byt-clapper: PASS -> FAIL (fdo#103167)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-byt-clapper: PASS -> FAIL (fdo#107362, fdo#103191)
igt@pm_rpm@module-reload:
fi-bxt-j4205: PASS -> FAIL (fdo#107712)
==== Possible fixes ====
igt@gem_exec_suspend@basic-s3:
fi-bdw-samus: INCOMPLETE (fdo#107773) -> PASS
igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
fi-skl-guc: FAIL (fdo#103191) -> PASS fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107712 https://bugs.freedesktop.org/show_bug.cgi?id=107712
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
fdo#108075 https://bugs.freedesktop.org/show_bug.cgi?id=108075
== Participating hosts (49 -> 43) ==
Additional (1): fi-icl-u
Missing (7): fi-hsw-4770r fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-icl-u2 fi-ctg-p8600 fi-skl-caroline
== Build changes ==
* IGT: IGT_4658 -> IGTPW_1889
CI_DRM_4910: 2d43c51db93c421e28670e041e54bb3bcbc9bbad @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1889: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1889/
IGT_4658: cab89ce2c5da684d01deff402d4e8e11441beadb @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1889/issues.html
_______________________________________________
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/2] runner: Plug more fd leaks
In reply to Petri Latvala== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,1/2] runner: Plug more fd leaks
URL : https://patchwork.freedesktop.org/series/50429/
State : success
== Summary ==
= CI Bug Log - changes from IGT_4658_full -> IGTPW_1889_full =
== Summary - WARNING ==
Minor unknown changes coming with IGTPW_1889_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_1889_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/50429/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1889_full:
=== IGT changes ===
==== Warnings ====
igt@perf_pmu@rc6:
shard-kbl: PASS -> SKIP== Known issues ==
Here are the changes found in IGTPW_1889_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_suspend@sysfs-reader:
shard-kbl: PASS -> INCOMPLETE (fdo#103665)
igt@kms_cursor_legacy@cursor-vs-flip-toggle:
shard-hsw: PASS -> FAIL (fdo#103355)
igt@kms_setmode@basic:
shard-kbl: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@gem_ppgtt@blt-vs-render-ctxn:
shard-kbl: INCOMPLETE (fdo#106023, fdo#103665) -> PASS
igt@kms_draw_crc@draw-method-xrgb8888-render-ytiled:
shard-glk: FAIL (fdo#103232) -> PASS
igt@kms_flip@2x-plain-flip-fb-recreate:
shard-glk: FAIL (fdo#100368) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-indfb-fliptrack:
shard-glk: FAIL (fdo#103167) -> PASS
igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
shard-kbl: INCOMPLETE (fdo#103665) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (6 -> 5) ==
Missing (1): shard-skl
== Build changes ==
* IGT: IGT_4658 -> IGTPW_1889
* Linux: CI_DRM_4905 -> CI_DRM_4910
CI_DRM_4905: 4d5d563418cb731acc0e628c936e77c1172ccbdb @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4910: 2d43c51db93c421e28670e041e54bb3bcbc9bbad @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1889: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1889/
IGT_4658: cab89ce2c5da684d01deff402d4e8e11441beadb @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1889/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 2 lines · Petri Latvala
Signed-off-by Petri Latvala <[email protected]>Cc Arkadiusz Hiler <[email protected]>
for both
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev