public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib: Show other clients when SETMASTER fails
@ 2019-05-15 10:21 Chris Wilson
  2019-05-15 11:05 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2019-05-15 10:21 UTC (permalink / raw)
  To: igt-dev; +Cc: Martin Peres

Currently we only show the clients at DEBUG level which is not
automatically shown for a SKIP. However, failing to SETMASTER is more
often a mistake and we do want to see the other clients. The choice is
at what level to show them? If we want to avoid having extra WARNs in
CI, we should keep them to INFO, but on the hand failing to acquire
SETMASTER is tantamount to failure, so WARN.

References: https://bugs.freedesktop.org/show_bug.cgi?id=110682
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Martin Peres <martin.peres@free.fr>
---
 lib/igt_debugfs.c |  4 ++--
 lib/igt_debugfs.h |  3 ++-
 lib/igt_device.c  | 17 +++++++++++++----
 3 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index dd229c099..82ce18344 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -1145,7 +1145,7 @@ int igt_get_stable_obj_count(int driver)
 	return obj_count;
 }
 
-void igt_debugfs_dump(int device, const char *filename)
+void __igt_debugfs_dump(int device, const char *filename, int level)
 {
 	char *contents;
 	int dir;
@@ -1154,6 +1154,6 @@ void igt_debugfs_dump(int device, const char *filename)
 	contents = igt_sysfs_get(dir, filename);
 	close(dir);
 
-	igt_debug("%s:\n%s\n", filename, contents);
+	igt_log(IGT_LOG_DOMAIN, level, "%s:\n%s\n", filename, contents);
 	free(contents);
 }
diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
index f8e57a6bf..52520b3c5 100644
--- a/lib/igt_debugfs.h
+++ b/lib/igt_debugfs.h
@@ -201,6 +201,7 @@ void igt_enable_prefault(void);
  * gem buffer objects
  */
 int igt_get_stable_obj_count(int driver);
-void igt_debugfs_dump(int device, const char *filename);
+void __igt_debugfs_dump(int device, const char *filename, int level);
+#define igt_debugfs_dump(d, f) __igt_debugfs_dump(d, f, IGT_LOG_DEBUG)
 
 #endif /* __IGT_DEBUGFS_H__ */
diff --git a/lib/igt_device.c b/lib/igt_device.c
index 08f39c8b1..9469e5de2 100644
--- a/lib/igt_device.c
+++ b/lib/igt_device.c
@@ -32,13 +32,20 @@ int __igt_device_set_master(int fd)
 	int err;
 
 	err = 0;
-	if (drmIoctl(fd, DRM_IOCTL_SET_MASTER, NULL))
+	if (drmIoctl(fd, DRM_IOCTL_SET_MASTER, NULL)) {
 		err = -errno;
+		igt_assume(err);
+	}
 
 	errno = 0;
 	return err;
 }
 
+static void show_clients(int fd)
+{
+	__igt_debugfs_dump(fd, "clients", IGT_LOG_WARN);
+}
+
 /**
  * igt_device_set_master: Set the device fd to be DRM master
  * @fd: the device
@@ -48,7 +55,7 @@ int __igt_device_set_master(int fd)
 void igt_device_set_master(int fd)
 {
 	if (__igt_device_set_master(fd)) {
-		igt_debugfs_dump(fd, "clients");
+		show_clients(fd);
 		igt_require_f(__igt_device_set_master(fd) == 0,
 			      "Can't become DRM master, "
 			      "please check if no other DRM client is running.\n");
@@ -60,8 +67,10 @@ int __igt_device_drop_master(int fd)
 	int err;
 
 	err = 0;
-	if (drmIoctl(fd, DRM_IOCTL_DROP_MASTER, NULL))
+	if (drmIoctl(fd, DRM_IOCTL_DROP_MASTER, NULL)) {
 		err = -errno;
+		igt_assume(err);
+	}
 
 	errno = 0;
 	return err;
@@ -81,7 +90,7 @@ void igt_device_drop_master(int fd)
 		return;
 
 	if (__igt_device_drop_master(fd)) {
-		igt_debugfs_dump(fd, "clients");
+		show_clients(fd);
 		igt_assert_f(__igt_device_drop_master(fd) == 0,
 			      "Failed to drop DRM master.\n");
 	}
-- 
2.20.1

_______________________________________________
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 lib: Show other clients when SETMASTER fails
  2019-05-15 10:21 [igt-dev] [PATCH i-g-t] lib: Show other clients when SETMASTER fails Chris Wilson
@ 2019-05-15 11:05 ` Patchwork
  2019-05-15 14:38 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2019-05-15 19:48 ` [igt-dev] [PATCH i-g-t] " Martin Peres
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-05-15 11:05 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: lib: Show other clients when SETMASTER fails
URL   : https://patchwork.freedesktop.org/series/60668/
State : success

== Summary ==

CI Bug Log - changes from IGT_4989 -> IGTPW_2985
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/60668/revisions/1/mbox/

Possible new issues
-------------------

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

### IGT changes ###

#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@gem_ctx_create@basic-files:
    - {fi-cml-u}:         [PASS][1] -> [INCOMPLETE][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/fi-cml-u/igt@gem_ctx_create@basic-files.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/fi-cml-u/igt@gem_ctx_create@basic-files.html

  
Known issues
------------

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live_contexts:
    - fi-bdw-gvtdvm:      [PASS][3] -> [DMESG-FAIL][4] ([fdo#110235])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html

  
#### Possible fixes ####

  * igt@amdgpu/amd_basic@userptr:
    - fi-kbl-8809g:       [DMESG-WARN][5] ([fdo#108965]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/fi-kbl-8809g/igt@amdgpu/amd_basic@userptr.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/fi-kbl-8809g/igt@amdgpu/amd_basic@userptr.html

  * igt@i915_selftest@live_hangcheck:
    - fi-skl-iommu:       [INCOMPLETE][7] ([fdo#108602] / [fdo#108744]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/fi-skl-iommu/igt@i915_selftest@live_hangcheck.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/fi-skl-iommu/igt@i915_selftest@live_hangcheck.html

  * igt@kms_frontbuffer_tracking@basic:
    - {fi-icl-u3}:        [FAIL][9] ([fdo#103167]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/fi-icl-u3/igt@kms_frontbuffer_tracking@basic.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/fi-icl-u3/igt@kms_frontbuffer_tracking@basic.html

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

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602
  [fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744
  [fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
  [fdo#110235]: https://bugs.freedesktop.org/show_bug.cgi?id=110235


Participating hosts (51 -> 45)
------------------------------

  Additional (3): fi-byt-j1900 fi-apl-guc fi-pnv-d510 
  Missing    (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-bsw-n3050 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * IGT: IGT_4989 -> IGTPW_2985

  CI_DRM_6085: 48d8cf5cc0aadd21924d05ad3e86b08d8e0e1c50 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2985: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/
  IGT_4989: 5b941737519c170c4710d1ec7823866ee080a67e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/
_______________________________________________
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 lib: Show other clients when SETMASTER fails
  2019-05-15 10:21 [igt-dev] [PATCH i-g-t] lib: Show other clients when SETMASTER fails Chris Wilson
  2019-05-15 11:05 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2019-05-15 14:38 ` Patchwork
  2019-05-15 19:48 ` [igt-dev] [PATCH i-g-t] " Martin Peres
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-05-15 14:38 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: lib: Show other clients when SETMASTER fails
URL   : https://patchwork.freedesktop.org/series/60668/
State : success

== Summary ==

CI Bug Log - changes from IGT_4989_full -> IGTPW_2985_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/60668/revisions/1/mbox/

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_isolation@vcs1-s3:
    - shard-kbl:          [PASS][1] -> [INCOMPLETE][2] ([fdo#103665])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-kbl3/igt@gem_ctx_isolation@vcs1-s3.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-kbl3/igt@gem_ctx_isolation@vcs1-s3.html

  * igt@i915_pm_rc6_residency@rc6-accuracy:
    - shard-snb:          [PASS][3] -> [SKIP][4] ([fdo#109271])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-snb1/igt@i915_pm_rc6_residency@rc6-accuracy.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-snb1/igt@i915_pm_rc6_residency@rc6-accuracy.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw:
    - shard-iclb:         [PASS][5] -> [FAIL][6] ([fdo#103167]) +2 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw.html

  * igt@kms_psr@psr2_cursor_blt:
    - shard-iclb:         [PASS][7] -> [SKIP][8] ([fdo#109441]) +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-iclb7/igt@kms_psr@psr2_cursor_blt.html

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-kbl:          [PASS][9] -> [FAIL][10] ([fdo#109016])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-kbl2/igt@kms_rotation_crc@multiplane-rotation-cropping-top.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-kbl3/igt@kms_rotation_crc@multiplane-rotation-cropping-top.html

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-apl:          [PASS][11] -> [DMESG-WARN][12] ([fdo#108566]) +6 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-apl4/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-apl7/igt@kms_vblank@pipe-c-ts-continuation-suspend.html

  
#### Possible fixes ####

  * igt@gem_workarounds@suspend-resume:
    - shard-apl:          [DMESG-WARN][13] ([fdo#108566]) -> [PASS][14] +2 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-apl8/igt@gem_workarounds@suspend-resume.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-apl8/igt@gem_workarounds@suspend-resume.html

  * igt@i915_pm_rpm@i2c:
    - shard-iclb:         [FAIL][15] ([fdo#104097]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-iclb6/igt@i915_pm_rpm@i2c.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-iclb6/igt@i915_pm_rpm@i2c.html

  * igt@kms_frontbuffer_tracking@fbc-1p-rte:
    - shard-kbl:          [FAIL][17] ([fdo#103167] / [fdo#110378]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-kbl7/igt@kms_frontbuffer_tracking@fbc-1p-rte.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-1p-rte.html
    - shard-apl:          [FAIL][19] ([fdo#103167] / [fdo#110378]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-apl1/igt@kms_frontbuffer_tracking@fbc-1p-rte.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-apl2/igt@kms_frontbuffer_tracking@fbc-1p-rte.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-msflip-blt:
    - shard-iclb:         [FAIL][21] ([fdo#103167]) -> [PASS][22] +3 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-msflip-blt.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-msflip-blt.html

  * igt@kms_psr@psr2_sprite_plane_move:
    - shard-iclb:         [SKIP][23] ([fdo#109441]) -> [PASS][24] +1 similar issue
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-iclb3/igt@kms_psr@psr2_sprite_plane_move.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html

  * igt@perf_pmu@busy-bcs0:
    - shard-iclb:         [SKIP][25] ([fdo#110682]) -> [PASS][26] +8 similar issues
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-iclb8/igt@perf_pmu@busy-bcs0.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-iclb7/igt@perf_pmu@busy-bcs0.html

  * igt@tools_test@tools_test:
    - shard-snb:          [SKIP][27] ([fdo#109271]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-snb6/igt@tools_test@tools_test.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-snb5/igt@tools_test@tools_test.html

  
#### Warnings ####

  * igt@gem_mmap_gtt@forked-big-copy-xy:
    - shard-iclb:         [INCOMPLETE][29] ([fdo#107713] / [fdo#109100]) -> [TIMEOUT][30] ([fdo#109673])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-iclb8/igt@gem_mmap_gtt@forked-big-copy-xy.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-iclb1/igt@gem_mmap_gtt@forked-big-copy-xy.html

  * igt@kms_atomic_transition@2x-modeset-transitions-nonblocking:
    - shard-iclb:         [SKIP][31] ([fdo#110682]) -> [SKIP][32] ([fdo#109280]) +3 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-iclb8/igt@kms_atomic_transition@2x-modeset-transitions-nonblocking.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-iclb8/igt@kms_atomic_transition@2x-modeset-transitions-nonblocking.html

  * igt@kms_chamelium@dp-hpd-after-suspend:
    - shard-iclb:         [SKIP][33] ([fdo#110682]) -> [SKIP][34] ([fdo#109284])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-iclb8/igt@kms_chamelium@dp-hpd-after-suspend.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-iclb2/igt@kms_chamelium@dp-hpd-after-suspend.html

  * igt@kms_cursor_legacy@cursorb-vs-flipa-atomic-transitions:
    - shard-iclb:         [SKIP][35] ([fdo#110682]) -> [SKIP][36] ([fdo#109274]) +1 similar issue
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4989/shard-iclb8/igt@kms_cursor_legacy@cursorb-vs-flipa-atomic-transitions.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/shard-iclb4/igt@kms_cursor_legacy@cursorb-vs-flipa-atomic-transitions.html

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

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#104097]: https://bugs.freedesktop.org/show_bug.cgi?id=104097
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
  [fdo#110378]: https://bugs.freedesktop.org/show_bug.cgi?id=110378
  [fdo#110682]: https://bugs.freedesktop.org/show_bug.cgi?id=110682


Participating hosts (7 -> 6)
------------------------------

  Missing    (1): shard-skl 


Build changes
-------------

  * IGT: IGT_4989 -> IGTPW_2985

  CI_DRM_6085: 48d8cf5cc0aadd21924d05ad3e86b08d8e0e1c50 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2985: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/
  IGT_4989: 5b941737519c170c4710d1ec7823866ee080a67e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2985/
_______________________________________________
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] lib: Show other clients when SETMASTER fails
  2019-05-15 10:21 [igt-dev] [PATCH i-g-t] lib: Show other clients when SETMASTER fails Chris Wilson
  2019-05-15 11:05 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2019-05-15 14:38 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-05-15 19:48 ` Martin Peres
  2019-05-15 20:12   ` Chris Wilson
  2 siblings, 1 reply; 5+ messages in thread
From: Martin Peres @ 2019-05-15 19:48 UTC (permalink / raw)
  To: Chris Wilson, igt-dev

On 15/05/2019 13:21, Chris Wilson wrote:
> Currently we only show the clients at DEBUG level which is not
> automatically shown for a SKIP. However, failing to SETMASTER is more
> often a mistake and we do want to see the other clients. The choice is
> at what level to show them? If we want to avoid having extra WARNs in
> CI, we should keep them to INFO, but on the hand failing to acquire
> SETMASTER is tantamount to failure, so WARN.
> 
> References: https://bugs.freedesktop.org/show_bug.cgi?id=110682
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Martin Peres <martin.peres@free.fr>

Thanks for doing this!

Acked-by: Martin Peres <martin.peres@linux.intel.com>


> ---
>  lib/igt_debugfs.c |  4 ++--
>  lib/igt_debugfs.h |  3 ++-
>  lib/igt_device.c  | 17 +++++++++++++----
>  3 files changed, 17 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index dd229c099..82ce18344 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -1145,7 +1145,7 @@ int igt_get_stable_obj_count(int driver)
>  	return obj_count;
>  }
>  
> -void igt_debugfs_dump(int device, const char *filename)
> +void __igt_debugfs_dump(int device, const char *filename, int level)
>  {
>  	char *contents;
>  	int dir;
> @@ -1154,6 +1154,6 @@ void igt_debugfs_dump(int device, const char *filename)
>  	contents = igt_sysfs_get(dir, filename);
>  	close(dir);
>  
> -	igt_debug("%s:\n%s\n", filename, contents);
> +	igt_log(IGT_LOG_DOMAIN, level, "%s:\n%s\n", filename, contents);
>  	free(contents);
>  }
> diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
> index f8e57a6bf..52520b3c5 100644
> --- a/lib/igt_debugfs.h
> +++ b/lib/igt_debugfs.h
> @@ -201,6 +201,7 @@ void igt_enable_prefault(void);
>   * gem buffer objects
>   */
>  int igt_get_stable_obj_count(int driver);
> -void igt_debugfs_dump(int device, const char *filename);
> +void __igt_debugfs_dump(int device, const char *filename, int level);
> +#define igt_debugfs_dump(d, f) __igt_debugfs_dump(d, f, IGT_LOG_DEBUG)
>  
>  #endif /* __IGT_DEBUGFS_H__ */
> diff --git a/lib/igt_device.c b/lib/igt_device.c
> index 08f39c8b1..9469e5de2 100644
> --- a/lib/igt_device.c
> +++ b/lib/igt_device.c
> @@ -32,13 +32,20 @@ int __igt_device_set_master(int fd)
>  	int err;
>  
>  	err = 0;
> -	if (drmIoctl(fd, DRM_IOCTL_SET_MASTER, NULL))
> +	if (drmIoctl(fd, DRM_IOCTL_SET_MASTER, NULL)) {
>  		err = -errno;
> +		igt_assume(err);
> +	}
>  
>  	errno = 0;
>  	return err;
>  }
>  
> +static void show_clients(int fd)
> +{
> +	__igt_debugfs_dump(fd, "clients", IGT_LOG_WARN);
> +}
> +
>  /**
>   * igt_device_set_master: Set the device fd to be DRM master
>   * @fd: the device
> @@ -48,7 +55,7 @@ int __igt_device_set_master(int fd)
>  void igt_device_set_master(int fd)
>  {
>  	if (__igt_device_set_master(fd)) {
> -		igt_debugfs_dump(fd, "clients");
> +		show_clients(fd);
>  		igt_require_f(__igt_device_set_master(fd) == 0,
>  			      "Can't become DRM master, "
>  			      "please check if no other DRM client is running.\n");
> @@ -60,8 +67,10 @@ int __igt_device_drop_master(int fd)
>  	int err;
>  
>  	err = 0;
> -	if (drmIoctl(fd, DRM_IOCTL_DROP_MASTER, NULL))
> +	if (drmIoctl(fd, DRM_IOCTL_DROP_MASTER, NULL)) {
>  		err = -errno;
> +		igt_assume(err);
> +	}
>  
>  	errno = 0;
>  	return err;
> @@ -81,7 +90,7 @@ void igt_device_drop_master(int fd)
>  		return;
>  
>  	if (__igt_device_drop_master(fd)) {
> -		igt_debugfs_dump(fd, "clients");
> +		show_clients(fd);
>  		igt_assert_f(__igt_device_drop_master(fd) == 0,
>  			      "Failed to drop DRM master.\n");
>  	}
> 

_______________________________________________
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] lib: Show other clients when SETMASTER fails
  2019-05-15 19:48 ` [igt-dev] [PATCH i-g-t] " Martin Peres
@ 2019-05-15 20:12   ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2019-05-15 20:12 UTC (permalink / raw)
  To: Martin Peres, igt-dev

Quoting Martin Peres (2019-05-15 20:48:17)
> On 15/05/2019 13:21, Chris Wilson wrote:
> > Currently we only show the clients at DEBUG level which is not
> > automatically shown for a SKIP. However, failing to SETMASTER is more
> > often a mistake and we do want to see the other clients. The choice is
> > at what level to show them? If we want to avoid having extra WARNs in
> > CI, we should keep them to INFO, but on the hand failing to acquire
> > SETMASTER is tantamount to failure, so WARN.
> > 
> > References: https://bugs.freedesktop.org/show_bug.cgi?id=110682
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Martin Peres <martin.peres@free.fr>
> 
> Thanks for doing this!
> 
> Acked-by: Martin Peres <martin.peres@linux.intel.com>

Let's stick it and see how much we regret it in the morning.
-Chris
_______________________________________________
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:[~2019-05-15 20:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-15 10:21 [igt-dev] [PATCH i-g-t] lib: Show other clients when SETMASTER fails Chris Wilson
2019-05-15 11:05 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-05-15 14:38 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-05-15 19:48 ` [igt-dev] [PATCH i-g-t] " Martin Peres
2019-05-15 20:12   ` Chris Wilson

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