All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH igt] tests: Use igt_device_set_master
@ 2017-12-08 18:11 Chris Wilson
  2017-12-08 20:14 ` ✗ Fi.CI.BAT: warning for " Patchwork
  2017-12-11  9:36 ` [PATCH igt] " Joonas Lahtinen
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2017-12-08 18:11 UTC (permalink / raw)
  To: intel-gfx

A few tests only require DRM_MASTER privileges for a subset of gen or
tests, and so open the device as normal and conditionally call
drmSetMaster. Translate these over to using igt_device_set_master(),
which includes a bit more debugging for when it fails.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/gem_exec_nop.c    | 3 ++-
 tests/gem_exec_params.c | 6 ++++--
 tests/gem_exec_store.c  | 3 ++-
 tests/gem_ringfill.c    | 3 ++-
 4 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c
index b5f158078..668dcb949 100644
--- a/tests/gem_exec_nop.c
+++ b/tests/gem_exec_nop.c
@@ -26,6 +26,7 @@
  */
 
 #include "igt.h"
+#include "igt_device.h"
 #include "igt_rand.h"
 #include "igt_sysfs.h"
 
@@ -710,7 +711,7 @@ igt_main
 
 	igt_subtest("headless") {
 		/* Requires master for changing display modes */
-		igt_require(drmSetMaster(device) == 0);
+		igt_device_set_master(device);
 		headless(device, handle);
 	}
 
diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
index 5b72072b2..e1c48b408 100644
--- a/tests/gem_exec_params.c
+++ b/tests/gem_exec_params.c
@@ -26,6 +26,8 @@
  */
 
 #include "igt.h"
+#include "igt_device.h"
+
 #include <unistd.h>
 #include <stdlib.h>
 #include <stdint.h>
@@ -341,10 +343,10 @@ igt_main
 	}
 
 	igt_subtest("secure-non-master") {
-		do_or_die(drmDropMaster(fd));
+		igt_device_drop_master(fd);
 		execbuf.flags = I915_EXEC_RENDER | I915_EXEC_SECURE;
 		RUN_FAIL(EPERM);
-		do_or_die(drmSetMaster(fd));
+		igt_device_set_master(fd);
 		igt_assert(drmIoctl(fd,
 				    DRM_IOCTL_I915_GEM_EXECBUFFER2,
 				    &execbuf) == 0);
diff --git a/tests/gem_exec_store.c b/tests/gem_exec_store.c
index 545a4b561..31a2c0967 100644
--- a/tests/gem_exec_store.c
+++ b/tests/gem_exec_store.c
@@ -28,6 +28,7 @@
  */
 
 #include "igt.h"
+#include "igt_device.h"
 #include "igt_gt.h"
 #include <strings.h>
 
@@ -320,7 +321,7 @@ igt_main
 
 		gen = print_welcome(fd);
 		if (gen > 3 && gen < 6) /* ctg and ilk need secure batches */
-			igt_require(drmSetMaster(fd) == 0);
+			igt_device_set_master(fd);
 
 		igt_require_gem(fd);
 		igt_require(gem_can_store_dword(fd, 0));
diff --git a/tests/gem_ringfill.c b/tests/gem_ringfill.c
index 84cd49c19..c3376a675 100644
--- a/tests/gem_ringfill.c
+++ b/tests/gem_ringfill.c
@@ -32,6 +32,7 @@
  */
 
 #include "igt.h"
+#include "igt_device.h"
 #include "igt_gt.h"
 #include "igt_vgem.h"
 
@@ -360,7 +361,7 @@ igt_main
 		igt_require(gem_can_store_dword(fd, 0));
 		gen = intel_gen(intel_get_drm_devid(fd));
 		if (gen > 3 && gen < 6) { /* ctg and ilk need secure batches */
-			igt_require(drmSetMaster(fd) == 0);
+			igt_device_set_master(fd);
 			master = true;
 		}
 
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.BAT: warning for tests: Use igt_device_set_master
  2017-12-08 18:11 [PATCH igt] tests: Use igt_device_set_master Chris Wilson
@ 2017-12-08 20:14 ` Patchwork
  2017-12-11  9:36 ` [PATCH igt] " Joonas Lahtinen
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2017-12-08 20:14 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: tests: Use igt_device_set_master
URL   : https://patchwork.freedesktop.org/series/35106/
State : warning

== Summary ==

IGT patchset tested on top of latest successful build
37339e7171ee0bd6b45abf8cfef593ed9d8bf750 lib: Print other clients when DRM_SET_MASTER fails

with latest DRM-Tip kernel build CI_DRM_3486
3e49efc6d2d7 drm-tip: 2017y-12m-08d-18h-21m-46s UTC integration manifest

No testlist changes.

Test debugfs_test:
        Subgroup read_all_entries:
                dmesg-warn -> PASS       (fi-elk-e7500) fdo#103989 +1
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                dmesg-warn -> PASS       (fi-kbl-r) fdo#104172
        Subgroup suspend-read-crc-pipe-b:
                incomplete -> PASS       (fi-snb-2520m) fdo#103713
                pass       -> DMESG-WARN (fi-kbl-r)

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:436s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:388s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:536s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:283s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:509s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:513s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:496s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:479s
fi-elk-e7500     total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:179  dwarn:1   dfail:0   fail:0   skip:108 time:273s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:544s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:361s
fi-hsw-4770r     total:288  pass:224  dwarn:0   dfail:0   fail:0   skip:64  time:261s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:395s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:487s
fi-ivb-3770      total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:447s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:488s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:532s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:473s
fi-kbl-r         total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:533s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:600s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:452s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:540s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:570s
fi-skl-6700k     total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:520s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:501s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:452s
fi-snb-2520m     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:553s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:422s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:608s
fi-cnl-y         total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:653s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:493s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_632/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH igt] tests: Use igt_device_set_master
  2017-12-08 18:11 [PATCH igt] tests: Use igt_device_set_master Chris Wilson
  2017-12-08 20:14 ` ✗ Fi.CI.BAT: warning for " Patchwork
@ 2017-12-11  9:36 ` Joonas Lahtinen
  1 sibling, 0 replies; 3+ messages in thread
From: Joonas Lahtinen @ 2017-12-11  9:36 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On Fri, 2017-12-08 at 18:11 +0000, Chris Wilson wrote:
> A few tests only require DRM_MASTER privileges for a subset of gen or
> tests, and so open the device as normal and conditionally call
> drmSetMaster. Translate these over to using igt_device_set_master(),
> which includes a bit more debugging for when it fails.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-12-11  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-08 18:11 [PATCH igt] tests: Use igt_device_set_master Chris Wilson
2017-12-08 20:14 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-12-11  9:36 ` [PATCH igt] " Joonas Lahtinen

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.