Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATH i-g-t] igt_sysfs: Avoid double closing the fd in igt_sysfs_scanf
@ 2018-09-13 15:06 Tvrtko Ursulin
  2018-09-13 15:20 ` Chris Wilson
  2018-09-13 16:14 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Tvrtko Ursulin @ 2018-09-13 15:06 UTC (permalink / raw)
  To: igt-dev; +Cc: Intel-gfx, Tvrtko Ursulin

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

fdopen takes ownership of the fd so only one flavour of closing it is
needed.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 lib/igt_sysfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
index 9012cc73f6e3..d323b81dd986 100644
--- a/lib/igt_sysfs.c
+++ b/lib/igt_sysfs.c
@@ -379,8 +379,9 @@ int igt_sysfs_scanf(int dir, const char *attr, const char *fmt, ...)
 		va_end(ap);
 
 		fclose(file);
+	} else {
+		close(fd);
 	}
-	close(fd);
 
 	return ret;
 }
-- 
2.17.1

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

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

* Re: [igt-dev] [PATH i-g-t] igt_sysfs: Avoid double closing the fd in igt_sysfs_scanf
  2018-09-13 15:06 [igt-dev] [PATH i-g-t] igt_sysfs: Avoid double closing the fd in igt_sysfs_scanf Tvrtko Ursulin
@ 2018-09-13 15:20 ` Chris Wilson
  2018-09-13 16:14 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2018-09-13 15:20 UTC (permalink / raw)
  To: Tvrtko Ursulin, igt-dev; +Cc: Intel-gfx, Tvrtko Ursulin

Quoting Tvrtko Ursulin (2018-09-13 16:06:13)
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> fdopen takes ownership of the fd so only one flavour of closing it is
> needed.

Indeed, I always seem to get burned by this. One day I might remember...
Who am I kidding? :)
 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ Fi.CI.BAT: failure for igt_sysfs: Avoid double closing the fd in igt_sysfs_scanf
  2018-09-13 15:06 [igt-dev] [PATH i-g-t] igt_sysfs: Avoid double closing the fd in igt_sysfs_scanf Tvrtko Ursulin
  2018-09-13 15:20 ` Chris Wilson
@ 2018-09-13 16:14 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2018-09-13 16:14 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: igt-dev

== Series Details ==

Series: igt_sysfs: Avoid double closing the fd in igt_sysfs_scanf
URL   : https://patchwork.freedesktop.org/series/49646/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4807 -> IGTPW_1836 =

== Summary - FAILURE ==

  Serious unknown changes coming with IGTPW_1836 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1836, 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/49646/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in IGTPW_1836:

  === IGT changes ===

    ==== Possible regressions ====

    igt@drv_selftest@live_contexts:
      fi-bsw-n3050:       PASS -> DMESG-WARN

    
== Known issues ==

  Here are the changes found in IGTPW_1836 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_coherency:
      fi-gdg-551:         PASS -> DMESG-FAIL (fdo#107164)

    igt@gem_exec_suspend@basic-s3:
      fi-kbl-soraka:      NOTRUN -> INCOMPLETE (fdo#107556, fdo#107774)

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
      fi-byt-clapper:     PASS -> FAIL (fdo#107362, fdo#103191) +1

    igt@kms_psr@primary_mmap_gtt:
      {fi-cnl-u}:         NOTRUN -> FAIL (fdo#107383) +3

    igt@kms_psr@primary_page_flip:
      fi-kbl-7560u:       PASS -> FAIL (fdo#107336)

    igt@pm_rpm@module-reload:
      fi-hsw-peppy:       NOTRUN -> DMESG-WARN (fdo#107603)

    
    ==== Possible fixes ====

    igt@gem_exec_suspend@basic-s3:
      fi-blb-e6850:       INCOMPLETE (fdo#107718) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-cfl-8109u:       INCOMPLETE (fdo#106070) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-bxt-dsi:         INCOMPLETE (fdo#103927) -> PASS

    
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#106070 https://bugs.freedesktop.org/show_bug.cgi?id=106070
  fdo#107164 https://bugs.freedesktop.org/show_bug.cgi?id=107164
  fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107383 https://bugs.freedesktop.org/show_bug.cgi?id=107383
  fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
  fdo#107603 https://bugs.freedesktop.org/show_bug.cgi?id=107603
  fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
  fdo#107774 https://bugs.freedesktop.org/show_bug.cgi?id=107774


== Participating hosts (46 -> 45) ==

  Additional (4): fi-kbl-soraka fi-cnl-u fi-icl-u fi-hsw-peppy 
  Missing    (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * IGT: IGT_4639 -> IGTPW_1836

  CI_DRM_4807: 55b148b84b254f61adbfeb89c4f6674664f01c46 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1836: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1836/
  IGT_4639: c7fa2ea9fbce87206474748100b825558eebe08e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1836/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2018-09-13 16:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-13 15:06 [igt-dev] [PATH i-g-t] igt_sysfs: Avoid double closing the fd in igt_sysfs_scanf Tvrtko Ursulin
2018-09-13 15:20 ` Chris Wilson
2018-09-13 16:14 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox