All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] runner: Plug more fd leaks
@ 2018-10-02  7:45 Petri Latvala
  2018-10-02  7:45 ` [igt-dev] [PATCH i-g-t 2/2] runner: Add a unit test that checks for " Petri Latvala
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Petri Latvala @ 2018-10-02  7:45 UTC (permalink / raw)
  To: igt-dev

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 runner/resultgen.c    | 4 ++++
 runner/runner_tests.c | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/runner/resultgen.c b/runner/resultgen.c
index e8a60083..4e6528b8 100644
--- a/runner/resultgen.c
+++ b/runner/resultgen.c
@@ -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;
 }
 
diff --git a/runner/runner_tests.c b/runner/runner_tests.c
index b03f2acf..3705d711 100644
--- a/runner/runner_tests.c
+++ b/runner/runner_tests.c
@@ -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;
-- 
2.18.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [igt-dev] [PATCH i-g-t 2/2] runner: Add a unit test that checks for fd leaks
  2018-10-02  7:45 [igt-dev] [PATCH i-g-t 1/2] runner: Plug more fd leaks Petri Latvala
@ 2018-10-02  7:45 ` Petri Latvala
  2018-10-02  8:40 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] runner: Plug more " Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Petri Latvala @ 2018-10-02  7:45 UTC (permalink / raw)
  To: igt-dev

Pretty much needed, as proven.

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 runner/runner_tests.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/runner/runner_tests.c b/runner/runner_tests.c
index 3705d711..37d27123 100644
--- a/runner/runner_tests.c
+++ b/runner/runner_tests.c
@@ -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);
 }
-- 
2.18.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] runner: Plug more fd leaks
  2018-10-02  7:45 [igt-dev] [PATCH i-g-t 1/2] runner: Plug more fd leaks Petri Latvala
  2018-10-02  7:45 ` [igt-dev] [PATCH i-g-t 2/2] runner: Add a unit test that checks for " Petri Latvala
@ 2018-10-02  8:40 ` Patchwork
  2018-10-02  9:52 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2018-10-03  9:54 ` [igt-dev] [PATCH i-g-t 1/2] " Arkadiusz Hiler
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-10-02  8:40 UTC (permalink / raw)
  To: Petri Latvala; +Cc: igt-dev

== 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
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] runner: Plug more fd leaks
  2018-10-02  7:45 [igt-dev] [PATCH i-g-t 1/2] runner: Plug more fd leaks Petri Latvala
  2018-10-02  7:45 ` [igt-dev] [PATCH i-g-t 2/2] runner: Add a unit test that checks for " Petri Latvala
  2018-10-02  8:40 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] runner: Plug more " Patchwork
@ 2018-10-02  9:52 ` Patchwork
  2018-10-03  9:54 ` [igt-dev] [PATCH i-g-t 1/2] " Arkadiusz Hiler
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-10-02  9:52 UTC (permalink / raw)
  To: Petri Latvala; +Cc: igt-dev

== 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
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/2] runner: Plug more fd leaks
  2018-10-02  7:45 [igt-dev] [PATCH i-g-t 1/2] runner: Plug more fd leaks Petri Latvala
                   ` (2 preceding siblings ...)
  2018-10-02  9:52 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2018-10-03  9:54 ` Arkadiusz Hiler
  3 siblings, 0 replies; 5+ messages in thread
From: Arkadiusz Hiler @ 2018-10-03  9:54 UTC (permalink / raw)
  To: Petri Latvala; +Cc: igt-dev

On Tue, Oct 02, 2018 at 10:45:41AM +0300, Petri Latvala wrote:
> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>

Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>

for both
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-03  9:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-02  7:45 [igt-dev] [PATCH i-g-t 1/2] runner: Plug more fd leaks Petri Latvala
2018-10-02  7:45 ` [igt-dev] [PATCH i-g-t 2/2] runner: Add a unit test that checks for " Petri Latvala
2018-10-02  8:40 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] runner: Plug more " Patchwork
2018-10-02  9:52 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-10-03  9:54 ` [igt-dev] [PATCH i-g-t 1/2] " Arkadiusz Hiler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.