All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t] i915: Exercise sysfs client properties
@ 2021-01-22 21:34 ` Chris Wilson
  0 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2021-01-22 21:34 UTC (permalink / raw)
  To: igt-dev; +Cc: intel-gfx, Chris Wilson

We store every client name, pid and runtime under sysfs. Better check
that matches with the actual client.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/igt_sysfs.c            |  36 ++++
 lib/igt_sysfs.h            |   3 +
 tests/Makefile.sources     |   3 +
 tests/i915/sysfs_clients.c | 361 +++++++++++++++++++++++++++++++++++++
 tests/meson.build          |   1 +
 5 files changed, 404 insertions(+)
 create mode 100644 tests/i915/sysfs_clients.c

diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
index 6aafe5349..e734143ba 100644
--- a/lib/igt_sysfs.c
+++ b/lib/igt_sysfs.c
@@ -378,6 +378,42 @@ uint32_t igt_sysfs_get_u32(int dir, const char *attr)
 	return result;
 }
 
+/**
+ * igt_sysfs_get_u64:
+ * @dir: directory for the device from igt_sysfs_open()
+ * @attr: name of the sysfs node to open
+ *
+ * Convenience wrapper to read a unsigned 64bit integer from a sysfs file.
+ *
+ * Returns:
+ * The value read.
+ */
+uint64_t igt_sysfs_get_u64(int dir, const char *attr)
+{
+	uint64_t result;
+
+	if (igt_sysfs_scanf(dir, attr, "%"PRIu64, &result) != 1)
+		return 0;
+
+	return result;
+}
+
+/**
+ * igt_sysfs_set_u64:
+ * @dir: directory for the device from igt_sysfs_open()
+ * @attr: name of the sysfs node to open
+ * @value: value to set
+ *
+ * Convenience wrapper to write a unsigned 64bit integer to a sysfs file.
+ *
+ * Returns:
+ * True if successfully written
+ */
+bool igt_sysfs_set_u64(int dir, const char *attr, uint64_t value)
+{
+	return igt_sysfs_printf(dir, attr, "%"PRIu64, value) > 0;
+}
+
 /**
  * igt_sysfs_set_u32:
  * @dir: directory for the device from igt_sysfs_open()
diff --git a/lib/igt_sysfs.h b/lib/igt_sysfs.h
index 64935a5ca..56741a0a3 100644
--- a/lib/igt_sysfs.h
+++ b/lib/igt_sysfs.h
@@ -47,6 +47,9 @@ int igt_sysfs_printf(int dir, const char *attr, const char *fmt, ...)
 uint32_t igt_sysfs_get_u32(int dir, const char *attr);
 bool igt_sysfs_set_u32(int dir, const char *attr, uint32_t value);
 
+uint64_t igt_sysfs_get_u64(int dir, const char *attr);
+bool igt_sysfs_set_u64(int dir, const char *attr, uint64_t value);
+
 bool igt_sysfs_get_boolean(int dir, const char *attr);
 bool igt_sysfs_set_boolean(int dir, const char *attr, bool value);
 
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 1c227e750..3f663fe7e 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -114,6 +114,9 @@ TESTS_progs = \
 TESTS_progs += api_intel_bb
 api_intel_bb_SOURCES = i915/api_intel_bb.c
 
+TESTS_progs += sysfs_clients
+sysfs_clients_SOURCES = i915/sysfs_clients.c
+
 TESTS_progs += sysfs_defaults
 sysfs_defaults_SOURCES = i915/sysfs_defaults.c
 
diff --git a/tests/i915/sysfs_clients.c b/tests/i915/sysfs_clients.c
new file mode 100644
index 000000000..3a5c4cedf
--- /dev/null
+++ b/tests/i915/sysfs_clients.c
@@ -0,0 +1,361 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2021 Intel Corporation
+ */
+
+#include <ctype.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "drmtest.h"
+#include "i915/gem.h"
+#include "i915/gem_context.h"
+#include "i915/gem_engine_topology.h"
+#include "igt_aux.h"
+#include "igt_dummyload.h"
+#include "igt_sysfs.h"
+#include "ioctl_wrappers.h"
+
+static void pidname(int i915, int clients)
+{
+	struct dirent *de;
+	int sv[2], rv[2];
+	char buf[280];
+	int me = -1;
+	long count;
+	pid_t pid;
+	DIR *dir;
+	int len;
+
+	dir = fdopendir(dup(clients));
+	igt_assert(dir);
+	rewinddir(dir);
+
+	count = 0;
+	while ((de = readdir(dir))) {
+		if (!isdigit(de->d_name[0]))
+			continue;
+
+		snprintf(buf, sizeof(buf), "%s/name", de->d_name);
+		len = igt_sysfs_read(clients, buf, buf, sizeof(buf));
+		igt_assert_f(len > 0, "failed to open '%s/name'\n", de->d_name);
+		buf[len - 1] = '\0';
+		igt_debug("%s: %s\n", de->d_name, buf);
+
+		/* Ignore closed clients created by drm_driver_open() */
+		if (*buf == '<')
+			continue;
+
+		close(me);
+		me = openat(clients, de->d_name, O_DIRECTORY | O_RDONLY);
+		count++;
+	}
+	closedir(dir);
+
+	/* We expect there to be only the single client (us) running */
+	igt_assert_eq(count, 1);
+	igt_assert(me >= 0);
+
+	len = igt_sysfs_read(me, "name", buf, sizeof(buf));
+	igt_assert(len > 0);
+	buf[len - 1] = '\0';
+
+	igt_info("My name: %s\n", buf);
+	igt_assert(strcmp(buf, igt_test_name()) == 0);
+
+	igt_assert(pipe(sv) == 0);
+	igt_assert(pipe(rv) == 0);
+
+	/* If give our fd to someone else, they take over ownership of client */
+	igt_fork(child, 1) {
+		read(sv[0], &pid, sizeof(pid));
+
+		gem_context_destroy(i915, gem_context_create(i915));
+
+		pid = getpid();
+		write(rv[1], &pid, sizeof(pid));
+	}
+	close(sv[0]);
+	close(rv[1]);
+
+	/* Child exists, but not yet running, we still own the client */
+	len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
+	igt_assert(len > 0);
+	buf[len - 1] = '\0';
+
+	pid = getpid();
+	igt_info("My pid: %s\n", buf);
+	igt_assert_eq(atoi(buf), pid);
+
+	/* Release and wait for the child */
+	igt_assert_eq(write(sv[1], &pid, sizeof(pid)), sizeof(pid));
+	igt_assert_eq(read(rv[0], &pid, sizeof(pid)), sizeof(pid));
+
+	/* Now child owns the client and pid should be updated to match */
+	len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
+	igt_assert(len > 0);
+	buf[len - 1] = '\0';
+
+	igt_info("New pid: %s\n", buf);
+	igt_assert_eq(atoi(buf), pid);
+	igt_waitchildren();
+
+	/* Child has definitely gone, but the client should remain */
+	len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
+	igt_assert(len > 0);
+	buf[len - 1] = '\0';
+
+	igt_info("Old pid: %s\n", buf);
+	igt_assert_eq(atoi(buf), pid);
+
+	close(sv[1]);
+	close(rv[0]);
+	close(me);
+}
+
+static long count_clients(int clients)
+{
+	struct dirent *de;
+	long count = 0;
+	char buf[280];
+	DIR *dir;
+
+	dir = fdopendir(dup(clients));
+	igt_assert(dir);
+	rewinddir(dir);
+
+	while ((de = readdir(dir))) {
+		int len;
+
+		if (!isdigit(de->d_name[0]))
+			continue;
+
+		snprintf(buf, sizeof(buf), "%s/name", de->d_name);
+		len = igt_sysfs_read(clients, buf, buf, sizeof(buf));
+		if (len < 0)
+			continue;
+
+		count += *buf != '<';
+	}
+	closedir(dir);
+
+	return count;
+}
+
+static void create(int i915, int clients)
+{
+	int fd[16];
+
+	/* Each new open("/dev/dri/cardN") is a new client */
+	igt_assert_eq(count_clients(clients), 1);
+	for (int i = 0; i < ARRAY_SIZE(fd); i++) {
+		fd[i] = gem_reopen_driver(i915);
+		igt_assert_eq(count_clients(clients), i + 2);
+	}
+
+	for (int i = 0; i < ARRAY_SIZE(fd); i++)
+		close(fd[i]);
+
+	/* Cleanup delayed behind rcu */
+	igt_until_timeout(30) {
+		usleep(0);
+		if (count_clients(clients) == 1)
+			break;
+		usleep(10000);
+	}
+	igt_assert_eq(count_clients(clients), 1);
+}
+
+static int find_me(int clients, pid_t pid)
+{
+	struct dirent *de;
+	char buf[280];
+	int me = -1;
+	DIR *dir;
+
+	dir = fdopendir(dup(clients));
+	igt_assert(dir);
+	rewinddir(dir);
+
+	while ((de = readdir(dir))) {
+		int ret;
+
+		if (!isdigit(de->d_name[0]))
+			continue;
+
+		snprintf(buf, sizeof(buf), "%s/pid", de->d_name);
+		ret = igt_sysfs_read(clients, buf, buf, sizeof(buf));
+		igt_assert_f(ret > 0, "failed to open '%s/pid'\n", de->d_name);
+		if (atoi(buf) != pid)
+			continue;
+
+		me = openat(clients, de->d_name, O_DIRECTORY | O_RDONLY);
+		break;
+	}
+
+	closedir(dir);
+	return me;
+}
+
+#define MAX_CLASS 64
+static int read_runtime(int client, uint64_t *runtime)
+{
+	int fd = openat(client, "busy", O_DIRECTORY | O_RDONLY);
+	DIR *dir = fdopendir(fd);
+	struct dirent *de;
+	int count = 0;
+
+	memset(runtime, 0, sizeof(*runtime) * MAX_CLASS);
+	while ((de = readdir(dir))) {
+		int class;
+
+		if (!isdigit(de->d_name[0]))
+			continue;
+
+		class = atoi(de->d_name);
+		igt_assert(class < MAX_CLASS);
+		runtime[class] = igt_sysfs_get_u64(fd, de->d_name);
+
+		count += runtime[class] != 0;
+	}
+	closedir(dir);
+
+	return count;
+}
+
+static uint64_t measured_usleep(unsigned int usec)
+{
+	struct timespec tv;
+	unsigned int slept;
+
+	slept = igt_nsec_elapsed(memset(&tv, 0, sizeof(tv)));
+	igt_assert(slept == 0);
+	do {
+		usleep(usec - slept);
+		slept = igt_nsec_elapsed(&tv) / 1000;
+	} while (slept < usec);
+
+	return igt_nsec_elapsed(&tv);
+}
+
+static void busy(int i915, int clients)
+{
+	const struct intel_execution_engine2 *e;
+	uint64_t active[MAX_CLASS];
+	uint64_t idle[MAX_CLASS];
+	uint64_t old[MAX_CLASS];
+	uint64_t classes = 0;
+	int expect = 0;
+	int64_t delay;
+	igt_spin_t *spin;
+	int me;
+
+	/* Create a fresh client with 0 runtime */
+	i915 = gem_reopen_driver(i915);
+
+	me = find_me(clients, getpid());
+	igt_assert(me != -1);
+	igt_require(faccessat(me, "busy", 0, F_OK) == 0);
+
+	spin = igt_spin_new(i915,
+			    gem_context_create(i915),
+			    .flags = IGT_SPIN_POLL_RUN);
+	__for_each_physical_engine(i915, e) {
+		spin->execbuf.flags &= ~63;
+		spin->execbuf.flags |= e->flags;
+		gem_execbuf(i915, &spin->execbuf);
+
+		if (!(classes & (1ull << e->class)))
+			expect++;
+		classes |= 1ull << e->class;
+	}
+	igt_spin_busywait_until_started(spin);
+
+	delay = -500000; /* 500us slack */
+	memset(old, 0, sizeof(old));
+	for (int pass = 0; pass < 5; pass++) {
+		delay += measured_usleep(1000);
+		igt_debug("delay: %'"PRIu64"ns\n", delay);
+
+		/* Check that we accumulate the runtime, while active */
+		igt_assert_eq(read_runtime(me, active), expect);
+		for (int i = 0; i < ARRAY_SIZE(active); i++) {
+			if (!active[i])
+				continue;
+
+			igt_info("active[%d]: %'"PRIu64"ns\n", i, active[i]);
+			igt_assert(active[i] > old[i]); /* monotonic */
+			igt_assert(active[i] > delay); /* within reason */
+		}
+	}
+
+	gem_quiescent_gpu(i915);
+
+	/* And again now idle */
+	igt_assert_eq(read_runtime(me, idle), expect);
+	for (int i = 0; i < ARRAY_SIZE(idle); i++) {
+		if (!idle[i])
+			continue;
+
+		igt_info("idle[%d]: %'"PRIu64"ns\n", i, idle[i]);
+		igt_assert(idle[i] >= active[i]);
+	}
+
+	gem_context_destroy(i915, spin->execbuf.rsvd1);
+	igt_spin_free(i915, spin);
+
+	/* And finally after the executing context is no more */
+	igt_assert_eq(read_runtime(me, old), expect);
+	for (int i = 0; i < ARRAY_SIZE(old); i++) {
+		if (!old[i])
+			continue;
+
+		igt_info("old[%d]: %'"PRIu64"ns\n", i, old[i]);
+		igt_assert_eq_u64(old[i], idle[i]);
+	}
+
+	close(i915);
+}
+
+igt_main
+{
+	int i915 = -1, clients = -1;
+
+	igt_fixture {
+		int sys;
+
+		/* Don't allow [too many] extra clients to be opened */
+		i915 = __drm_open_driver(DRIVER_INTEL);
+		igt_require_gem(i915);
+
+		sys = igt_sysfs_open(i915);
+		igt_require(sys != -1);
+
+		clients = openat(sys, "clients", O_RDONLY);
+		igt_require(clients != -1);
+
+		close(sys);
+	}
+
+	igt_subtest("pidname")
+		pidname(i915, clients);
+
+	igt_subtest("create")
+		create(i915, clients);
+
+	igt_subtest("busy") {
+		igt_fork(child, 1)
+			busy(i915, clients);
+		igt_waitchildren();
+	}
+
+	igt_fixture {
+		close(clients);
+		close(i915);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index ff924ff99..825e01833 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -236,6 +236,7 @@ i915_progs = [
 	'i915_query',
 	'i915_selftest',
 	'i915_suspend',
+	'sysfs_clients',
 	'sysfs_defaults',
 	'sysfs_heartbeat_interval',
 	'sysfs_preempt_timeout',
-- 
2.30.0

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

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

* [igt-dev] [PATCH i-g-t] i915: Exercise sysfs client properties
@ 2021-01-22 21:34 ` Chris Wilson
  0 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2021-01-22 21:34 UTC (permalink / raw)
  To: igt-dev; +Cc: intel-gfx, Chris Wilson

We store every client name, pid and runtime under sysfs. Better check
that matches with the actual client.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/igt_sysfs.c            |  36 ++++
 lib/igt_sysfs.h            |   3 +
 tests/Makefile.sources     |   3 +
 tests/i915/sysfs_clients.c | 361 +++++++++++++++++++++++++++++++++++++
 tests/meson.build          |   1 +
 5 files changed, 404 insertions(+)
 create mode 100644 tests/i915/sysfs_clients.c

diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
index 6aafe5349..e734143ba 100644
--- a/lib/igt_sysfs.c
+++ b/lib/igt_sysfs.c
@@ -378,6 +378,42 @@ uint32_t igt_sysfs_get_u32(int dir, const char *attr)
 	return result;
 }
 
+/**
+ * igt_sysfs_get_u64:
+ * @dir: directory for the device from igt_sysfs_open()
+ * @attr: name of the sysfs node to open
+ *
+ * Convenience wrapper to read a unsigned 64bit integer from a sysfs file.
+ *
+ * Returns:
+ * The value read.
+ */
+uint64_t igt_sysfs_get_u64(int dir, const char *attr)
+{
+	uint64_t result;
+
+	if (igt_sysfs_scanf(dir, attr, "%"PRIu64, &result) != 1)
+		return 0;
+
+	return result;
+}
+
+/**
+ * igt_sysfs_set_u64:
+ * @dir: directory for the device from igt_sysfs_open()
+ * @attr: name of the sysfs node to open
+ * @value: value to set
+ *
+ * Convenience wrapper to write a unsigned 64bit integer to a sysfs file.
+ *
+ * Returns:
+ * True if successfully written
+ */
+bool igt_sysfs_set_u64(int dir, const char *attr, uint64_t value)
+{
+	return igt_sysfs_printf(dir, attr, "%"PRIu64, value) > 0;
+}
+
 /**
  * igt_sysfs_set_u32:
  * @dir: directory for the device from igt_sysfs_open()
diff --git a/lib/igt_sysfs.h b/lib/igt_sysfs.h
index 64935a5ca..56741a0a3 100644
--- a/lib/igt_sysfs.h
+++ b/lib/igt_sysfs.h
@@ -47,6 +47,9 @@ int igt_sysfs_printf(int dir, const char *attr, const char *fmt, ...)
 uint32_t igt_sysfs_get_u32(int dir, const char *attr);
 bool igt_sysfs_set_u32(int dir, const char *attr, uint32_t value);
 
+uint64_t igt_sysfs_get_u64(int dir, const char *attr);
+bool igt_sysfs_set_u64(int dir, const char *attr, uint64_t value);
+
 bool igt_sysfs_get_boolean(int dir, const char *attr);
 bool igt_sysfs_set_boolean(int dir, const char *attr, bool value);
 
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 1c227e750..3f663fe7e 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -114,6 +114,9 @@ TESTS_progs = \
 TESTS_progs += api_intel_bb
 api_intel_bb_SOURCES = i915/api_intel_bb.c
 
+TESTS_progs += sysfs_clients
+sysfs_clients_SOURCES = i915/sysfs_clients.c
+
 TESTS_progs += sysfs_defaults
 sysfs_defaults_SOURCES = i915/sysfs_defaults.c
 
diff --git a/tests/i915/sysfs_clients.c b/tests/i915/sysfs_clients.c
new file mode 100644
index 000000000..3a5c4cedf
--- /dev/null
+++ b/tests/i915/sysfs_clients.c
@@ -0,0 +1,361 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2021 Intel Corporation
+ */
+
+#include <ctype.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "drmtest.h"
+#include "i915/gem.h"
+#include "i915/gem_context.h"
+#include "i915/gem_engine_topology.h"
+#include "igt_aux.h"
+#include "igt_dummyload.h"
+#include "igt_sysfs.h"
+#include "ioctl_wrappers.h"
+
+static void pidname(int i915, int clients)
+{
+	struct dirent *de;
+	int sv[2], rv[2];
+	char buf[280];
+	int me = -1;
+	long count;
+	pid_t pid;
+	DIR *dir;
+	int len;
+
+	dir = fdopendir(dup(clients));
+	igt_assert(dir);
+	rewinddir(dir);
+
+	count = 0;
+	while ((de = readdir(dir))) {
+		if (!isdigit(de->d_name[0]))
+			continue;
+
+		snprintf(buf, sizeof(buf), "%s/name", de->d_name);
+		len = igt_sysfs_read(clients, buf, buf, sizeof(buf));
+		igt_assert_f(len > 0, "failed to open '%s/name'\n", de->d_name);
+		buf[len - 1] = '\0';
+		igt_debug("%s: %s\n", de->d_name, buf);
+
+		/* Ignore closed clients created by drm_driver_open() */
+		if (*buf == '<')
+			continue;
+
+		close(me);
+		me = openat(clients, de->d_name, O_DIRECTORY | O_RDONLY);
+		count++;
+	}
+	closedir(dir);
+
+	/* We expect there to be only the single client (us) running */
+	igt_assert_eq(count, 1);
+	igt_assert(me >= 0);
+
+	len = igt_sysfs_read(me, "name", buf, sizeof(buf));
+	igt_assert(len > 0);
+	buf[len - 1] = '\0';
+
+	igt_info("My name: %s\n", buf);
+	igt_assert(strcmp(buf, igt_test_name()) == 0);
+
+	igt_assert(pipe(sv) == 0);
+	igt_assert(pipe(rv) == 0);
+
+	/* If give our fd to someone else, they take over ownership of client */
+	igt_fork(child, 1) {
+		read(sv[0], &pid, sizeof(pid));
+
+		gem_context_destroy(i915, gem_context_create(i915));
+
+		pid = getpid();
+		write(rv[1], &pid, sizeof(pid));
+	}
+	close(sv[0]);
+	close(rv[1]);
+
+	/* Child exists, but not yet running, we still own the client */
+	len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
+	igt_assert(len > 0);
+	buf[len - 1] = '\0';
+
+	pid = getpid();
+	igt_info("My pid: %s\n", buf);
+	igt_assert_eq(atoi(buf), pid);
+
+	/* Release and wait for the child */
+	igt_assert_eq(write(sv[1], &pid, sizeof(pid)), sizeof(pid));
+	igt_assert_eq(read(rv[0], &pid, sizeof(pid)), sizeof(pid));
+
+	/* Now child owns the client and pid should be updated to match */
+	len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
+	igt_assert(len > 0);
+	buf[len - 1] = '\0';
+
+	igt_info("New pid: %s\n", buf);
+	igt_assert_eq(atoi(buf), pid);
+	igt_waitchildren();
+
+	/* Child has definitely gone, but the client should remain */
+	len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
+	igt_assert(len > 0);
+	buf[len - 1] = '\0';
+
+	igt_info("Old pid: %s\n", buf);
+	igt_assert_eq(atoi(buf), pid);
+
+	close(sv[1]);
+	close(rv[0]);
+	close(me);
+}
+
+static long count_clients(int clients)
+{
+	struct dirent *de;
+	long count = 0;
+	char buf[280];
+	DIR *dir;
+
+	dir = fdopendir(dup(clients));
+	igt_assert(dir);
+	rewinddir(dir);
+
+	while ((de = readdir(dir))) {
+		int len;
+
+		if (!isdigit(de->d_name[0]))
+			continue;
+
+		snprintf(buf, sizeof(buf), "%s/name", de->d_name);
+		len = igt_sysfs_read(clients, buf, buf, sizeof(buf));
+		if (len < 0)
+			continue;
+
+		count += *buf != '<';
+	}
+	closedir(dir);
+
+	return count;
+}
+
+static void create(int i915, int clients)
+{
+	int fd[16];
+
+	/* Each new open("/dev/dri/cardN") is a new client */
+	igt_assert_eq(count_clients(clients), 1);
+	for (int i = 0; i < ARRAY_SIZE(fd); i++) {
+		fd[i] = gem_reopen_driver(i915);
+		igt_assert_eq(count_clients(clients), i + 2);
+	}
+
+	for (int i = 0; i < ARRAY_SIZE(fd); i++)
+		close(fd[i]);
+
+	/* Cleanup delayed behind rcu */
+	igt_until_timeout(30) {
+		usleep(0);
+		if (count_clients(clients) == 1)
+			break;
+		usleep(10000);
+	}
+	igt_assert_eq(count_clients(clients), 1);
+}
+
+static int find_me(int clients, pid_t pid)
+{
+	struct dirent *de;
+	char buf[280];
+	int me = -1;
+	DIR *dir;
+
+	dir = fdopendir(dup(clients));
+	igt_assert(dir);
+	rewinddir(dir);
+
+	while ((de = readdir(dir))) {
+		int ret;
+
+		if (!isdigit(de->d_name[0]))
+			continue;
+
+		snprintf(buf, sizeof(buf), "%s/pid", de->d_name);
+		ret = igt_sysfs_read(clients, buf, buf, sizeof(buf));
+		igt_assert_f(ret > 0, "failed to open '%s/pid'\n", de->d_name);
+		if (atoi(buf) != pid)
+			continue;
+
+		me = openat(clients, de->d_name, O_DIRECTORY | O_RDONLY);
+		break;
+	}
+
+	closedir(dir);
+	return me;
+}
+
+#define MAX_CLASS 64
+static int read_runtime(int client, uint64_t *runtime)
+{
+	int fd = openat(client, "busy", O_DIRECTORY | O_RDONLY);
+	DIR *dir = fdopendir(fd);
+	struct dirent *de;
+	int count = 0;
+
+	memset(runtime, 0, sizeof(*runtime) * MAX_CLASS);
+	while ((de = readdir(dir))) {
+		int class;
+
+		if (!isdigit(de->d_name[0]))
+			continue;
+
+		class = atoi(de->d_name);
+		igt_assert(class < MAX_CLASS);
+		runtime[class] = igt_sysfs_get_u64(fd, de->d_name);
+
+		count += runtime[class] != 0;
+	}
+	closedir(dir);
+
+	return count;
+}
+
+static uint64_t measured_usleep(unsigned int usec)
+{
+	struct timespec tv;
+	unsigned int slept;
+
+	slept = igt_nsec_elapsed(memset(&tv, 0, sizeof(tv)));
+	igt_assert(slept == 0);
+	do {
+		usleep(usec - slept);
+		slept = igt_nsec_elapsed(&tv) / 1000;
+	} while (slept < usec);
+
+	return igt_nsec_elapsed(&tv);
+}
+
+static void busy(int i915, int clients)
+{
+	const struct intel_execution_engine2 *e;
+	uint64_t active[MAX_CLASS];
+	uint64_t idle[MAX_CLASS];
+	uint64_t old[MAX_CLASS];
+	uint64_t classes = 0;
+	int expect = 0;
+	int64_t delay;
+	igt_spin_t *spin;
+	int me;
+
+	/* Create a fresh client with 0 runtime */
+	i915 = gem_reopen_driver(i915);
+
+	me = find_me(clients, getpid());
+	igt_assert(me != -1);
+	igt_require(faccessat(me, "busy", 0, F_OK) == 0);
+
+	spin = igt_spin_new(i915,
+			    gem_context_create(i915),
+			    .flags = IGT_SPIN_POLL_RUN);
+	__for_each_physical_engine(i915, e) {
+		spin->execbuf.flags &= ~63;
+		spin->execbuf.flags |= e->flags;
+		gem_execbuf(i915, &spin->execbuf);
+
+		if (!(classes & (1ull << e->class)))
+			expect++;
+		classes |= 1ull << e->class;
+	}
+	igt_spin_busywait_until_started(spin);
+
+	delay = -500000; /* 500us slack */
+	memset(old, 0, sizeof(old));
+	for (int pass = 0; pass < 5; pass++) {
+		delay += measured_usleep(1000);
+		igt_debug("delay: %'"PRIu64"ns\n", delay);
+
+		/* Check that we accumulate the runtime, while active */
+		igt_assert_eq(read_runtime(me, active), expect);
+		for (int i = 0; i < ARRAY_SIZE(active); i++) {
+			if (!active[i])
+				continue;
+
+			igt_info("active[%d]: %'"PRIu64"ns\n", i, active[i]);
+			igt_assert(active[i] > old[i]); /* monotonic */
+			igt_assert(active[i] > delay); /* within reason */
+		}
+	}
+
+	gem_quiescent_gpu(i915);
+
+	/* And again now idle */
+	igt_assert_eq(read_runtime(me, idle), expect);
+	for (int i = 0; i < ARRAY_SIZE(idle); i++) {
+		if (!idle[i])
+			continue;
+
+		igt_info("idle[%d]: %'"PRIu64"ns\n", i, idle[i]);
+		igt_assert(idle[i] >= active[i]);
+	}
+
+	gem_context_destroy(i915, spin->execbuf.rsvd1);
+	igt_spin_free(i915, spin);
+
+	/* And finally after the executing context is no more */
+	igt_assert_eq(read_runtime(me, old), expect);
+	for (int i = 0; i < ARRAY_SIZE(old); i++) {
+		if (!old[i])
+			continue;
+
+		igt_info("old[%d]: %'"PRIu64"ns\n", i, old[i]);
+		igt_assert_eq_u64(old[i], idle[i]);
+	}
+
+	close(i915);
+}
+
+igt_main
+{
+	int i915 = -1, clients = -1;
+
+	igt_fixture {
+		int sys;
+
+		/* Don't allow [too many] extra clients to be opened */
+		i915 = __drm_open_driver(DRIVER_INTEL);
+		igt_require_gem(i915);
+
+		sys = igt_sysfs_open(i915);
+		igt_require(sys != -1);
+
+		clients = openat(sys, "clients", O_RDONLY);
+		igt_require(clients != -1);
+
+		close(sys);
+	}
+
+	igt_subtest("pidname")
+		pidname(i915, clients);
+
+	igt_subtest("create")
+		create(i915, clients);
+
+	igt_subtest("busy") {
+		igt_fork(child, 1)
+			busy(i915, clients);
+		igt_waitchildren();
+	}
+
+	igt_fixture {
+		close(clients);
+		close(i915);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index ff924ff99..825e01833 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -236,6 +236,7 @@ i915_progs = [
 	'i915_query',
 	'i915_selftest',
 	'i915_suspend',
+	'sysfs_clients',
 	'sysfs_defaults',
 	'sysfs_heartbeat_interval',
 	'sysfs_preempt_timeout',
-- 
2.30.0

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

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

* [Intel-gfx] [PATCH i-g-t] i915: Exercise sysfs client properties
  2021-01-22 21:34 ` [igt-dev] " Chris Wilson
  (?)
@ 2021-01-22 21:49 ` Chris Wilson
  2021-01-25 10:20   ` [Intel-gfx] [igt-dev] " Tvrtko Ursulin
  -1 siblings, 1 reply; 12+ messages in thread
From: Chris Wilson @ 2021-01-22 21:49 UTC (permalink / raw)
  To: igt-dev; +Cc: intel-gfx, Chris Wilson

We store every client name, pid and runtime under sysfs. Better check
that matches with the actual client.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/igt_sysfs.c            |  36 +++
 lib/igt_sysfs.h            |   3 +
 tests/Makefile.sources     |   3 +
 tests/i915/sysfs_clients.c | 450 +++++++++++++++++++++++++++++++++++++
 tests/meson.build          |   1 +
 5 files changed, 493 insertions(+)
 create mode 100644 tests/i915/sysfs_clients.c

diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
index 6aafe5349..e734143ba 100644
--- a/lib/igt_sysfs.c
+++ b/lib/igt_sysfs.c
@@ -378,6 +378,42 @@ uint32_t igt_sysfs_get_u32(int dir, const char *attr)
 	return result;
 }
 
+/**
+ * igt_sysfs_get_u64:
+ * @dir: directory for the device from igt_sysfs_open()
+ * @attr: name of the sysfs node to open
+ *
+ * Convenience wrapper to read a unsigned 64bit integer from a sysfs file.
+ *
+ * Returns:
+ * The value read.
+ */
+uint64_t igt_sysfs_get_u64(int dir, const char *attr)
+{
+	uint64_t result;
+
+	if (igt_sysfs_scanf(dir, attr, "%"PRIu64, &result) != 1)
+		return 0;
+
+	return result;
+}
+
+/**
+ * igt_sysfs_set_u64:
+ * @dir: directory for the device from igt_sysfs_open()
+ * @attr: name of the sysfs node to open
+ * @value: value to set
+ *
+ * Convenience wrapper to write a unsigned 64bit integer to a sysfs file.
+ *
+ * Returns:
+ * True if successfully written
+ */
+bool igt_sysfs_set_u64(int dir, const char *attr, uint64_t value)
+{
+	return igt_sysfs_printf(dir, attr, "%"PRIu64, value) > 0;
+}
+
 /**
  * igt_sysfs_set_u32:
  * @dir: directory for the device from igt_sysfs_open()
diff --git a/lib/igt_sysfs.h b/lib/igt_sysfs.h
index 64935a5ca..56741a0a3 100644
--- a/lib/igt_sysfs.h
+++ b/lib/igt_sysfs.h
@@ -47,6 +47,9 @@ int igt_sysfs_printf(int dir, const char *attr, const char *fmt, ...)
 uint32_t igt_sysfs_get_u32(int dir, const char *attr);
 bool igt_sysfs_set_u32(int dir, const char *attr, uint32_t value);
 
+uint64_t igt_sysfs_get_u64(int dir, const char *attr);
+bool igt_sysfs_set_u64(int dir, const char *attr, uint64_t value);
+
 bool igt_sysfs_get_boolean(int dir, const char *attr);
 bool igt_sysfs_set_boolean(int dir, const char *attr, bool value);
 
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 1c227e750..3f663fe7e 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -114,6 +114,9 @@ TESTS_progs = \
 TESTS_progs += api_intel_bb
 api_intel_bb_SOURCES = i915/api_intel_bb.c
 
+TESTS_progs += sysfs_clients
+sysfs_clients_SOURCES = i915/sysfs_clients.c
+
 TESTS_progs += sysfs_defaults
 sysfs_defaults_SOURCES = i915/sysfs_defaults.c
 
diff --git a/tests/i915/sysfs_clients.c b/tests/i915/sysfs_clients.c
new file mode 100644
index 000000000..a77adec6d
--- /dev/null
+++ b/tests/i915/sysfs_clients.c
@@ -0,0 +1,450 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2021 Intel Corporation
+ */
+
+#include <ctype.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "drmtest.h"
+#include "i915/gem.h"
+#include "i915/gem_context.h"
+#include "i915/gem_engine_topology.h"
+#include "igt_aux.h"
+#include "igt_dummyload.h"
+#include "igt_sysfs.h"
+#include "ioctl_wrappers.h"
+
+static void pidname(int i915, int clients)
+{
+	struct dirent *de;
+	int sv[2], rv[2];
+	char buf[280];
+	int me = -1;
+	long count;
+	pid_t pid;
+	DIR *dir;
+	int len;
+
+	dir = fdopendir(dup(clients));
+	igt_assert(dir);
+	rewinddir(dir);
+
+	count = 0;
+	while ((de = readdir(dir))) {
+		if (!isdigit(de->d_name[0]))
+			continue;
+
+		snprintf(buf, sizeof(buf), "%s/name", de->d_name);
+		len = igt_sysfs_read(clients, buf, buf, sizeof(buf));
+		igt_assert_f(len > 0, "failed to open '%s/name'\n", de->d_name);
+		buf[len - 1] = '\0';
+		igt_debug("%s: %s\n", de->d_name, buf);
+
+		/* Ignore closed clients created by drm_driver_open() */
+		if (*buf == '<')
+			continue;
+
+		close(me);
+		me = openat(clients, de->d_name, O_DIRECTORY | O_RDONLY);
+		count++;
+	}
+	closedir(dir);
+
+	/* We expect there to be only the single client (us) running */
+	igt_assert_eq(count, 1);
+	igt_assert(me >= 0);
+
+	len = igt_sysfs_read(me, "name", buf, sizeof(buf));
+	igt_assert(len > 0);
+	buf[len - 1] = '\0';
+
+	igt_info("My name: %s\n", buf);
+	igt_assert(strcmp(buf, igt_test_name()) == 0);
+
+	igt_assert(pipe(sv) == 0);
+	igt_assert(pipe(rv) == 0);
+
+	/* If give our fd to someone else, they take over ownership of client */
+	igt_fork(child, 1) {
+		read(sv[0], &pid, sizeof(pid));
+
+		gem_context_destroy(i915, gem_context_create(i915));
+
+		pid = getpid();
+		write(rv[1], &pid, sizeof(pid));
+	}
+	close(sv[0]);
+	close(rv[1]);
+
+	/* Child exists, but not yet running, we still own the client */
+	len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
+	igt_assert(len > 0);
+	buf[len - 1] = '\0';
+
+	pid = getpid();
+	igt_info("My pid: %s\n", buf);
+	igt_assert_eq(atoi(buf), pid);
+
+	/* Release and wait for the child */
+	igt_assert_eq(write(sv[1], &pid, sizeof(pid)), sizeof(pid));
+	igt_assert_eq(read(rv[0], &pid, sizeof(pid)), sizeof(pid));
+
+	/* Now child owns the client and pid should be updated to match */
+	len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
+	igt_assert(len > 0);
+	buf[len - 1] = '\0';
+
+	igt_info("New pid: %s\n", buf);
+	igt_assert_eq(atoi(buf), pid);
+	igt_waitchildren();
+
+	/* Child has definitely gone, but the client should remain */
+	len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
+	igt_assert(len > 0);
+	buf[len - 1] = '\0';
+
+	igt_info("Old pid: %s\n", buf);
+	igt_assert_eq(atoi(buf), pid);
+
+	close(sv[1]);
+	close(rv[0]);
+	close(me);
+}
+
+static long count_clients(int clients)
+{
+	struct dirent *de;
+	long count = 0;
+	char buf[280];
+	DIR *dir;
+
+	dir = fdopendir(dup(clients));
+	igt_assert(dir);
+	rewinddir(dir);
+
+	while ((de = readdir(dir))) {
+		int len;
+
+		if (!isdigit(de->d_name[0]))
+			continue;
+
+		snprintf(buf, sizeof(buf), "%s/name", de->d_name);
+		len = igt_sysfs_read(clients, buf, buf, sizeof(buf));
+		if (len < 0)
+			continue;
+
+		count += *buf != '<';
+	}
+	closedir(dir);
+
+	return count;
+}
+
+static void create(int i915, int clients)
+{
+	int fd[16];
+
+	/* Each new open("/dev/dri/cardN") is a new client */
+	igt_assert_eq(count_clients(clients), 1);
+	for (int i = 0; i < ARRAY_SIZE(fd); i++) {
+		fd[i] = gem_reopen_driver(i915);
+		igt_assert_eq(count_clients(clients), i + 2);
+	}
+
+	for (int i = 0; i < ARRAY_SIZE(fd); i++)
+		close(fd[i]);
+
+	/* Cleanup delayed behind rcu */
+	igt_until_timeout(30) {
+		usleep(0);
+		if (count_clients(clients) == 1)
+			break;
+		usleep(10000);
+	}
+	igt_assert_eq(count_clients(clients), 1);
+}
+
+static int find_me(int clients, pid_t pid)
+{
+	struct dirent *de;
+	char buf[280];
+	int me = -1;
+	DIR *dir;
+
+	dir = fdopendir(dup(clients));
+	igt_assert(dir);
+	rewinddir(dir);
+
+	while ((de = readdir(dir))) {
+		int ret;
+
+		if (!isdigit(de->d_name[0]))
+			continue;
+
+		snprintf(buf, sizeof(buf), "%s/pid", de->d_name);
+		ret = igt_sysfs_read(clients, buf, buf, sizeof(buf));
+		igt_assert_f(ret > 0, "failed to open '%s/pid'\n", de->d_name);
+		if (atoi(buf) != pid)
+			continue;
+
+		me = openat(clients, de->d_name, O_DIRECTORY | O_RDONLY);
+		break;
+	}
+
+	closedir(dir);
+	return me;
+}
+
+#define MAX_CLASS 64
+static int read_runtime(int client, uint64_t *runtime)
+{
+	int fd = openat(client, "busy", O_DIRECTORY | O_RDONLY);
+	DIR *dir = fdopendir(fd);
+	struct dirent *de;
+	int count = 0;
+
+	memset(runtime, 0, sizeof(*runtime) * MAX_CLASS);
+	while ((de = readdir(dir))) {
+		int class;
+
+		if (!isdigit(de->d_name[0]))
+			continue;
+
+		class = atoi(de->d_name);
+		igt_assert(class < MAX_CLASS);
+		runtime[class] = igt_sysfs_get_u64(fd, de->d_name);
+
+		count += runtime[class] != 0;
+	}
+	closedir(dir);
+
+	return count;
+}
+
+static uint64_t measured_usleep(unsigned int usec)
+{
+	struct timespec tv;
+	unsigned int slept;
+
+	slept = igt_nsec_elapsed(memset(&tv, 0, sizeof(tv)));
+	igt_assert(slept == 0);
+	do {
+		usleep(usec - slept);
+		slept = igt_nsec_elapsed(&tv) / 1000;
+	} while (slept < usec);
+
+	return igt_nsec_elapsed(&tv);
+}
+
+static void
+busy_one(int device, int clients, const struct intel_execution_engine2 *e)
+{
+	uint64_t active[MAX_CLASS];
+	uint64_t idle[MAX_CLASS];
+	uint64_t old[MAX_CLASS];
+	igt_spin_t *spin;
+	int64_t delay;
+	int i915;
+	int me;
+
+	/* Create a fresh client with 0 runtime */
+	i915 = gem_reopen_driver(device);
+	gem_context_copy_engines(device, 0, i915, 0);
+
+	me = find_me(clients, getpid());
+	igt_assert(me != -1);
+	igt_require(faccessat(me, "busy", 0, F_OK) == 0);
+
+	spin = igt_spin_new(i915,
+			    gem_context_clone_with_engines(i915, 0),
+			    .engine = e->flags,
+			    .flags = IGT_SPIN_POLL_RUN);
+	igt_spin_busywait_until_started(spin);
+
+	delay = -500000; /* 500us slack */
+	memset(old, 0, sizeof(old));
+	for (int pass = 0; pass < 5; pass++) {
+		delay += measured_usleep(1000);
+		igt_debug("delay: %'"PRIu64"ns\n", delay);
+
+		/* Check that we accumulate the runtime, while active */
+		igt_assert_eq(read_runtime(me, active), 1);
+		igt_info("active1[%d]: %'"PRIu64"ns\n", pass, active[e->class]);
+		igt_assert(active[e->class] > old[e->class]); /* monotonic */
+		igt_assert(active[e->class] > delay); /* within reason */
+	}
+
+	gem_quiescent_gpu(i915);
+
+	/* And again now idle */
+	igt_assert_eq(read_runtime(me, idle), 1);
+	igt_info("idle: %'"PRIu64"ns\n", idle[e->class]);
+	igt_assert(idle[e->class] >= active[e->class]);
+
+	gem_context_destroy(i915, spin->execbuf.rsvd1);
+
+	/* And finally after the executing context is no more */
+	igt_assert_eq(read_runtime(me, old), 1);
+	igt_info("old: %'"PRIu64"ns\n", old[e->class]);
+	igt_assert_eq_u64(old[e->class], idle[e->class]);
+
+	/* Once more on the default context for good luck */
+	igt_spin_reset(spin);
+	spin->execbuf.rsvd1 = 0;
+	gem_execbuf(i915, &spin->execbuf);
+	igt_spin_busywait_until_started(spin);
+
+	for (int pass = 0; pass < 5; pass++) {
+		delay += measured_usleep(1000);
+		igt_debug("delay: %'"PRIu64"ns\n", delay);
+
+		/* Check that we accumulate the runtime, while active */
+		igt_assert_eq(read_runtime(me, active), 1);
+		igt_info("active0[%d]: %'"PRIu64"ns\n", pass, active[e->class]);
+		igt_assert(active[e->class] > old[e->class]); /* monotonic */
+		igt_assert(active[e->class] > delay); /* within reason */
+	}
+
+	gem_quiescent_gpu(i915);
+
+
+	igt_spin_free(i915, spin);
+	close(i915);
+}
+
+static void busy_all(int device, int clients)
+{
+	const struct intel_execution_engine2 *e;
+	uint64_t active[MAX_CLASS];
+	uint64_t idle[MAX_CLASS];
+	uint64_t old[MAX_CLASS];
+	uint64_t classes = 0;
+	igt_spin_t *spin;
+	int expect = 0;
+	int64_t delay;
+	int i915;
+	int me;
+
+	/* Create a fresh client with 0 runtime */
+	i915 = gem_reopen_driver(device);
+	gem_context_copy_engines(device, 0, i915, 0);
+
+	me = find_me(clients, getpid());
+	igt_assert(me != -1);
+	igt_require(faccessat(me, "busy", 0, F_OK) == 0);
+
+	spin = igt_spin_new(i915,
+			    gem_context_clone_with_engines(i915, 0),
+			    .flags = IGT_SPIN_POLL_RUN);
+	__for_each_physical_engine(i915, e) {
+		spin->execbuf.flags &= ~63;
+		spin->execbuf.flags |= e->flags;
+		gem_execbuf(i915, &spin->execbuf);
+
+		if (!(classes & (1ull << e->class)))
+			expect++;
+		classes |= 1ull << e->class;
+	}
+	igt_spin_busywait_until_started(spin);
+
+	delay = -500000; /* 500us slack */
+	memset(old, 0, sizeof(old));
+	for (int pass = 0; pass < 5; pass++) {
+		delay += measured_usleep(1000);
+		igt_debug("delay: %'"PRIu64"ns\n", delay);
+
+		/* Check that we accumulate the runtime, while active */
+		igt_assert_eq(read_runtime(me, active), expect);
+		for (int i = 0; i < ARRAY_SIZE(active); i++) {
+			if (!active[i])
+				continue;
+
+			igt_info("active[%d]: %'"PRIu64"ns\n", i, active[i]);
+			igt_assert(active[i] > old[i]); /* monotonic */
+			igt_assert(active[i] > delay); /* within reason */
+		}
+	}
+
+	gem_quiescent_gpu(i915);
+
+	/* And again now idle */
+	igt_assert_eq(read_runtime(me, idle), expect);
+	for (int i = 0; i < ARRAY_SIZE(idle); i++) {
+		if (!idle[i])
+			continue;
+
+		igt_info("idle[%d]: %'"PRIu64"ns\n", i, idle[i]);
+		igt_assert(idle[i] >= active[i]);
+	}
+
+	gem_context_destroy(i915, spin->execbuf.rsvd1);
+	igt_spin_free(i915, spin);
+
+	/* And finally after the executing context is no more */
+	igt_assert_eq(read_runtime(me, old), expect);
+	for (int i = 0; i < ARRAY_SIZE(old); i++) {
+		if (!old[i])
+			continue;
+
+		igt_info("old[%d]: %'"PRIu64"ns\n", i, old[i]);
+		igt_assert_eq_u64(old[i], idle[i]);
+	}
+
+	close(i915);
+}
+
+igt_main
+{
+	const struct intel_execution_engine2 *e;
+	int i915 = -1, clients = -1;
+
+	igt_fixture {
+		int sys;
+
+		/* Don't allow [too many] extra clients to be opened */
+		i915 = __drm_open_driver(DRIVER_INTEL);
+		igt_require_gem(i915);
+
+		sys = igt_sysfs_open(i915);
+		igt_require(sys != -1);
+
+		clients = openat(sys, "clients", O_RDONLY);
+		igt_require(clients != -1);
+
+		close(sys);
+	}
+
+	igt_subtest("pidname")
+		pidname(i915, clients);
+
+	igt_subtest("create")
+		create(i915, clients);
+
+	igt_subtest_with_dynamic("busy") {
+		__for_each_physical_engine(i915, e) {
+			igt_dynamic_f("%s", e->name) {
+				igt_fork(child, 1)
+					busy_one(i915, clients, e);
+				igt_waitchildren();
+			}
+		}
+	}
+
+	igt_subtest("busy-all") {
+		igt_fork(child, 1)
+			busy_all(i915, clients);
+		igt_waitchildren();
+	}
+
+	igt_fixture {
+		close(clients);
+		close(i915);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index ff924ff99..825e01833 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -236,6 +236,7 @@ i915_progs = [
 	'i915_query',
 	'i915_selftest',
 	'i915_suspend',
+	'sysfs_clients',
 	'sysfs_defaults',
 	'sysfs_heartbeat_interval',
 	'sysfs_preempt_timeout',
-- 
2.30.0

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for i915: Exercise sysfs client properties
  2021-01-22 21:34 ` [igt-dev] " Chris Wilson
  (?)
  (?)
@ 2021-01-22 22:06 ` Patchwork
  -1 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2021-01-22 22:06 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 2778 bytes --]

== Series Details ==

Series: i915: Exercise sysfs client properties
URL   : https://patchwork.freedesktop.org/series/86198/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_9670 -> IGTPW_5424
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/index.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@userptr:
    - fi-byt-j1900:       NOTRUN -> [SKIP][1] ([fdo#109271]) +17 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/fi-byt-j1900/igt@amdgpu/amd_basic@userptr.html

  * igt@gem_mmap_gtt@basic:
    - fi-tgl-y:           [PASS][2] -> [DMESG-WARN][3] ([i915#402]) +2 similar issues
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/fi-tgl-y/igt@gem_mmap_gtt@basic.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/fi-tgl-y/igt@gem_mmap_gtt@basic.html

  
#### Possible fixes ####

  * igt@i915_pm_rpm@module-reload:
    - fi-byt-j1900:       [INCOMPLETE][4] ([i915#142] / [i915#2405]) -> [PASS][5]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/fi-byt-j1900/igt@i915_pm_rpm@module-reload.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/fi-byt-j1900/igt@i915_pm_rpm@module-reload.html

  * igt@vgem_basic@setversion:
    - fi-tgl-y:           [DMESG-WARN][6] ([i915#402]) -> [PASS][7] +2 similar issues
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/fi-tgl-y/igt@vgem_basic@setversion.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/fi-tgl-y/igt@vgem_basic@setversion.html

  
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#142]: https://gitlab.freedesktop.org/drm/intel/issues/142
  [i915#2405]: https://gitlab.freedesktop.org/drm/intel/issues/2405
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402


Participating hosts (41 -> 36)
------------------------------

  Missing    (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-dg1-1 fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5964 -> IGTPW_5424

  CI-20190529: 20190529
  CI_DRM_9670: 85fd189b9fbfb6e7af8d956d37be012fdd6ae0ad @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_5424: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/index.html
  IGT_5964: 0949766cb9846d7d55fac9cdf31d3d8e8ed1d0c6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@sysfs_clients@busy
+igt@sysfs_clients@create
+igt@sysfs_clients@pidname

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/index.html

[-- Attachment #1.2: Type: text/html, Size: 3550 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for i915: Exercise sysfs client properties (rev2)
  2021-01-22 21:34 ` [igt-dev] " Chris Wilson
                   ` (2 preceding siblings ...)
  (?)
@ 2021-01-22 22:36 ` Patchwork
  -1 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2021-01-22 22:36 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 3204 bytes --]

== Series Details ==

Series: i915: Exercise sysfs client properties (rev2)
URL   : https://patchwork.freedesktop.org/series/86198/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_9670 -> IGTPW_5425
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/index.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@userptr:
    - fi-byt-j1900:       NOTRUN -> [SKIP][1] ([fdo#109271]) +17 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/fi-byt-j1900/igt@amdgpu/amd_basic@userptr.html

  * igt@i915_module_load@reload:
    - fi-kbl-7500u:       [PASS][2] -> [DMESG-WARN][3] ([i915#2605])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/fi-kbl-7500u/igt@i915_module_load@reload.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/fi-kbl-7500u/igt@i915_module_load@reload.html

  * igt@prime_vgem@basic-read:
    - fi-tgl-y:           [PASS][4] -> [DMESG-WARN][5] ([i915#402]) +1 similar issue
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/fi-tgl-y/igt@prime_vgem@basic-read.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/fi-tgl-y/igt@prime_vgem@basic-read.html

  
#### Possible fixes ####

  * igt@i915_pm_rpm@module-reload:
    - fi-byt-j1900:       [INCOMPLETE][6] ([i915#142] / [i915#2405]) -> [PASS][7]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/fi-byt-j1900/igt@i915_pm_rpm@module-reload.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/fi-byt-j1900/igt@i915_pm_rpm@module-reload.html

  * igt@vgem_basic@setversion:
    - fi-tgl-y:           [DMESG-WARN][8] ([i915#402]) -> [PASS][9] +1 similar issue
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/fi-tgl-y/igt@vgem_basic@setversion.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/fi-tgl-y/igt@vgem_basic@setversion.html

  
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#142]: https://gitlab.freedesktop.org/drm/intel/issues/142
  [i915#2405]: https://gitlab.freedesktop.org/drm/intel/issues/2405
  [i915#2605]: https://gitlab.freedesktop.org/drm/intel/issues/2605
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402


Participating hosts (41 -> 36)
------------------------------

  Missing    (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-dg1-1 fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5964 -> IGTPW_5425

  CI-20190529: 20190529
  CI_DRM_9670: 85fd189b9fbfb6e7af8d956d37be012fdd6ae0ad @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_5425: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/index.html
  IGT_5964: 0949766cb9846d7d55fac9cdf31d3d8e8ed1d0c6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@sysfs_clients@busy
+igt@sysfs_clients@busy-all
+igt@sysfs_clients@create
+igt@sysfs_clients@pidname

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/index.html

[-- Attachment #1.2: Type: text/html, Size: 4011 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for i915: Exercise sysfs client properties
  2021-01-22 21:34 ` [igt-dev] " Chris Wilson
                   ` (3 preceding siblings ...)
  (?)
@ 2021-01-23  6:21 ` Patchwork
  -1 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2021-01-23  6:21 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 22554 bytes --]

== Series Details ==

Series: i915: Exercise sysfs client properties
URL   : https://patchwork.freedesktop.org/series/86198/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_9670_full -> IGTPW_5424_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/index.html

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@sysfs_clients@create} (NEW):
    - shard-tglb:         NOTRUN -> [SKIP][1] +2 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-tglb3/igt@sysfs_clients@create.html

  * {igt@sysfs_clients@pidname} (NEW):
    - shard-iclb:         NOTRUN -> [SKIP][2] +2 similar issues
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb1/igt@sysfs_clients@pidname.html

  
New tests
---------

  New tests have been introduced between CI_DRM_9670_full and IGTPW_5424_full:

### New IGT tests (3) ###

  * igt@sysfs_clients@busy:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@sysfs_clients@create:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@sysfs_clients@pidname:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@feature_discovery@psr2:
    - shard-iclb:         [PASS][3] -> [SKIP][4] ([i915#658])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb2/igt@feature_discovery@psr2.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb1/igt@feature_discovery@psr2.html

  * igt@gem_exec_fair@basic-deadline:
    - shard-glk:          [PASS][5] -> [FAIL][6] ([i915#2846])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-glk7/igt@gem_exec_fair@basic-deadline.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-glk1/igt@gem_exec_fair@basic-deadline.html

  * igt@gem_exec_fair@basic-none@vecs0:
    - shard-apl:          [PASS][7] -> [FAIL][8] ([i915#2842])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-apl4/igt@gem_exec_fair@basic-none@vecs0.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-apl4/igt@gem_exec_fair@basic-none@vecs0.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - shard-tglb:         [PASS][9] -> [FAIL][10] ([i915#2842]) +2 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb7/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-tglb2/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-kbl:          [PASS][11] -> [FAIL][12] ([i915#2842]) +2 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-kbl2/igt@gem_exec_fair@basic-pace@vecs0.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-kbl2/igt@gem_exec_fair@basic-pace@vecs0.html
    - shard-glk:          [PASS][13] -> [FAIL][14] ([i915#2842]) +1 similar issue
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-glk9/igt@gem_exec_fair@basic-pace@vecs0.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-glk6/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_exec_reloc@basic-many-active@rcs0:
    - shard-apl:          [PASS][15] -> [FAIL][16] ([i915#2389])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-apl2/igt@gem_exec_reloc@basic-many-active@rcs0.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-apl8/igt@gem_exec_reloc@basic-many-active@rcs0.html

  * igt@gem_exec_reloc@basic-many-active@vcs1:
    - shard-iclb:         NOTRUN -> [FAIL][17] ([i915#2389])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb2/igt@gem_exec_reloc@basic-many-active@vcs1.html

  * igt@gem_exec_whisper@basic-contexts-priority:
    - shard-glk:          [PASS][18] -> [DMESG-WARN][19] ([i915#118] / [i915#95])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-glk7/igt@gem_exec_whisper@basic-contexts-priority.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-glk1/igt@gem_exec_whisper@basic-contexts-priority.html

  * igt@gem_tiled_partial_pwrite_pread@writes-after-reads:
    - shard-hsw:          [PASS][20] -> [INCOMPLETE][21] ([i915#2055])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-hsw6/igt@gem_tiled_partial_pwrite_pread@writes-after-reads.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-hsw6/igt@gem_tiled_partial_pwrite_pread@writes-after-reads.html

  * igt@gem_userptr_blits@coherency-unsync:
    - shard-tglb:         NOTRUN -> [SKIP][22] ([fdo#110542])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-tglb6/igt@gem_userptr_blits@coherency-unsync.html
    - shard-iclb:         NOTRUN -> [SKIP][23] ([fdo#109290])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb8/igt@gem_userptr_blits@coherency-unsync.html

  * igt@gem_userptr_blits@readonly-pwrite-unsync:
    - shard-tglb:         NOTRUN -> [SKIP][24] ([fdo#110426] / [i915#1704])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-tglb8/igt@gem_userptr_blits@readonly-pwrite-unsync.html
    - shard-iclb:         NOTRUN -> [SKIP][25] ([fdo#110426] / [i915#1704])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb8/igt@gem_userptr_blits@readonly-pwrite-unsync.html

  * igt@gen3_mixed_blits:
    - shard-kbl:          NOTRUN -> [SKIP][26] ([fdo#109271]) +32 similar issues
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-kbl1/igt@gen3_mixed_blits.html

  * igt@i915_selftest@live@hangcheck:
    - shard-hsw:          [PASS][27] -> [INCOMPLETE][28] ([i915#2782])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-hsw1/igt@i915_selftest@live@hangcheck.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-hsw4/igt@i915_selftest@live@hangcheck.html

  * igt@kms_color_chamelium@pipe-a-ctm-green-to-red:
    - shard-glk:          NOTRUN -> [SKIP][29] ([fdo#109271] / [fdo#111827]) +1 similar issue
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-glk1/igt@kms_color_chamelium@pipe-a-ctm-green-to-red.html
    - shard-apl:          NOTRUN -> [SKIP][30] ([fdo#109271] / [fdo#111827]) +1 similar issue
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-apl3/igt@kms_color_chamelium@pipe-a-ctm-green-to-red.html
    - shard-iclb:         NOTRUN -> [SKIP][31] ([fdo#109284] / [fdo#111827])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb6/igt@kms_color_chamelium@pipe-a-ctm-green-to-red.html

  * igt@kms_color_chamelium@pipe-d-ctm-0-5:
    - shard-tglb:         NOTRUN -> [SKIP][32] ([fdo#109284] / [fdo#111827]) +1 similar issue
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-tglb2/igt@kms_color_chamelium@pipe-d-ctm-0-5.html
    - shard-kbl:          NOTRUN -> [SKIP][33] ([fdo#109271] / [fdo#111827]) +2 similar issues
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-kbl7/igt@kms_color_chamelium@pipe-d-ctm-0-5.html
    - shard-iclb:         NOTRUN -> [SKIP][34] ([fdo#109278] / [fdo#109284] / [fdo#111827])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb1/igt@kms_color_chamelium@pipe-d-ctm-0-5.html

  * igt@kms_cursor_crc@pipe-b-cursor-64x64-onscreen:
    - shard-snb:          [PASS][35] -> [SKIP][36] ([fdo#109271])
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-snb2/igt@kms_cursor_crc@pipe-b-cursor-64x64-onscreen.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-snb5/igt@kms_cursor_crc@pipe-b-cursor-64x64-onscreen.html

  * igt@kms_flip@2x-plain-flip-ts-check-interruptible:
    - shard-iclb:         NOTRUN -> [SKIP][37] ([fdo#109274]) +1 similar issue
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb5/igt@kms_flip@2x-plain-flip-ts-check-interruptible.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-indfb-draw-pwrite:
    - shard-iclb:         NOTRUN -> [SKIP][38] ([fdo#109280]) +5 similar issues
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb1/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-indfb-draw-pwrite.html

  * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-indfb-draw-mmap-gtt:
    - shard-tglb:         NOTRUN -> [SKIP][39] ([fdo#111825]) +7 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-tglb7/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-indfb-draw-mmap-gtt.html

  * igt@kms_hdr@bpc-switch-suspend:
    - shard-kbl:          [PASS][40] -> [FAIL][41] ([i915#1188])
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-kbl3/igt@kms_hdr@bpc-switch-suspend.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-kbl3/igt@kms_hdr@bpc-switch-suspend.html
    - shard-apl:          [PASS][42] -> [FAIL][43] ([i915#1188])
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-apl4/igt@kms_hdr@bpc-switch-suspend.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-apl4/igt@kms_hdr@bpc-switch-suspend.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
    - shard-apl:          NOTRUN -> [SKIP][44] ([fdo#109271] / [i915#533])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-apl8/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html
    - shard-glk:          NOTRUN -> [SKIP][45] ([fdo#109271] / [i915#533])
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-glk7/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html
    - shard-iclb:         NOTRUN -> [SKIP][46] ([fdo#109278]) +1 similar issue
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb1/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html
    - shard-kbl:          NOTRUN -> [SKIP][47] ([fdo#109271] / [i915#533])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-kbl2/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3:
    - shard-kbl:          NOTRUN -> [SKIP][48] ([fdo#109271] / [i915#658])
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-kbl3/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3.html
    - shard-tglb:         NOTRUN -> [SKIP][49] ([i915#2920])
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-tglb2/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3.html
    - shard-apl:          NOTRUN -> [SKIP][50] ([fdo#109271] / [i915#658])
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-apl1/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3.html
    - shard-glk:          NOTRUN -> [SKIP][51] ([fdo#109271] / [i915#658])
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-glk8/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3.html
    - shard-iclb:         NOTRUN -> [SKIP][52] ([i915#658])
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb5/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3.html

  * igt@kms_psr@psr2_sprite_mmap_gtt:
    - shard-iclb:         [PASS][53] -> [SKIP][54] ([fdo#109441]) +2 similar issues
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb1/igt@kms_psr@psr2_sprite_mmap_gtt.html

  * igt@kms_psr@psr2_sprite_render:
    - shard-iclb:         NOTRUN -> [SKIP][55] ([fdo#109441])
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb1/igt@kms_psr@psr2_sprite_render.html

  * igt@nouveau_crc@pipe-d-ctx-flip-detection:
    - shard-tglb:         NOTRUN -> [SKIP][56] ([i915#2530])
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-tglb1/igt@nouveau_crc@pipe-d-ctx-flip-detection.html
    - shard-iclb:         NOTRUN -> [SKIP][57] ([fdo#109278] / [i915#2530])
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb6/igt@nouveau_crc@pipe-d-ctx-flip-detection.html

  * igt@perf@gen8-unprivileged-single-ctx-counters:
    - shard-tglb:         NOTRUN -> [SKIP][58] ([fdo#109289])
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-tglb3/igt@perf@gen8-unprivileged-single-ctx-counters.html

  * igt@prime_nv_api@nv_self_import_to_different_fd:
    - shard-tglb:         NOTRUN -> [SKIP][59] ([fdo#109291])
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-tglb5/igt@prime_nv_api@nv_self_import_to_different_fd.html
    - shard-iclb:         NOTRUN -> [SKIP][60] ([fdo#109291])
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb6/igt@prime_nv_api@nv_self_import_to_different_fd.html

  * {igt@sysfs_clients@busy} (NEW):
    - shard-hsw:          NOTRUN -> [SKIP][61] ([fdo#109271]) +2 similar issues
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-hsw6/igt@sysfs_clients@busy.html

  * {igt@sysfs_clients@create} (NEW):
    - shard-glk:          NOTRUN -> [SKIP][62] ([fdo#109271]) +17 similar issues
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-glk4/igt@sysfs_clients@create.html
    - shard-apl:          NOTRUN -> [SKIP][63] ([fdo#109271]) +20 similar issues
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-apl4/igt@sysfs_clients@create.html

  * {igt@sysfs_clients@pidname} (NEW):
    - shard-snb:          NOTRUN -> [SKIP][64] ([fdo#109271]) +2 similar issues
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-snb2/igt@sysfs_clients@pidname.html

  
#### Possible fixes ####

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-iclb:         [FAIL][65] ([i915#2842]) -> [PASS][66] +1 similar issue
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb3/igt@gem_exec_fair@basic-none-share@rcs0.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb7/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-none@vcs0:
    - shard-kbl:          [FAIL][67] ([i915#2842]) -> [PASS][68] +1 similar issue
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-kbl2/igt@gem_exec_fair@basic-none@vcs0.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-kbl7/igt@gem_exec_fair@basic-none@vcs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-glk:          [FAIL][69] ([i915#2842]) -> [PASS][70] +1 similar issue
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-glk4/igt@gem_exec_fair@basic-throttle@rcs0.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-glk7/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_huc_copy@huc-copy:
    - shard-tglb:         [SKIP][71] ([i915#2190]) -> [PASS][72]
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb6/igt@gem_huc_copy@huc-copy.html
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-tglb3/igt@gem_huc_copy@huc-copy.html

  * igt@i915_pm_rpm@system-suspend-execbuf:
    - shard-kbl:          [INCOMPLETE][73] ([i915#151] / [i915#155]) -> [PASS][74]
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-kbl3/igt@i915_pm_rpm@system-suspend-execbuf.html
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-kbl3/igt@i915_pm_rpm@system-suspend-execbuf.html

  * igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary:
    - shard-kbl:          [FAIL][75] ([i915#49]) -> [PASS][76]
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-kbl3/igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary.html
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-kbl3/igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary.html
    - shard-apl:          [FAIL][77] ([i915#49]) -> [PASS][78]
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-apl7/igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary.html
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-apl4/igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary.html

  * igt@kms_hdmi_inject@inject-audio:
    - shard-tglb:         [SKIP][79] ([i915#433]) -> [PASS][80]
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb2/igt@kms_hdmi_inject@inject-audio.html
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-tglb3/igt@kms_hdmi_inject@inject-audio.html

  * igt@kms_psr2_su@page_flip:
    - shard-iclb:         [SKIP][81] ([fdo#109642] / [fdo#111068] / [i915#658]) -> [PASS][82]
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb3/igt@kms_psr2_su@page_flip.html
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb2/igt@kms_psr2_su@page_flip.html

  * igt@kms_psr@psr2_cursor_render:
    - shard-iclb:         [SKIP][83] ([fdo#109441]) -> [PASS][84] +1 similar issue
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb8/igt@kms_psr@psr2_cursor_render.html
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb2/igt@kms_psr@psr2_cursor_render.html

  
#### Warnings ####

  * igt@gem_exec_fair@basic-none-rrul@rcs0:
    - shard-iclb:         [FAIL][85] ([i915#2852]) -> [FAIL][86] ([i915#2842])
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb8/igt@gem_exec_fair@basic-none-rrul@rcs0.html
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb5/igt@gem_exec_fair@basic-none-rrul@rcs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-iclb:         [FAIL][87] ([i915#2849]) -> [FAIL][88] ([i915#2842])
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb7/igt@gem_exec_fair@basic-throttle@rcs0.html
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb1/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@kms_content_protection@lic:
    - shard-apl:          [TIMEOUT][89] ([i915#1319]) -> [SKIP][90] ([fdo#109271])
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-apl7/igt@kms_content_protection@lic.html
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-apl1/igt@kms_content_protection@lic.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-2:
    - shard-iclb:         [SKIP][91] ([i915#658]) -> [SKIP][92] ([i915#2920]) +1 similar issue
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb4/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-2.html
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb2/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-2.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-1:
    - shard-iclb:         [SKIP][93] ([i915#2920]) -> [SKIP][94] ([i915#658])
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb2/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-1.html
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/shard-iclb3/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-1.html

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

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109290]: https://bugs.freedesktop.org/show_bug.cgi?id=109290
  [fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#110426]: https://bugs.freedesktop.org/show_bug.cgi?id=110426
  [fdo#110542]: https://bugs.freedesktop.org/show_bug.cgi?id=110542
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
  [i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
  [i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
  [i915#151]: https://gitlab.freedesktop.org/drm/intel/issues/151
  [i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
  [i915#1704]: https://gitlab.freedesktop.org/drm/intel/issues/1704
  [i915#2055]: https://gitlab.freedesktop.org/drm/intel/issues/2055
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2389]: https://gitlab.freedesktop.org/drm/intel/issues/2389
  [i915#2530]: https://gitlab.freedesktop.org/drm/intel/issues/2530
  [i915#2782]: https://gitlab.freedesktop.org/drm/intel/issues/2782
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
  [i915#2849]: https://gitlab.freedesktop.org/drm/intel/issues/2849
  [i915#2852]: https://gitlab.freedesktop.org/drm/intel/issues/2852
  [i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
  [i915#433]: https://gitlab.freedesktop.org/drm/intel/issues/433
  [i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95


Participating hosts (10 -> 8)
------------------------------

  Missing    (2): pig-skl-6260u pig-glk-j5005 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5964 -> IGTPW_5424
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_9670: 85fd189b9fbfb6e7af8d956d37be012fdd6ae0ad @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_5424: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/index.html
  IGT_5964: 0949766cb9846d7d55fac9cdf31d3d8e8ed1d0c6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5424/index.html

[-- Attachment #1.2: Type: text/html, Size: 28176 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

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

* [igt-dev] ✗ Fi.CI.IGT: failure for i915: Exercise sysfs client properties (rev2)
  2021-01-22 21:34 ` [igt-dev] " Chris Wilson
                   ` (4 preceding siblings ...)
  (?)
@ 2021-01-23  7:14 ` Patchwork
  -1 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2021-01-23  7:14 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 23656 bytes --]

== Series Details ==

Series: i915: Exercise sysfs client properties (rev2)
URL   : https://patchwork.freedesktop.org/series/86198/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_9670_full -> IGTPW_5425_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_5425_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_5425_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://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/index.html

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@kms_atomic_transition@plane-all-modeset-transition-fencing@dp-1-pipe-a:
    - shard-apl:          [PASS][1] -> [INCOMPLETE][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-apl1/igt@kms_atomic_transition@plane-all-modeset-transition-fencing@dp-1-pipe-a.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-apl1/igt@kms_atomic_transition@plane-all-modeset-transition-fencing@dp-1-pipe-a.html

  * igt@kms_flip@flip-vs-panning@a-vga1:
    - shard-hsw:          [PASS][3] -> [INCOMPLETE][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-hsw2/igt@kms_flip@flip-vs-panning@a-vga1.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-hsw6/igt@kms_flip@flip-vs-panning@a-vga1.html

  * {igt@sysfs_clients@create} (NEW):
    - shard-tglb:         NOTRUN -> [SKIP][5] +3 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb8/igt@sysfs_clients@create.html

  * {igt@sysfs_clients@pidname} (NEW):
    - shard-iclb:         NOTRUN -> [SKIP][6] +3 similar issues
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb2/igt@sysfs_clients@pidname.html

  
New tests
---------

  New tests have been introduced between CI_DRM_9670_full and IGTPW_5425_full:

### New IGT tests (4) ###

  * igt@sysfs_clients@busy:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@sysfs_clients@busy-all:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@sysfs_clients@create:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@sysfs_clients@pidname:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@feature_discovery@psr2:
    - shard-iclb:         [PASS][7] -> [SKIP][8] ([i915#658])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb2/igt@feature_discovery@psr2.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb8/igt@feature_discovery@psr2.html

  * igt@gem_exec_fair@basic-flow@rcs0:
    - shard-tglb:         [PASS][9] -> [FAIL][10] ([i915#2842]) +1 similar issue
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb6/igt@gem_exec_fair@basic-flow@rcs0.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb1/igt@gem_exec_fair@basic-flow@rcs0.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - shard-glk:          [PASS][11] -> [FAIL][12] ([i915#2842])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-glk4/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-glk3/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-kbl:          [PASS][13] -> [FAIL][14] ([i915#2842]) +4 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-kbl2/igt@gem_exec_fair@basic-pace@vecs0.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-kbl2/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_exec_schedule@u-fairslice-all:
    - shard-tglb:         [PASS][15] -> [DMESG-WARN][16] ([i915#2803])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb8/igt@gem_exec_schedule@u-fairslice-all.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb8/igt@gem_exec_schedule@u-fairslice-all.html

  * igt@gem_userptr_blits@coherency-unsync:
    - shard-tglb:         NOTRUN -> [SKIP][17] ([fdo#110542])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb7/igt@gem_userptr_blits@coherency-unsync.html
    - shard-iclb:         NOTRUN -> [SKIP][18] ([fdo#109290])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb7/igt@gem_userptr_blits@coherency-unsync.html

  * igt@gem_userptr_blits@readonly-pwrite-unsync:
    - shard-tglb:         NOTRUN -> [SKIP][19] ([fdo#110426] / [i915#1704])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb5/igt@gem_userptr_blits@readonly-pwrite-unsync.html
    - shard-iclb:         NOTRUN -> [SKIP][20] ([fdo#110426] / [i915#1704])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb8/igt@gem_userptr_blits@readonly-pwrite-unsync.html

  * igt@gen3_mixed_blits:
    - shard-kbl:          NOTRUN -> [SKIP][21] ([fdo#109271]) +33 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-kbl2/igt@gen3_mixed_blits.html

  * igt@kms_color_chamelium@pipe-a-ctm-green-to-red:
    - shard-glk:          NOTRUN -> [SKIP][22] ([fdo#109271] / [fdo#111827]) +1 similar issue
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-glk3/igt@kms_color_chamelium@pipe-a-ctm-green-to-red.html
    - shard-apl:          NOTRUN -> [SKIP][23] ([fdo#109271] / [fdo#111827]) +1 similar issue
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-apl4/igt@kms_color_chamelium@pipe-a-ctm-green-to-red.html
    - shard-iclb:         NOTRUN -> [SKIP][24] ([fdo#109284] / [fdo#111827])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb4/igt@kms_color_chamelium@pipe-a-ctm-green-to-red.html

  * igt@kms_color_chamelium@pipe-d-ctm-0-5:
    - shard-tglb:         NOTRUN -> [SKIP][25] ([fdo#109284] / [fdo#111827]) +1 similar issue
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb5/igt@kms_color_chamelium@pipe-d-ctm-0-5.html
    - shard-kbl:          NOTRUN -> [SKIP][26] ([fdo#109271] / [fdo#111827]) +2 similar issues
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-kbl3/igt@kms_color_chamelium@pipe-d-ctm-0-5.html
    - shard-iclb:         NOTRUN -> [SKIP][27] ([fdo#109278] / [fdo#109284] / [fdo#111827])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb8/igt@kms_color_chamelium@pipe-d-ctm-0-5.html

  * igt@kms_cursor_crc@pipe-a-cursor-128x128-sliding:
    - shard-apl:          [PASS][28] -> [FAIL][29] ([i915#54]) +1 similar issue
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-apl8/igt@kms_cursor_crc@pipe-a-cursor-128x128-sliding.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-apl4/igt@kms_cursor_crc@pipe-a-cursor-128x128-sliding.html

  * igt@kms_cursor_crc@pipe-a-cursor-64x64-onscreen:
    - shard-kbl:          [PASS][30] -> [FAIL][31] ([i915#54]) +1 similar issue
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-kbl3/igt@kms_cursor_crc@pipe-a-cursor-64x64-onscreen.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-kbl2/igt@kms_cursor_crc@pipe-a-cursor-64x64-onscreen.html

  * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
    - shard-hsw:          [PASS][32] -> [FAIL][33] ([i915#96])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-hsw2/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-hsw1/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy.html

  * igt@kms_cursor_legacy@cursor-vs-flip-varying-size:
    - shard-hsw:          [PASS][34] -> [FAIL][35] ([i915#2370])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-hsw1/igt@kms_cursor_legacy@cursor-vs-flip-varying-size.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-hsw1/igt@kms_cursor_legacy@cursor-vs-flip-varying-size.html

  * igt@kms_flip@2x-plain-flip-ts-check-interruptible:
    - shard-iclb:         NOTRUN -> [SKIP][36] ([fdo#109274]) +1 similar issue
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb1/igt@kms_flip@2x-plain-flip-ts-check-interruptible.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-indfb-draw-pwrite:
    - shard-iclb:         NOTRUN -> [SKIP][37] ([fdo#109280]) +5 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb3/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-indfb-draw-pwrite.html

  * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-indfb-draw-mmap-gtt:
    - shard-tglb:         NOTRUN -> [SKIP][38] ([fdo#111825]) +7 similar issues
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb2/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-indfb-draw-mmap-gtt.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
    - shard-apl:          NOTRUN -> [SKIP][39] ([fdo#109271] / [i915#533])
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-apl6/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html
    - shard-glk:          NOTRUN -> [SKIP][40] ([fdo#109271] / [i915#533])
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-glk8/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html
    - shard-iclb:         NOTRUN -> [SKIP][41] ([fdo#109278]) +1 similar issue
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb3/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html
    - shard-kbl:          NOTRUN -> [SKIP][42] ([fdo#109271] / [i915#533])
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-kbl7/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3:
    - shard-kbl:          NOTRUN -> [SKIP][43] ([fdo#109271] / [i915#658])
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-kbl3/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3.html
    - shard-tglb:         NOTRUN -> [SKIP][44] ([i915#2920])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb3/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3.html
    - shard-apl:          NOTRUN -> [SKIP][45] ([fdo#109271] / [i915#658])
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-apl6/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3.html
    - shard-glk:          NOTRUN -> [SKIP][46] ([fdo#109271] / [i915#658])
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-glk1/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3.html
    - shard-iclb:         NOTRUN -> [SKIP][47] ([i915#658])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb6/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3.html

  * igt@kms_psr@psr2_sprite_mmap_gtt:
    - shard-iclb:         [PASS][48] -> [SKIP][49] ([fdo#109441]) +2 similar issues
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb5/igt@kms_psr@psr2_sprite_mmap_gtt.html

  * igt@kms_psr@psr2_sprite_render:
    - shard-iclb:         NOTRUN -> [SKIP][50] ([fdo#109441])
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb3/igt@kms_psr@psr2_sprite_render.html

  * igt@nouveau_crc@pipe-d-ctx-flip-detection:
    - shard-tglb:         NOTRUN -> [SKIP][51] ([i915#2530])
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb3/igt@nouveau_crc@pipe-d-ctx-flip-detection.html
    - shard-iclb:         NOTRUN -> [SKIP][52] ([fdo#109278] / [i915#2530])
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb1/igt@nouveau_crc@pipe-d-ctx-flip-detection.html

  * igt@perf@gen8-unprivileged-single-ctx-counters:
    - shard-tglb:         NOTRUN -> [SKIP][53] ([fdo#109289])
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb7/igt@perf@gen8-unprivileged-single-ctx-counters.html

  * igt@prime_nv_api@nv_self_import_to_different_fd:
    - shard-tglb:         NOTRUN -> [SKIP][54] ([fdo#109291])
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb2/igt@prime_nv_api@nv_self_import_to_different_fd.html
    - shard-iclb:         NOTRUN -> [SKIP][55] ([fdo#109291])
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb2/igt@prime_nv_api@nv_self_import_to_different_fd.html

  * {igt@sysfs_clients@busy} (NEW):
    - shard-hsw:          NOTRUN -> [SKIP][56] ([fdo#109271]) +3 similar issues
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-hsw6/igt@sysfs_clients@busy.html

  * {igt@sysfs_clients@create} (NEW):
    - shard-glk:          NOTRUN -> [SKIP][57] ([fdo#109271]) +18 similar issues
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-glk2/igt@sysfs_clients@create.html
    - shard-apl:          NOTRUN -> [SKIP][58] ([fdo#109271]) +21 similar issues
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-apl3/igt@sysfs_clients@create.html

  * {igt@sysfs_clients@pidname} (NEW):
    - shard-snb:          NOTRUN -> [SKIP][59] ([fdo#109271]) +3 similar issues
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-snb4/igt@sysfs_clients@pidname.html

  
#### Possible fixes ####

  * igt@gem_exec_fair@basic-pace@rcs0:
    - shard-kbl:          [FAIL][60] ([i915#2842]) -> [PASS][61]
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-kbl2/igt@gem_exec_fair@basic-pace@rcs0.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-kbl2/igt@gem_exec_fair@basic-pace@rcs0.html
    - shard-glk:          [FAIL][62] ([i915#2842]) -> [PASS][63]
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-glk9/igt@gem_exec_fair@basic-pace@rcs0.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-glk8/igt@gem_exec_fair@basic-pace@rcs0.html

  * igt@gem_exec_fair@basic-pace@vcs0:
    - shard-iclb:         [FAIL][64] ([i915#2842]) -> [PASS][65] +4 similar issues
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb3/igt@gem_exec_fair@basic-pace@vcs0.html
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb7/igt@gem_exec_fair@basic-pace@vcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-tglb:         [FAIL][66] ([i915#2842]) -> [PASS][67]
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb7/igt@gem_exec_fair@basic-pace@vecs0.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb7/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_exec_whisper@basic-queues:
    - shard-glk:          [DMESG-WARN][68] ([i915#118] / [i915#95]) -> [PASS][69]
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-glk7/igt@gem_exec_whisper@basic-queues.html
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-glk7/igt@gem_exec_whisper@basic-queues.html

  * igt@gem_huc_copy@huc-copy:
    - shard-tglb:         [SKIP][70] ([i915#2190]) -> [PASS][71]
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb6/igt@gem_huc_copy@huc-copy.html
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb5/igt@gem_huc_copy@huc-copy.html

  * igt@i915_pm_rpm@system-suspend-execbuf:
    - shard-kbl:          [INCOMPLETE][72] ([i915#151] / [i915#155]) -> [PASS][73]
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-kbl3/igt@i915_pm_rpm@system-suspend-execbuf.html
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-kbl7/igt@i915_pm_rpm@system-suspend-execbuf.html

  * igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary:
    - shard-kbl:          [FAIL][74] ([i915#49]) -> [PASS][75]
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-kbl3/igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary.html
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary.html
    - shard-apl:          [FAIL][76] ([i915#49]) -> [PASS][77]
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-apl7/igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary.html
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-apl2/igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary.html

  * igt@kms_hdmi_inject@inject-audio:
    - shard-tglb:         [SKIP][78] ([i915#433]) -> [PASS][79]
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb2/igt@kms_hdmi_inject@inject-audio.html
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb8/igt@kms_hdmi_inject@inject-audio.html

  * igt@kms_psr@psr2_sprite_plane_move:
    - shard-iclb:         [SKIP][80] ([fdo#109441]) -> [PASS][81] +2 similar issues
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb5/igt@kms_psr@psr2_sprite_plane_move.html
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html

  
#### Warnings ####

  * igt@gem_exec_fair@basic-none-rrul@rcs0:
    - shard-iclb:         [FAIL][82] ([i915#2852]) -> [FAIL][83] ([i915#2842])
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb8/igt@gem_exec_fair@basic-none-rrul@rcs0.html
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb6/igt@gem_exec_fair@basic-none-rrul@rcs0.html

  * igt@i915_pm_dc@dc3co-vpb-simulation:
    - shard-iclb:         [SKIP][84] ([i915#658]) -> [SKIP][85] ([i915#588])
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb1/igt@i915_pm_dc@dc3co-vpb-simulation.html
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb2/igt@i915_pm_dc@dc3co-vpb-simulation.html

  * igt@i915_pm_rc6_residency@rc6-idle:
    - shard-iclb:         [WARN][86] ([i915#1804] / [i915#2684]) -> [WARN][87] ([i915#2681] / [i915#2684])
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb4/igt@i915_pm_rc6_residency@rc6-idle.html
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb8/igt@i915_pm_rc6_residency@rc6-idle.html

  * igt@kms_content_protection@atomic:
    - shard-apl:          [TIMEOUT][88] ([i915#1319]) -> [SKIP][89] ([fdo#109271])
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-apl2/igt@kms_content_protection@atomic.html
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-apl1/igt@kms_content_protection@atomic.html

  * igt@kms_psr2_sf@plane-move-sf-dmg-area-0:
    - shard-iclb:         [SKIP][90] ([i915#658]) -> [SKIP][91] ([i915#2920]) +1 similar issue
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb7/igt@kms_psr2_sf@plane-move-sf-dmg-area-0.html
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb2/igt@kms_psr2_sf@plane-move-sf-dmg-area-0.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-1:
    - shard-iclb:         [SKIP][92] ([i915#2920]) -> [SKIP][93] ([i915#658])
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-iclb2/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-1.html
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-iclb7/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-1.html

  * igt@runner@aborted:
    - shard-tglb:         [FAIL][94] ([i915#1602] / [i915#2295] / [i915#2667]) -> ([FAIL][95], [FAIL][96]) ([i915#1602] / [i915#2295] / [i915#2426] / [i915#2667] / [i915#2803])
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9670/shard-tglb7/igt@runner@aborted.html
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb5/igt@runner@aborted.html
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/shard-tglb8/igt@runner@aborted.html

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

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109290]: https://bugs.freedesktop.org/show_bug.cgi?id=109290
  [fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#110426]: https://bugs.freedesktop.org/show_bug.cgi?id=110426
  [fdo#110542]: https://bugs.freedesktop.org/show_bug.cgi?id=110542
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
  [i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
  [i915#151]: https://gitlab.freedesktop.org/drm/intel/issues/151
  [i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
  [i915#1602]: https://gitlab.freedesktop.org/drm/intel/issues/1602
  [i915#1704]: https://gitlab.freedesktop.org/drm/intel/issues/1704
  [i915#1804]: https://gitlab.freedesktop.org/drm/intel/issues/1804
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2295]: https://gitlab.freedesktop.org/drm/intel/issues/2295
  [i915#2370]: https://gitlab.freedesktop.org/drm/intel/issues/2370
  [i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
  [i915#2530]: https://gitlab.freedesktop.org/drm/intel/issues/2530
  [i915#2667]: https://gitlab.freedesktop.org/drm/intel/issues/2667
  [i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
  [i915#2684]: https://gitlab.freedesktop.org/drm/intel/issues/2684
  [i915#2803]: https://gitlab.freedesktop.org/drm/intel/issues/2803
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2852]: https://gitlab.freedesktop.org/drm/intel/issues/2852
  [i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
  [i915#433]: https://gitlab.freedesktop.org/drm/intel/issues/433
  [i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
  [i915#588]: https://gitlab.freedesktop.org/drm/intel/issues/588
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
  [i915#96]: https://gitlab.freedesktop.org/drm/intel/issues/96


Participating hosts (10 -> 8)
------------------------------

  Missing    (2): pig-skl-6260u pig-glk-j5005 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5964 -> IGTPW_5425
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_9670: 85fd189b9fbfb6e7af8d956d37be012fdd6ae0ad @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_5425: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/index.html
  IGT_5964: 0949766cb9846d7d55fac9cdf31d3d8e8ed1d0c6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5425/index.html

[-- Attachment #1.2: Type: text/html, Size: 29456 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

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

* Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] i915: Exercise sysfs client properties
  2021-01-22 21:49 ` [Intel-gfx] " Chris Wilson
@ 2021-01-25 10:20   ` Tvrtko Ursulin
  2021-01-25 10:29       ` Chris Wilson
  0 siblings, 1 reply; 12+ messages in thread
From: Tvrtko Ursulin @ 2021-01-25 10:20 UTC (permalink / raw)
  To: Chris Wilson, igt-dev; +Cc: intel-gfx


On 22/01/2021 21:49, Chris Wilson wrote:
> We store every client name, pid and runtime under sysfs. Better check
> that matches with the actual client.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   lib/igt_sysfs.c            |  36 +++
>   lib/igt_sysfs.h            |   3 +
>   tests/Makefile.sources     |   3 +
>   tests/i915/sysfs_clients.c | 450 +++++++++++++++++++++++++++++++++++++
>   tests/meson.build          |   1 +
>   5 files changed, 493 insertions(+)
>   create mode 100644 tests/i915/sysfs_clients.c
> 
> diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
> index 6aafe5349..e734143ba 100644
> --- a/lib/igt_sysfs.c
> +++ b/lib/igt_sysfs.c
> @@ -378,6 +378,42 @@ uint32_t igt_sysfs_get_u32(int dir, const char *attr)
>   	return result;
>   }
>   
> +/**
> + * igt_sysfs_get_u64:
> + * @dir: directory for the device from igt_sysfs_open()
> + * @attr: name of the sysfs node to open
> + *
> + * Convenience wrapper to read a unsigned 64bit integer from a sysfs file.
> + *
> + * Returns:
> + * The value read.
> + */
> +uint64_t igt_sysfs_get_u64(int dir, const char *attr)
> +{
> +	uint64_t result;
> +
> +	if (igt_sysfs_scanf(dir, attr, "%"PRIu64, &result) != 1)
> +		return 0;
> +
> +	return result;
> +}
> +
> +/**
> + * igt_sysfs_set_u64:
> + * @dir: directory for the device from igt_sysfs_open()
> + * @attr: name of the sysfs node to open
> + * @value: value to set
> + *
> + * Convenience wrapper to write a unsigned 64bit integer to a sysfs file.
> + *
> + * Returns:
> + * True if successfully written
> + */
> +bool igt_sysfs_set_u64(int dir, const char *attr, uint64_t value)
> +{
> +	return igt_sysfs_printf(dir, attr, "%"PRIu64, value) > 0;
> +}
> +
>   /**
>    * igt_sysfs_set_u32:
>    * @dir: directory for the device from igt_sysfs_open()
> diff --git a/lib/igt_sysfs.h b/lib/igt_sysfs.h
> index 64935a5ca..56741a0a3 100644
> --- a/lib/igt_sysfs.h
> +++ b/lib/igt_sysfs.h
> @@ -47,6 +47,9 @@ int igt_sysfs_printf(int dir, const char *attr, const char *fmt, ...)
>   uint32_t igt_sysfs_get_u32(int dir, const char *attr);
>   bool igt_sysfs_set_u32(int dir, const char *attr, uint32_t value);
>   
> +uint64_t igt_sysfs_get_u64(int dir, const char *attr);
> +bool igt_sysfs_set_u64(int dir, const char *attr, uint64_t value);
> +
>   bool igt_sysfs_get_boolean(int dir, const char *attr);
>   bool igt_sysfs_set_boolean(int dir, const char *attr, bool value);
>   
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index 1c227e750..3f663fe7e 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -114,6 +114,9 @@ TESTS_progs = \
>   TESTS_progs += api_intel_bb
>   api_intel_bb_SOURCES = i915/api_intel_bb.c
>   
> +TESTS_progs += sysfs_clients
> +sysfs_clients_SOURCES = i915/sysfs_clients.c
> +
>   TESTS_progs += sysfs_defaults
>   sysfs_defaults_SOURCES = i915/sysfs_defaults.c
>   
> diff --git a/tests/i915/sysfs_clients.c b/tests/i915/sysfs_clients.c
> new file mode 100644
> index 000000000..a77adec6d
> --- /dev/null
> +++ b/tests/i915/sysfs_clients.c
> @@ -0,0 +1,450 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright © 2021 Intel Corporation
> + */
> +
> +#include <ctype.h>
> +#include <dirent.h>
> +#include <errno.h>
> +#include <fcntl.h>
> +#include <inttypes.h>
> +#include <sys/stat.h>
> +#include <sys/types.h>
> +#include <unistd.h>
> +
> +#include "drmtest.h"
> +#include "i915/gem.h"
> +#include "i915/gem_context.h"
> +#include "i915/gem_engine_topology.h"
> +#include "igt_aux.h"
> +#include "igt_dummyload.h"
> +#include "igt_sysfs.h"
> +#include "ioctl_wrappers.h"
> +
> +static void pidname(int i915, int clients)
> +{
> +	struct dirent *de;
> +	int sv[2], rv[2];
> +	char buf[280];
> +	int me = -1;
> +	long count;
> +	pid_t pid;
> +	DIR *dir;
> +	int len;
> +
> +	dir = fdopendir(dup(clients));
> +	igt_assert(dir);
> +	rewinddir(dir);
> +
> +	count = 0;
> +	while ((de = readdir(dir))) {
> +		if (!isdigit(de->d_name[0]))
> +			continue;
> +
> +		snprintf(buf, sizeof(buf), "%s/name", de->d_name);
> +		len = igt_sysfs_read(clients, buf, buf, sizeof(buf));
> +		igt_assert_f(len > 0, "failed to open '%s/name'\n", de->d_name);
> +		buf[len - 1] = '\0';
> +		igt_debug("%s: %s\n", de->d_name, buf);
> +
> +		/* Ignore closed clients created by drm_driver_open() */
> +		if (*buf == '<')
> +			continue;
> +
> +		close(me);
> +		me = openat(clients, de->d_name, O_DIRECTORY | O_RDONLY);
> +		count++;
> +	}
> +	closedir(dir);
> +
> +	/* We expect there to be only the single client (us) running */
> +	igt_assert_eq(count, 1);
> +	igt_assert(me >= 0);
> +
> +	len = igt_sysfs_read(me, "name", buf, sizeof(buf));
> +	igt_assert(len > 0);
> +	buf[len - 1] = '\0';

We could add a helper like igt_syfs_str or something since this repeats 
a lot but not important straight away.

> +
> +	igt_info("My name: %s\n", buf);
> +	igt_assert(strcmp(buf, igt_test_name()) == 0);
> +
> +	igt_assert(pipe(sv) == 0);
> +	igt_assert(pipe(rv) == 0);
> +
> +	/* If give our fd to someone else, they take over ownership of client */
> +	igt_fork(child, 1) {
> +		read(sv[0], &pid, sizeof(pid));
> +
> +		gem_context_destroy(i915, gem_context_create(i915));
> +
> +		pid = getpid();
> +		write(rv[1], &pid, sizeof(pid));
> +	}
> +	close(sv[0]);
> +	close(rv[1]);
> +
> +	/* Child exists, but not yet running, we still own the client */
> +	len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
> +	igt_assert(len > 0);
> +	buf[len - 1] = '\0';
> +
> +	pid = getpid();
> +	igt_info("My pid: %s\n", buf);
> +	igt_assert_eq(atoi(buf), pid);
> +
> +	/* Release and wait for the child */
> +	igt_assert_eq(write(sv[1], &pid, sizeof(pid)), sizeof(pid));
> +	igt_assert_eq(read(rv[0], &pid, sizeof(pid)), sizeof(pid));
> +
> +	/* Now child owns the client and pid should be updated to match */
> +	len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
> +	igt_assert(len > 0);
> +	buf[len - 1] = '\0';
> +
> +	igt_info("New pid: %s\n", buf);
> +	igt_assert_eq(atoi(buf), pid);
> +	igt_waitchildren();
> +
> +	/* Child has definitely gone, but the client should remain */
> +	len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
> +	igt_assert(len > 0);
> +	buf[len - 1] = '\0';
> +
> +	igt_info("Old pid: %s\n", buf);
> +	igt_assert_eq(atoi(buf), pid);

"Old pid" as in pid of the child which exited. Do we have a IGT helper 
to cross check what the child sent via pipe matches what fork said? Or 
what waitpid reported as exited.

Also, would it revert back to parent pid if parent did one context 
create at this point? Could be worth checking if so.

> +
> +	close(sv[1]);
> +	close(rv[0]);
> +	close(me);
> +}
> +
> +static long count_clients(int clients)
> +{
> +	struct dirent *de;
> +	long count = 0;
> +	char buf[280];
> +	DIR *dir;
> +
> +	dir = fdopendir(dup(clients));
> +	igt_assert(dir);
> +	rewinddir(dir);
> +
> +	while ((de = readdir(dir))) {
> +		int len;
> +
> +		if (!isdigit(de->d_name[0]))
> +			continue;
> +
> +		snprintf(buf, sizeof(buf), "%s/name", de->d_name);
> +		len = igt_sysfs_read(clients, buf, buf, sizeof(buf));
> +		if (len < 0)
> +			continue;
> +
> +		count += *buf != '<';
> +	}
> +	closedir(dir);
> +
> +	return count;
> +}
> +
> +static void create(int i915, int clients)
> +{
> +	int fd[16];
> +
> +	/* Each new open("/dev/dri/cardN") is a new client */
> +	igt_assert_eq(count_clients(clients), 1);
> +	for (int i = 0; i < ARRAY_SIZE(fd); i++) {
> +		fd[i] = gem_reopen_driver(i915);
> +		igt_assert_eq(count_clients(clients), i + 2);
> +	}
> +
> +	for (int i = 0; i < ARRAY_SIZE(fd); i++)
> +		close(fd[i]);
> +
> +	/* Cleanup delayed behind rcu */
> +	igt_until_timeout(30) {
> +		usleep(0);

Intention to yield?

> +		if (count_clients(clients) == 1)
> +			break;
> +		usleep(10000);
> +	}
> +	igt_assert_eq(count_clients(clients), 1);

A variant which closes a single random client and does a cross check in 
every loop iteration could be useful then opens a new client checking 
id's are unique. Can be added later.

> +}
> +
> +static int find_me(int clients, pid_t pid)
> +{
> +	struct dirent *de;
> +	char buf[280];
> +	int me = -1;
> +	DIR *dir;
> +
> +	dir = fdopendir(dup(clients));
> +	igt_assert(dir);
> +	rewinddir(dir);
> +
> +	while ((de = readdir(dir))) {
> +		int ret;
> +
> +		if (!isdigit(de->d_name[0]))
> +			continue;
> +
> +		snprintf(buf, sizeof(buf), "%s/pid", de->d_name);
> +		ret = igt_sysfs_read(clients, buf, buf, sizeof(buf));
> +		igt_assert_f(ret > 0, "failed to open '%s/pid'\n", de->d_name);
> +		if (atoi(buf) != pid)
> +			continue;
> +
> +		me = openat(clients, de->d_name, O_DIRECTORY | O_RDONLY);
> +		break;
> +	}
> +
> +	closedir(dir);
> +	return me;
> +}
> +
> +#define MAX_CLASS 64
> +static int read_runtime(int client, uint64_t *runtime)
> +{
> +	int fd = openat(client, "busy", O_DIRECTORY | O_RDONLY);
> +	DIR *dir = fdopendir(fd);
> +	struct dirent *de;
> +	int count = 0;
> +
> +	memset(runtime, 0, sizeof(*runtime) * MAX_CLASS);
> +	while ((de = readdir(dir))) {
> +		int class;
> +
> +		if (!isdigit(de->d_name[0]))
> +			continue;
> +
> +		class = atoi(de->d_name);
> +		igt_assert(class < MAX_CLASS);
> +		runtime[class] = igt_sysfs_get_u64(fd, de->d_name);
> +
> +		count += runtime[class] != 0;
> +	}
> +	closedir(dir);
> +
> +	return count;
> +}
> +
> +static uint64_t measured_usleep(unsigned int usec)
> +{
> +	struct timespec tv;
> +	unsigned int slept;
> +
> +	slept = igt_nsec_elapsed(memset(&tv, 0, sizeof(tv)));
> +	igt_assert(slept == 0);
> +	do {
> +		usleep(usec - slept);
> +		slept = igt_nsec_elapsed(&tv) / 1000;
> +	} while (slept < usec);
> +
> +	return igt_nsec_elapsed(&tv);
> +}
> +
> +static void
> +busy_one(int device, int clients, const struct intel_execution_engine2 *e)
> +{
> +	uint64_t active[MAX_CLASS];
> +	uint64_t idle[MAX_CLASS];
> +	uint64_t old[MAX_CLASS];
> +	igt_spin_t *spin;
> +	int64_t delay;
> +	int i915;
> +	int me;
> +
> +	/* Create a fresh client with 0 runtime */
> +	i915 = gem_reopen_driver(device);
> +	gem_context_copy_engines(device, 0, i915, 0);
> +
> +	me = find_me(clients, getpid());
> +	igt_assert(me != -1);
> +	igt_require(faccessat(me, "busy", 0, F_OK) == 0);
> +
> +	spin = igt_spin_new(i915,
> +			    gem_context_clone_with_engines(i915, 0),
> +			    .engine = e->flags,
> +			    .flags = IGT_SPIN_POLL_RUN);
> +	igt_spin_busywait_until_started(spin);
> +
> +	delay = -500000; /* 500us slack */
> +	memset(old, 0, sizeof(old));
> +	for (int pass = 0; pass < 5; pass++) {
> +		delay += measured_usleep(1000);
> +		igt_debug("delay: %'"PRIu64"ns\n", delay);
> +
> +		/* Check that we accumulate the runtime, while active */
> +		igt_assert_eq(read_runtime(me, active), 1);
> +		igt_info("active1[%d]: %'"PRIu64"ns\n", pass, active[e->class]);
> +		igt_assert(active[e->class] > old[e->class]); /* monotonic */
> +		igt_assert(active[e->class] > delay); /* within reason */

Sending greetings to GuC soon. Will need to emit a high prio pulse to 
preempt the spinner, maybe, no, probably won't be enough.

> +	}
> +
> +	gem_quiescent_gpu(i915);
> +
> +	/* And again now idle */
> +	igt_assert_eq(read_runtime(me, idle), 1);
> +	igt_info("idle: %'"PRIu64"ns\n", idle[e->class]);
> +	igt_assert(idle[e->class] >= active[e->class]);
> +
> +	gem_context_destroy(i915, spin->execbuf.rsvd1);
> +
> +	/* And finally after the executing context is no more */
> +	igt_assert_eq(read_runtime(me, old), 1);
> +	igt_info("old: %'"PRIu64"ns\n", old[e->class]);
> +	igt_assert_eq_u64(old[e->class], idle[e->class]);
> +
> +	/* Once more on the default context for good luck */
> +	igt_spin_reset(spin);
> +	spin->execbuf.rsvd1 = 0;
> +	gem_execbuf(i915, &spin->execbuf);
> +	igt_spin_busywait_until_started(spin);
> +
> +	for (int pass = 0; pass < 5; pass++) {
> +		delay += measured_usleep(1000);
> +		igt_debug("delay: %'"PRIu64"ns\n", delay);
> +
> +		/* Check that we accumulate the runtime, while active */
> +		igt_assert_eq(read_runtime(me, active), 1);
> +		igt_info("active0[%d]: %'"PRIu64"ns\n", pass, active[e->class]);
> +		igt_assert(active[e->class] > old[e->class]); /* monotonic */
> +		igt_assert(active[e->class] > delay); /* within reason */
> +	}
> +
> +	gem_quiescent_gpu(i915);
> +
> +
> +	igt_spin_free(i915, spin);
> +	close(i915);
> +}
> +
> +static void busy_all(int device, int clients)
> +{
> +	const struct intel_execution_engine2 *e;
> +	uint64_t active[MAX_CLASS];
> +	uint64_t idle[MAX_CLASS];
> +	uint64_t old[MAX_CLASS];
> +	uint64_t classes = 0;
> +	igt_spin_t *spin;
> +	int expect = 0;
> +	int64_t delay;
> +	int i915;
> +	int me;
> +
> +	/* Create a fresh client with 0 runtime */
> +	i915 = gem_reopen_driver(device);
> +	gem_context_copy_engines(device, 0, i915, 0);
> +
> +	me = find_me(clients, getpid());
> +	igt_assert(me != -1);
> +	igt_require(faccessat(me, "busy", 0, F_OK) == 0);
> +
> +	spin = igt_spin_new(i915,
> +			    gem_context_clone_with_engines(i915, 0),
> +			    .flags = IGT_SPIN_POLL_RUN);
> +	__for_each_physical_engine(i915, e) {
> +		spin->execbuf.flags &= ~63;
> +		spin->execbuf.flags |= e->flags;
> +		gem_execbuf(i915, &spin->execbuf);
> +
> +		if (!(classes & (1ull << e->class)))
> +			expect++;
> +		classes |= 1ull << e->class;
> +	}
> +	igt_spin_busywait_until_started(spin);
> +
> +	delay = -500000; /* 500us slack */
> +	memset(old, 0, sizeof(old));
> +	for (int pass = 0; pass < 5; pass++) {
> +		delay += measured_usleep(1000);
> +		igt_debug("delay: %'"PRIu64"ns\n", delay);
> +
> +		/* Check that we accumulate the runtime, while active */
> +		igt_assert_eq(read_runtime(me, active), expect);
> +		for (int i = 0; i < ARRAY_SIZE(active); i++) {
> +			if (!active[i])
> +				continue;

Don't you want do skip based on the bitmap in classes here? Although the 
assert on expect will catch failures to account some class already so 
optional I guess.

> +
> +			igt_info("active[%d]: %'"PRIu64"ns\n", i, active[i]);
> +			igt_assert(active[i] > old[i]); /* monotonic */
> +			igt_assert(active[i] > delay); /* within reason */
> +		}
> +	}
> +
> +	gem_quiescent_gpu(i915);
> +
> +	/* And again now idle */
> +	igt_assert_eq(read_runtime(me, idle), expect);
> +	for (int i = 0; i < ARRAY_SIZE(idle); i++) {
> +		if (!idle[i])
> +			continue;
> +
> +		igt_info("idle[%d]: %'"PRIu64"ns\n", i, idle[i]);
> +		igt_assert(idle[i] >= active[i]);
> +	}
> +
> +	gem_context_destroy(i915, spin->execbuf.rsvd1);
> +	igt_spin_free(i915, spin);
> +
> +	/* And finally after the executing context is no more */
> +	igt_assert_eq(read_runtime(me, old), expect);
> +	for (int i = 0; i < ARRAY_SIZE(old); i++) {
> +		if (!old[i])
> +			continue;
> +
> +		igt_info("old[%d]: %'"PRIu64"ns\n", i, old[i]);
> +		igt_assert_eq_u64(old[i], idle[i]);
> +	}
> +
> +	close(i915);
> +}
> +
> +igt_main
> +{
> +	const struct intel_execution_engine2 *e;
> +	int i915 = -1, clients = -1;
> +
> +	igt_fixture {
> +		int sys;
> +
> +		/* Don't allow [too many] extra clients to be opened */
> +		i915 = __drm_open_driver(DRIVER_INTEL);
> +		igt_require_gem(i915);
> +
> +		sys = igt_sysfs_open(i915);
> +		igt_require(sys != -1);
> +
> +		clients = openat(sys, "clients", O_RDONLY);
> +		igt_require(clients != -1);
> +
> +		close(sys);
> +	}
> +
> +	igt_subtest("pidname")
> +		pidname(i915, clients);
> +
> +	igt_subtest("create")
> +		create(i915, clients);
> +
> +	igt_subtest_with_dynamic("busy") {
> +		__for_each_physical_engine(i915, e) {
> +			igt_dynamic_f("%s", e->name) {
> +				igt_fork(child, 1)
> +					busy_one(i915, clients, e);
> +				igt_waitchildren();
> +			}
> +		}
> +	}
> +
> +	igt_subtest("busy-all") {
> +		igt_fork(child, 1)
> +			busy_all(i915, clients);
> +		igt_waitchildren();
> +	}
> +
> +	igt_fixture {
> +		close(clients);
> +		close(i915);
> +	}
> +}
> diff --git a/tests/meson.build b/tests/meson.build
> index ff924ff99..825e01833 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -236,6 +236,7 @@ i915_progs = [
>   	'i915_query',
>   	'i915_selftest',
>   	'i915_suspend',
> +	'sysfs_clients',
>   	'sysfs_defaults',
>   	'sysfs_heartbeat_interval',
>   	'sysfs_preempt_timeout',
> 

No issues found, just comments so:

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

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

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

* Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] i915: Exercise sysfs client properties
  2021-01-25 10:20   ` [Intel-gfx] [igt-dev] " Tvrtko Ursulin
@ 2021-01-25 10:29       ` Chris Wilson
  0 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2021-01-25 10:29 UTC (permalink / raw)
  To: Tvrtko Ursulin, igt-dev; +Cc: intel-gfx

Quoting Tvrtko Ursulin (2021-01-25 10:20:15)
> 
> On 22/01/2021 21:49, Chris Wilson wrote:
> > We store every client name, pid and runtime under sysfs. Better check
> > that matches with the actual client.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >   lib/igt_sysfs.c            |  36 +++
> >   lib/igt_sysfs.h            |   3 +
> >   tests/Makefile.sources     |   3 +
> >   tests/i915/sysfs_clients.c | 450 +++++++++++++++++++++++++++++++++++++
> >   tests/meson.build          |   1 +
> >   5 files changed, 493 insertions(+)
> >   create mode 100644 tests/i915/sysfs_clients.c
> > 
> > diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
> > index 6aafe5349..e734143ba 100644
> > --- a/lib/igt_sysfs.c
> > +++ b/lib/igt_sysfs.c
> > @@ -378,6 +378,42 @@ uint32_t igt_sysfs_get_u32(int dir, const char *attr)
> >       return result;
> >   }
> >   
> > +/**
> > + * igt_sysfs_get_u64:
> > + * @dir: directory for the device from igt_sysfs_open()
> > + * @attr: name of the sysfs node to open
> > + *
> > + * Convenience wrapper to read a unsigned 64bit integer from a sysfs file.
> > + *
> > + * Returns:
> > + * The value read.
> > + */
> > +uint64_t igt_sysfs_get_u64(int dir, const char *attr)
> > +{
> > +     uint64_t result;
> > +
> > +     if (igt_sysfs_scanf(dir, attr, "%"PRIu64, &result) != 1)
> > +             return 0;
> > +
> > +     return result;
> > +}
> > +
> > +/**
> > + * igt_sysfs_set_u64:
> > + * @dir: directory for the device from igt_sysfs_open()
> > + * @attr: name of the sysfs node to open
> > + * @value: value to set
> > + *
> > + * Convenience wrapper to write a unsigned 64bit integer to a sysfs file.
> > + *
> > + * Returns:
> > + * True if successfully written
> > + */
> > +bool igt_sysfs_set_u64(int dir, const char *attr, uint64_t value)
> > +{
> > +     return igt_sysfs_printf(dir, attr, "%"PRIu64, value) > 0;
> > +}
> > +
> >   /**
> >    * igt_sysfs_set_u32:
> >    * @dir: directory for the device from igt_sysfs_open()
> > diff --git a/lib/igt_sysfs.h b/lib/igt_sysfs.h
> > index 64935a5ca..56741a0a3 100644
> > --- a/lib/igt_sysfs.h
> > +++ b/lib/igt_sysfs.h
> > @@ -47,6 +47,9 @@ int igt_sysfs_printf(int dir, const char *attr, const char *fmt, ...)
> >   uint32_t igt_sysfs_get_u32(int dir, const char *attr);
> >   bool igt_sysfs_set_u32(int dir, const char *attr, uint32_t value);
> >   
> > +uint64_t igt_sysfs_get_u64(int dir, const char *attr);
> > +bool igt_sysfs_set_u64(int dir, const char *attr, uint64_t value);
> > +
> >   bool igt_sysfs_get_boolean(int dir, const char *attr);
> >   bool igt_sysfs_set_boolean(int dir, const char *attr, bool value);
> >   
> > diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> > index 1c227e750..3f663fe7e 100644
> > --- a/tests/Makefile.sources
> > +++ b/tests/Makefile.sources
> > @@ -114,6 +114,9 @@ TESTS_progs = \
> >   TESTS_progs += api_intel_bb
> >   api_intel_bb_SOURCES = i915/api_intel_bb.c
> >   
> > +TESTS_progs += sysfs_clients
> > +sysfs_clients_SOURCES = i915/sysfs_clients.c
> > +
> >   TESTS_progs += sysfs_defaults
> >   sysfs_defaults_SOURCES = i915/sysfs_defaults.c
> >   
> > diff --git a/tests/i915/sysfs_clients.c b/tests/i915/sysfs_clients.c
> > new file mode 100644
> > index 000000000..a77adec6d
> > --- /dev/null
> > +++ b/tests/i915/sysfs_clients.c
> > @@ -0,0 +1,450 @@
> > +/* SPDX-License-Identifier: MIT */
> > +/*
> > + * Copyright © 2021 Intel Corporation
> > + */
> > +
> > +#include <ctype.h>
> > +#include <dirent.h>
> > +#include <errno.h>
> > +#include <fcntl.h>
> > +#include <inttypes.h>
> > +#include <sys/stat.h>
> > +#include <sys/types.h>
> > +#include <unistd.h>
> > +
> > +#include "drmtest.h"
> > +#include "i915/gem.h"
> > +#include "i915/gem_context.h"
> > +#include "i915/gem_engine_topology.h"
> > +#include "igt_aux.h"
> > +#include "igt_dummyload.h"
> > +#include "igt_sysfs.h"
> > +#include "ioctl_wrappers.h"
> > +
> > +static void pidname(int i915, int clients)
> > +{
> > +     struct dirent *de;
> > +     int sv[2], rv[2];
> > +     char buf[280];
> > +     int me = -1;
> > +     long count;
> > +     pid_t pid;
> > +     DIR *dir;
> > +     int len;
> > +
> > +     dir = fdopendir(dup(clients));
> > +     igt_assert(dir);
> > +     rewinddir(dir);
> > +
> > +     count = 0;
> > +     while ((de = readdir(dir))) {
> > +             if (!isdigit(de->d_name[0]))
> > +                     continue;
> > +
> > +             snprintf(buf, sizeof(buf), "%s/name", de->d_name);
> > +             len = igt_sysfs_read(clients, buf, buf, sizeof(buf));
> > +             igt_assert_f(len > 0, "failed to open '%s/name'\n", de->d_name);
> > +             buf[len - 1] = '\0';
> > +             igt_debug("%s: %s\n", de->d_name, buf);
> > +
> > +             /* Ignore closed clients created by drm_driver_open() */
> > +             if (*buf == '<')
> > +                     continue;
> > +
> > +             close(me);
> > +             me = openat(clients, de->d_name, O_DIRECTORY | O_RDONLY);
> > +             count++;
> > +     }
> > +     closedir(dir);
> > +
> > +     /* We expect there to be only the single client (us) running */
> > +     igt_assert_eq(count, 1);
> > +     igt_assert(me >= 0);
> > +
> > +     len = igt_sysfs_read(me, "name", buf, sizeof(buf));
> > +     igt_assert(len > 0);
> > +     buf[len - 1] = '\0';
> 
> We could add a helper like igt_syfs_str or something since this repeats 
> a lot but not important straight away.

-> strterm()

> 
> > +
> > +     igt_info("My name: %s\n", buf);
> > +     igt_assert(strcmp(buf, igt_test_name()) == 0);
> > +
> > +     igt_assert(pipe(sv) == 0);
> > +     igt_assert(pipe(rv) == 0);
> > +
> > +     /* If give our fd to someone else, they take over ownership of client */
> > +     igt_fork(child, 1) {
> > +             read(sv[0], &pid, sizeof(pid));
> > +
> > +             gem_context_destroy(i915, gem_context_create(i915));
> > +
> > +             pid = getpid();
> > +             write(rv[1], &pid, sizeof(pid));
> > +     }
> > +     close(sv[0]);
> > +     close(rv[1]);
> > +
> > +     /* Child exists, but not yet running, we still own the client */
> > +     len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
> > +     igt_assert(len > 0);
> > +     buf[len - 1] = '\0';
> > +
> > +     pid = getpid();
> > +     igt_info("My pid: %s\n", buf);
> > +     igt_assert_eq(atoi(buf), pid);
> > +
> > +     /* Release and wait for the child */
> > +     igt_assert_eq(write(sv[1], &pid, sizeof(pid)), sizeof(pid));
> > +     igt_assert_eq(read(rv[0], &pid, sizeof(pid)), sizeof(pid));
> > +
> > +     /* Now child owns the client and pid should be updated to match */
> > +     len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
> > +     igt_assert(len > 0);
> > +     buf[len - 1] = '\0';
> > +
> > +     igt_info("New pid: %s\n", buf);
> > +     igt_assert_eq(atoi(buf), pid);
> > +     igt_waitchildren();
> > +
> > +     /* Child has definitely gone, but the client should remain */
> > +     len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
> > +     igt_assert(len > 0);
> > +     buf[len - 1] = '\0';
> > +
> > +     igt_info("Old pid: %s\n", buf);
> > +     igt_assert_eq(atoi(buf), pid);
> 
> "Old pid" as in pid of the child which exited. Do we have a IGT helper 
> to cross check what the child sent via pipe matches what fork said? Or 
> what waitpid reported as exited.

For the sake of the test, you can just scroll back and check ;)
 
> Also, would it revert back to parent pid if parent did one context 
> create at this point? Could be worth checking if so.

I added such a test.
 
> > +
> > +     close(sv[1]);
> > +     close(rv[0]);
> > +     close(me);
> > +}
> > +
> > +static long count_clients(int clients)
> > +{
> > +     struct dirent *de;
> > +     long count = 0;
> > +     char buf[280];
> > +     DIR *dir;
> > +
> > +     dir = fdopendir(dup(clients));
> > +     igt_assert(dir);
> > +     rewinddir(dir);
> > +
> > +     while ((de = readdir(dir))) {
> > +             int len;
> > +
> > +             if (!isdigit(de->d_name[0]))
> > +                     continue;
> > +
> > +             snprintf(buf, sizeof(buf), "%s/name", de->d_name);
> > +             len = igt_sysfs_read(clients, buf, buf, sizeof(buf));
> > +             if (len < 0)
> > +                     continue;
> > +
> > +             count += *buf != '<';
> > +     }
> > +     closedir(dir);
> > +
> > +     return count;
> > +}
> > +
> > +static void create(int i915, int clients)
> > +{
> > +     int fd[16];
> > +
> > +     /* Each new open("/dev/dri/cardN") is a new client */
> > +     igt_assert_eq(count_clients(clients), 1);
> > +     for (int i = 0; i < ARRAY_SIZE(fd); i++) {
> > +             fd[i] = gem_reopen_driver(i915);
> > +             igt_assert_eq(count_clients(clients), i + 2);
> > +     }
> > +
> > +     for (int i = 0; i < ARRAY_SIZE(fd); i++)
> > +             close(fd[i]);
> > +
> > +     /* Cleanup delayed behind rcu */
> > +     igt_until_timeout(30) {
> > +             usleep(0);
> 
> Intention to yield?

If you think that's more likely to work :)

> 
> > +             if (count_clients(clients) == 1)
> > +                     break;
> > +             usleep(10000);
> > +     }
> > +     igt_assert_eq(count_clients(clients), 1);
> 
> A variant which closes a single random client and does a cross check in 
> every loop iteration could be useful then opens a new client checking 
> id's are unique. Can be added later.

One not-recycling test coming up.

> > +     delay = -500000; /* 500us slack */
> > +     memset(old, 0, sizeof(old));
> > +     for (int pass = 0; pass < 5; pass++) {
> > +             delay += measured_usleep(1000);
> > +             igt_debug("delay: %'"PRIu64"ns\n", delay);
> > +
> > +             /* Check that we accumulate the runtime, while active */
> > +             igt_assert_eq(read_runtime(me, active), 1);
> > +             igt_info("active1[%d]: %'"PRIu64"ns\n", pass, active[e->class]);
> > +             igt_assert(active[e->class] > old[e->class]); /* monotonic */
> > +             igt_assert(active[e->class] > delay); /* within reason */
> 
> Sending greetings to GuC soon. Will need to emit a high prio pulse to 
> preempt the spinner, maybe, no, probably won't be enough.

Exactly. The GuC falls far short of what we need atm. A pulse from every
sysfs read() and wait for pulse completion before returning? What
happens for non-preemptible workloads?

> > +     delay = -500000; /* 500us slack */
> > +     memset(old, 0, sizeof(old));
> > +     for (int pass = 0; pass < 5; pass++) {
> > +             delay += measured_usleep(1000);
> > +             igt_debug("delay: %'"PRIu64"ns\n", delay);
> > +
> > +             /* Check that we accumulate the runtime, while active */
> > +             igt_assert_eq(read_runtime(me, active), expect);
> > +             for (int i = 0; i < ARRAY_SIZE(active); i++) {
> > +                     if (!active[i])
> > +                             continue;
> 
> Don't you want do skip based on the bitmap in classes here? Although the 
> assert on expect will catch failures to account some class already so 
> optional I guess.

Bitmap came afterwards, and indeed it should have replaced the !active[i].
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [PATCH i-g-t] i915: Exercise sysfs client properties
@ 2021-01-25 10:29       ` Chris Wilson
  0 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2021-01-25 10:29 UTC (permalink / raw)
  To: Tvrtko Ursulin, igt-dev; +Cc: intel-gfx

Quoting Tvrtko Ursulin (2021-01-25 10:20:15)
> 
> On 22/01/2021 21:49, Chris Wilson wrote:
> > We store every client name, pid and runtime under sysfs. Better check
> > that matches with the actual client.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >   lib/igt_sysfs.c            |  36 +++
> >   lib/igt_sysfs.h            |   3 +
> >   tests/Makefile.sources     |   3 +
> >   tests/i915/sysfs_clients.c | 450 +++++++++++++++++++++++++++++++++++++
> >   tests/meson.build          |   1 +
> >   5 files changed, 493 insertions(+)
> >   create mode 100644 tests/i915/sysfs_clients.c
> > 
> > diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
> > index 6aafe5349..e734143ba 100644
> > --- a/lib/igt_sysfs.c
> > +++ b/lib/igt_sysfs.c
> > @@ -378,6 +378,42 @@ uint32_t igt_sysfs_get_u32(int dir, const char *attr)
> >       return result;
> >   }
> >   
> > +/**
> > + * igt_sysfs_get_u64:
> > + * @dir: directory for the device from igt_sysfs_open()
> > + * @attr: name of the sysfs node to open
> > + *
> > + * Convenience wrapper to read a unsigned 64bit integer from a sysfs file.
> > + *
> > + * Returns:
> > + * The value read.
> > + */
> > +uint64_t igt_sysfs_get_u64(int dir, const char *attr)
> > +{
> > +     uint64_t result;
> > +
> > +     if (igt_sysfs_scanf(dir, attr, "%"PRIu64, &result) != 1)
> > +             return 0;
> > +
> > +     return result;
> > +}
> > +
> > +/**
> > + * igt_sysfs_set_u64:
> > + * @dir: directory for the device from igt_sysfs_open()
> > + * @attr: name of the sysfs node to open
> > + * @value: value to set
> > + *
> > + * Convenience wrapper to write a unsigned 64bit integer to a sysfs file.
> > + *
> > + * Returns:
> > + * True if successfully written
> > + */
> > +bool igt_sysfs_set_u64(int dir, const char *attr, uint64_t value)
> > +{
> > +     return igt_sysfs_printf(dir, attr, "%"PRIu64, value) > 0;
> > +}
> > +
> >   /**
> >    * igt_sysfs_set_u32:
> >    * @dir: directory for the device from igt_sysfs_open()
> > diff --git a/lib/igt_sysfs.h b/lib/igt_sysfs.h
> > index 64935a5ca..56741a0a3 100644
> > --- a/lib/igt_sysfs.h
> > +++ b/lib/igt_sysfs.h
> > @@ -47,6 +47,9 @@ int igt_sysfs_printf(int dir, const char *attr, const char *fmt, ...)
> >   uint32_t igt_sysfs_get_u32(int dir, const char *attr);
> >   bool igt_sysfs_set_u32(int dir, const char *attr, uint32_t value);
> >   
> > +uint64_t igt_sysfs_get_u64(int dir, const char *attr);
> > +bool igt_sysfs_set_u64(int dir, const char *attr, uint64_t value);
> > +
> >   bool igt_sysfs_get_boolean(int dir, const char *attr);
> >   bool igt_sysfs_set_boolean(int dir, const char *attr, bool value);
> >   
> > diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> > index 1c227e750..3f663fe7e 100644
> > --- a/tests/Makefile.sources
> > +++ b/tests/Makefile.sources
> > @@ -114,6 +114,9 @@ TESTS_progs = \
> >   TESTS_progs += api_intel_bb
> >   api_intel_bb_SOURCES = i915/api_intel_bb.c
> >   
> > +TESTS_progs += sysfs_clients
> > +sysfs_clients_SOURCES = i915/sysfs_clients.c
> > +
> >   TESTS_progs += sysfs_defaults
> >   sysfs_defaults_SOURCES = i915/sysfs_defaults.c
> >   
> > diff --git a/tests/i915/sysfs_clients.c b/tests/i915/sysfs_clients.c
> > new file mode 100644
> > index 000000000..a77adec6d
> > --- /dev/null
> > +++ b/tests/i915/sysfs_clients.c
> > @@ -0,0 +1,450 @@
> > +/* SPDX-License-Identifier: MIT */
> > +/*
> > + * Copyright © 2021 Intel Corporation
> > + */
> > +
> > +#include <ctype.h>
> > +#include <dirent.h>
> > +#include <errno.h>
> > +#include <fcntl.h>
> > +#include <inttypes.h>
> > +#include <sys/stat.h>
> > +#include <sys/types.h>
> > +#include <unistd.h>
> > +
> > +#include "drmtest.h"
> > +#include "i915/gem.h"
> > +#include "i915/gem_context.h"
> > +#include "i915/gem_engine_topology.h"
> > +#include "igt_aux.h"
> > +#include "igt_dummyload.h"
> > +#include "igt_sysfs.h"
> > +#include "ioctl_wrappers.h"
> > +
> > +static void pidname(int i915, int clients)
> > +{
> > +     struct dirent *de;
> > +     int sv[2], rv[2];
> > +     char buf[280];
> > +     int me = -1;
> > +     long count;
> > +     pid_t pid;
> > +     DIR *dir;
> > +     int len;
> > +
> > +     dir = fdopendir(dup(clients));
> > +     igt_assert(dir);
> > +     rewinddir(dir);
> > +
> > +     count = 0;
> > +     while ((de = readdir(dir))) {
> > +             if (!isdigit(de->d_name[0]))
> > +                     continue;
> > +
> > +             snprintf(buf, sizeof(buf), "%s/name", de->d_name);
> > +             len = igt_sysfs_read(clients, buf, buf, sizeof(buf));
> > +             igt_assert_f(len > 0, "failed to open '%s/name'\n", de->d_name);
> > +             buf[len - 1] = '\0';
> > +             igt_debug("%s: %s\n", de->d_name, buf);
> > +
> > +             /* Ignore closed clients created by drm_driver_open() */
> > +             if (*buf == '<')
> > +                     continue;
> > +
> > +             close(me);
> > +             me = openat(clients, de->d_name, O_DIRECTORY | O_RDONLY);
> > +             count++;
> > +     }
> > +     closedir(dir);
> > +
> > +     /* We expect there to be only the single client (us) running */
> > +     igt_assert_eq(count, 1);
> > +     igt_assert(me >= 0);
> > +
> > +     len = igt_sysfs_read(me, "name", buf, sizeof(buf));
> > +     igt_assert(len > 0);
> > +     buf[len - 1] = '\0';
> 
> We could add a helper like igt_syfs_str or something since this repeats 
> a lot but not important straight away.

-> strterm()

> 
> > +
> > +     igt_info("My name: %s\n", buf);
> > +     igt_assert(strcmp(buf, igt_test_name()) == 0);
> > +
> > +     igt_assert(pipe(sv) == 0);
> > +     igt_assert(pipe(rv) == 0);
> > +
> > +     /* If give our fd to someone else, they take over ownership of client */
> > +     igt_fork(child, 1) {
> > +             read(sv[0], &pid, sizeof(pid));
> > +
> > +             gem_context_destroy(i915, gem_context_create(i915));
> > +
> > +             pid = getpid();
> > +             write(rv[1], &pid, sizeof(pid));
> > +     }
> > +     close(sv[0]);
> > +     close(rv[1]);
> > +
> > +     /* Child exists, but not yet running, we still own the client */
> > +     len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
> > +     igt_assert(len > 0);
> > +     buf[len - 1] = '\0';
> > +
> > +     pid = getpid();
> > +     igt_info("My pid: %s\n", buf);
> > +     igt_assert_eq(atoi(buf), pid);
> > +
> > +     /* Release and wait for the child */
> > +     igt_assert_eq(write(sv[1], &pid, sizeof(pid)), sizeof(pid));
> > +     igt_assert_eq(read(rv[0], &pid, sizeof(pid)), sizeof(pid));
> > +
> > +     /* Now child owns the client and pid should be updated to match */
> > +     len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
> > +     igt_assert(len > 0);
> > +     buf[len - 1] = '\0';
> > +
> > +     igt_info("New pid: %s\n", buf);
> > +     igt_assert_eq(atoi(buf), pid);
> > +     igt_waitchildren();
> > +
> > +     /* Child has definitely gone, but the client should remain */
> > +     len = igt_sysfs_read(me, "pid", buf, sizeof(buf));
> > +     igt_assert(len > 0);
> > +     buf[len - 1] = '\0';
> > +
> > +     igt_info("Old pid: %s\n", buf);
> > +     igt_assert_eq(atoi(buf), pid);
> 
> "Old pid" as in pid of the child which exited. Do we have a IGT helper 
> to cross check what the child sent via pipe matches what fork said? Or 
> what waitpid reported as exited.

For the sake of the test, you can just scroll back and check ;)
 
> Also, would it revert back to parent pid if parent did one context 
> create at this point? Could be worth checking if so.

I added such a test.
 
> > +
> > +     close(sv[1]);
> > +     close(rv[0]);
> > +     close(me);
> > +}
> > +
> > +static long count_clients(int clients)
> > +{
> > +     struct dirent *de;
> > +     long count = 0;
> > +     char buf[280];
> > +     DIR *dir;
> > +
> > +     dir = fdopendir(dup(clients));
> > +     igt_assert(dir);
> > +     rewinddir(dir);
> > +
> > +     while ((de = readdir(dir))) {
> > +             int len;
> > +
> > +             if (!isdigit(de->d_name[0]))
> > +                     continue;
> > +
> > +             snprintf(buf, sizeof(buf), "%s/name", de->d_name);
> > +             len = igt_sysfs_read(clients, buf, buf, sizeof(buf));
> > +             if (len < 0)
> > +                     continue;
> > +
> > +             count += *buf != '<';
> > +     }
> > +     closedir(dir);
> > +
> > +     return count;
> > +}
> > +
> > +static void create(int i915, int clients)
> > +{
> > +     int fd[16];
> > +
> > +     /* Each new open("/dev/dri/cardN") is a new client */
> > +     igt_assert_eq(count_clients(clients), 1);
> > +     for (int i = 0; i < ARRAY_SIZE(fd); i++) {
> > +             fd[i] = gem_reopen_driver(i915);
> > +             igt_assert_eq(count_clients(clients), i + 2);
> > +     }
> > +
> > +     for (int i = 0; i < ARRAY_SIZE(fd); i++)
> > +             close(fd[i]);
> > +
> > +     /* Cleanup delayed behind rcu */
> > +     igt_until_timeout(30) {
> > +             usleep(0);
> 
> Intention to yield?

If you think that's more likely to work :)

> 
> > +             if (count_clients(clients) == 1)
> > +                     break;
> > +             usleep(10000);
> > +     }
> > +     igt_assert_eq(count_clients(clients), 1);
> 
> A variant which closes a single random client and does a cross check in 
> every loop iteration could be useful then opens a new client checking 
> id's are unique. Can be added later.

One not-recycling test coming up.

> > +     delay = -500000; /* 500us slack */
> > +     memset(old, 0, sizeof(old));
> > +     for (int pass = 0; pass < 5; pass++) {
> > +             delay += measured_usleep(1000);
> > +             igt_debug("delay: %'"PRIu64"ns\n", delay);
> > +
> > +             /* Check that we accumulate the runtime, while active */
> > +             igt_assert_eq(read_runtime(me, active), 1);
> > +             igt_info("active1[%d]: %'"PRIu64"ns\n", pass, active[e->class]);
> > +             igt_assert(active[e->class] > old[e->class]); /* monotonic */
> > +             igt_assert(active[e->class] > delay); /* within reason */
> 
> Sending greetings to GuC soon. Will need to emit a high prio pulse to 
> preempt the spinner, maybe, no, probably won't be enough.

Exactly. The GuC falls far short of what we need atm. A pulse from every
sysfs read() and wait for pulse completion before returning? What
happens for non-preemptible workloads?

> > +     delay = -500000; /* 500us slack */
> > +     memset(old, 0, sizeof(old));
> > +     for (int pass = 0; pass < 5; pass++) {
> > +             delay += measured_usleep(1000);
> > +             igt_debug("delay: %'"PRIu64"ns\n", delay);
> > +
> > +             /* Check that we accumulate the runtime, while active */
> > +             igt_assert_eq(read_runtime(me, active), expect);
> > +             for (int i = 0; i < ARRAY_SIZE(active); i++) {
> > +                     if (!active[i])
> > +                             continue;
> 
> Don't you want do skip based on the bitmap in classes here? Although the 
> assert on expect will catch failures to account some class already so 
> optional I guess.

Bitmap came afterwards, and indeed it should have replaced the !active[i].
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ GitLab.Pipeline: failure for i915: Exercise sysfs client properties
  2021-01-22 21:34 ` [igt-dev] " Chris Wilson
                   ` (5 preceding siblings ...)
  (?)
@ 2021-01-26 15:10 ` Patchwork
  -1 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2021-01-26 15:10 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: i915: Exercise sysfs client properties
URL   : https://patchwork.freedesktop.org/series/86198/
State : failure

== Summary ==

ERROR! This series introduces new undocumented tests:

sysfs_clients
sysfs_clients@busy
sysfs_clients@create
sysfs_clients@pidname

Can you document them as per the requirement in the [CONTRIBUTING.md]?

[Documentation] has more details on how to do this.

Here are few examples:
https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/0316695d03aa46108296b27f3982ec93200c7a6e
https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/443cc658e1e6b492ee17bf4f4d891029eb7a205d

Thanks in advance!

[CONTRIBUTING.md]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/blob/master/CONTRIBUTING.md#L19
[Documentation]: https://drm.pages.freedesktop.org/igt-gpu-tools/igt-gpu-tools-Core.html#igt-describe

Other than that, pipeline status: SUCCESS.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/260412 for the overview.

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/260412
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ GitLab.Pipeline: failure for i915: Exercise sysfs client properties (rev2)
  2021-01-22 21:34 ` [igt-dev] " Chris Wilson
                   ` (6 preceding siblings ...)
  (?)
@ 2021-01-26 15:10 ` Patchwork
  -1 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2021-01-26 15:10 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: i915: Exercise sysfs client properties (rev2)
URL   : https://patchwork.freedesktop.org/series/86198/
State : failure

== Summary ==

ERROR! This series introduces new undocumented tests:

sysfs_clients
sysfs_clients@busy
sysfs_clients@busy-all
sysfs_clients@create
sysfs_clients@pidname

Can you document them as per the requirement in the [CONTRIBUTING.md]?

[Documentation] has more details on how to do this.

Here are few examples:
https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/0316695d03aa46108296b27f3982ec93200c7a6e
https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/443cc658e1e6b492ee17bf4f4d891029eb7a205d

Thanks in advance!

[CONTRIBUTING.md]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/blob/master/CONTRIBUTING.md#L19
[Documentation]: https://drm.pages.freedesktop.org/igt-gpu-tools/igt-gpu-tools-Core.html#igt-describe

Other than that, pipeline status: SUCCESS.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/260442 for the overview.

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/260442
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2021-01-26 15:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 21:34 [Intel-gfx] [PATCH i-g-t] i915: Exercise sysfs client properties Chris Wilson
2021-01-22 21:34 ` [igt-dev] " Chris Wilson
2021-01-22 21:49 ` [Intel-gfx] " Chris Wilson
2021-01-25 10:20   ` [Intel-gfx] [igt-dev] " Tvrtko Ursulin
2021-01-25 10:29     ` Chris Wilson
2021-01-25 10:29       ` Chris Wilson
2021-01-22 22:06 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-01-22 22:36 ` [igt-dev] ✓ Fi.CI.BAT: success for i915: Exercise sysfs client properties (rev2) Patchwork
2021-01-23  6:21 ` [igt-dev] ✓ Fi.CI.IGT: success for i915: Exercise sysfs client properties Patchwork
2021-01-23  7:14 ` [igt-dev] ✗ Fi.CI.IGT: failure for i915: Exercise sysfs client properties (rev2) Patchwork
2021-01-26 15:10 ` [igt-dev] ✗ GitLab.Pipeline: failure for i915: Exercise sysfs client properties Patchwork
2021-01-26 15:10 ` [igt-dev] ✗ GitLab.Pipeline: failure for i915: Exercise sysfs client properties (rev2) Patchwork

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.