All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v11 0/1] tests: Add a new test for device hot unplug
@ 2019-06-07 11:51 ` Janusz Krzysztofik
  0 siblings, 0 replies; 10+ messages in thread
From: Janusz Krzysztofik @ 2019-06-07 11:51 UTC (permalink / raw)
  To: igt-dev; +Cc: janusz.krzysztofik, intel-gfx

The test should help resolving driver bugs which exhibit themselves
when a device is unplugged / driver unbind from a device while the
device is busy (different from simple module unload which requires 
device references being put first).

A kernel patch resolving kernel panics on driver hot unbind [1] was
verified on trybot with v10 of this test before it has been submitted
upstream.  Current version (v11) has also been tested on trybot with
the kernel patch already included upstream.  Hence, no kernel panics
are expected, however some kernel WARNs and driver error messages may
still need to be resolved before CI is happy with this new test.

[1] https://cgit.freedesktop.org/drm/drm-tip/commit/?id=47bc28d7ee6d8378ba4451c43885cb3241302243

Janusz Krzysztofik (1):
  tests: Add a new test for device hot unplug

 tests/Makefile.sources |   1 +
 tests/core_hotunplug.c | 222 +++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   1 +
 3 files changed, 224 insertions(+)
 create mode 100644 tests/core_hotunplug.c

Changelog:
v10->v11:
- fix typos in some comments,
- use SPDX license identifier,
- include a per-patch changelog in the commit message (Daniel).

v9->v10 (submitted only to trybot):
- rename variables and function arguments to something that indicates
  they're file descriptors (Daniel),
- introduce a data structure that contains various file descriptors
  and a helper function to set them all (Daniel),
- fix strange indenting (Daniel),
- limit scope to first three subtests as the first set of tests to
  merge (Daniel).

v8->v9:
All changes after Daniel's comments - thanks!
- flatten the code, don't try to create a midlayer,
- provide mimimal subtests that even don't keep device open,
- don't use driver unbind in more advanced subtests,
- provide subtests with different level of resources allocated
  during device unplug,
- provide subtests which check driver behavior after device hot
  unplug.

v7->v8:
- move workload functions back from fixture to subtests,
- register different actions and different workloads in respective
  tables and iterate over those tables while enumerating subtests,
- introduce new subtest flavors by simply omiting module unload step,
- instead of simply requesting bus rescan or not, introduce action
  specific device recovery helpers, required specifically with those
  new subtests not touching the module,
- split workload functions in two parts, one spawning the workload,
  the other waiting for its completion,
- for the new subtests not requiring module unload, run workload
  functions directly from the test process and use new workload
  completion wait functions in place of subprocess completion wait,
- take more control over logging, longjumps and exit codes in
  workload subprocesses,
- add some debug messages for easy progress watching,
- move function API descriptions on top of respective typedefs,
- drop patch 2/2 with external workload command again, still nobody
  likes it.

v6->v7:
- add missing igt_exit() needed with the second patch.

v5->v6 (third public submission, incorrectly marked as v5, sorry):
- run workload inside an igt helper subprocess so resources consumed
  by the workload are cleaned up automatically on workload subprocess
  crash, without affecting test results,
- move the igt helper with workload back from subtests to initial
  fixture so workload crash also does not affect test results,
- re-add the second patch which extends the test with an option for
  using an external command as a workload,
- other cleanups suggested by Kasia and Chris.

v4->v5 (second public submission, marked as v2):
- try to restore the device to a working state after each subtest
  (Petri, Daniel).

v3->v4 (first public submission, not marked with any version number):
- run dummy_load from inside subtests (Antonio).

v2->v3 (internal submission):
- run dummy_load from the test process directly (Antonio),
- drop the patch for running external workload (Antonio).

v1->v2 (internal submission):
- run a subprocess with dummy_load instead of external command
  (Antonio),
- keep use of external workload command as an option, move that to a
  separate patch.

-- 
2.21.0

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

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

* [igt-dev] [PATCH i-g-t v11 0/1] tests: Add a new test for device hot unplug
@ 2019-06-07 11:51 ` Janusz Krzysztofik
  0 siblings, 0 replies; 10+ messages in thread
From: Janusz Krzysztofik @ 2019-06-07 11:51 UTC (permalink / raw)
  To: igt-dev; +Cc: janusz.krzysztofik, Petri Latvala, intel-gfx, Daniel Vetter

The test should help resolving driver bugs which exhibit themselves
when a device is unplugged / driver unbind from a device while the
device is busy (different from simple module unload which requires 
device references being put first).

A kernel patch resolving kernel panics on driver hot unbind [1] was
verified on trybot with v10 of this test before it has been submitted
upstream.  Current version (v11) has also been tested on trybot with
the kernel patch already included upstream.  Hence, no kernel panics
are expected, however some kernel WARNs and driver error messages may
still need to be resolved before CI is happy with this new test.

[1] https://cgit.freedesktop.org/drm/drm-tip/commit/?id=47bc28d7ee6d8378ba4451c43885cb3241302243

Janusz Krzysztofik (1):
  tests: Add a new test for device hot unplug

 tests/Makefile.sources |   1 +
 tests/core_hotunplug.c | 222 +++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   1 +
 3 files changed, 224 insertions(+)
 create mode 100644 tests/core_hotunplug.c

Changelog:
v10->v11:
- fix typos in some comments,
- use SPDX license identifier,
- include a per-patch changelog in the commit message (Daniel).

v9->v10 (submitted only to trybot):
- rename variables and function arguments to something that indicates
  they're file descriptors (Daniel),
- introduce a data structure that contains various file descriptors
  and a helper function to set them all (Daniel),
- fix strange indenting (Daniel),
- limit scope to first three subtests as the first set of tests to
  merge (Daniel).

v8->v9:
All changes after Daniel's comments - thanks!
- flatten the code, don't try to create a midlayer,
- provide mimimal subtests that even don't keep device open,
- don't use driver unbind in more advanced subtests,
- provide subtests with different level of resources allocated
  during device unplug,
- provide subtests which check driver behavior after device hot
  unplug.

v7->v8:
- move workload functions back from fixture to subtests,
- register different actions and different workloads in respective
  tables and iterate over those tables while enumerating subtests,
- introduce new subtest flavors by simply omiting module unload step,
- instead of simply requesting bus rescan or not, introduce action
  specific device recovery helpers, required specifically with those
  new subtests not touching the module,
- split workload functions in two parts, one spawning the workload,
  the other waiting for its completion,
- for the new subtests not requiring module unload, run workload
  functions directly from the test process and use new workload
  completion wait functions in place of subprocess completion wait,
- take more control over logging, longjumps and exit codes in
  workload subprocesses,
- add some debug messages for easy progress watching,
- move function API descriptions on top of respective typedefs,
- drop patch 2/2 with external workload command again, still nobody
  likes it.

v6->v7:
- add missing igt_exit() needed with the second patch.

v5->v6 (third public submission, incorrectly marked as v5, sorry):
- run workload inside an igt helper subprocess so resources consumed
  by the workload are cleaned up automatically on workload subprocess
  crash, without affecting test results,
- move the igt helper with workload back from subtests to initial
  fixture so workload crash also does not affect test results,
- re-add the second patch which extends the test with an option for
  using an external command as a workload,
- other cleanups suggested by Kasia and Chris.

v4->v5 (second public submission, marked as v2):
- try to restore the device to a working state after each subtest
  (Petri, Daniel).

v3->v4 (first public submission, not marked with any version number):
- run dummy_load from inside subtests (Antonio).

v2->v3 (internal submission):
- run dummy_load from the test process directly (Antonio),
- drop the patch for running external workload (Antonio).

v1->v2 (internal submission):
- run a subprocess with dummy_load instead of external command
  (Antonio),
- keep use of external workload command as an option, move that to a
  separate patch.

-- 
2.21.0

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

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

* [PATCH i-g-t v11 1/1] tests: Add a new test for device hot unplug
  2019-06-07 11:51 ` [igt-dev] " Janusz Krzysztofik
@ 2019-06-07 11:51   ` Janusz Krzysztofik
  -1 siblings, 0 replies; 10+ messages in thread
From: Janusz Krzysztofik @ 2019-06-07 11:51 UTC (permalink / raw)
  To: igt-dev; +Cc: janusz.krzysztofik, intel-gfx

From: Janusz Krzysztofik <janusz.krzysztofik@intel.com>

There is a test which verifies unloading of i915 driver module but no test
exists that checks how a driver behaves when it gets unbound from a device
or when the device gets unplugged.  Provide such test using sysfs
interface.

Two minimalistic subtests - "unbind-rebind" and "unplug-rescan" - perform
desired operations on a DRM device which is beleived to be not in use.

A subtest named "drm_open-hotunplug" unplugs a DRM device while keeping
a file descriptor open.

Changelog:
v2:
- run a subprocess with dummy_load instead of external command
  (Antonio).

v3:
- run dummy_load from the test process directly (Antonio).

v4:
- run dummy_load from inside subtests (Antonio).

v5:
- try to restore the device to a working state after each subtest
  (Petri, Daniel).

v6:
- run workload inside an igt helper subprocess so resources consumed
  by the workload are cleaned up automatically on workload subprocess
  crash, without affecting test results,
- move the igt helper with workload back from subtests to initial
  fixture so workload crash also does not affect test results,
- other cleanups suggested by Katarzyna and Chris.

v7:
- no changes.

v8:
- move workload functions back from fixture to subtests,
- register different actions and different workloads in respective
  tables and iterate over those tables while enumerating subtests,
- introduce new subtest flavors by simply omiting module unload step,
- instead of simply requesting bus rescan or not, introduce action
  specific device recovery helpers, required specifically with those
  new subtests not touching the module,
- split workload functions in two parts, one spawning the workload,
  the other waiting for its completion,
- for the new subtests not requiring module unload, run workload
  functions directly from the test process and use new workload
  completion wait functions in place of subprocess completion wait,
- take more control over logging, longjumps and exit codes in
  workload subprocesses,
- add some debug messages for easy progress watching,
- move function API descriptions on top of respective typedefs.

v9:
All changes after Daniel's comments - thanks!
- flatten the code, don't try to create a midlayer (Daniel),
- provide mimimal subtests that even don't keep device open (Daniel),
- don't use driver unbind in more advanced subtests (Daniel),
- provide subtests with different level of resources allocated
  during device unplug (Daniel),
- provide subtests which check driver behavior after device hot
  unplug (Daniel).

v10:
- rename variables and function arguments to something that indicates
  they're file descriptors (Daniel),
- introduce a data structure that contains various file descriptors
  and a helper function to set them all (Daniel),
- fix strange indenting (Daniel),
- limit scope to first three subtests as the first set of tests to
  merge (Daniel).

v11:
- fix typos in some comments,
- use SPDX license identifier,
- include a per-patch changelog in the commit message (Daniel).

Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@intel.com>
---
 tests/Makefile.sources |   1 +
 tests/core_hotunplug.c | 222 +++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   1 +
 3 files changed, 224 insertions(+)
 create mode 100644 tests/core_hotunplug.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 027ed82f..3f24265f 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -17,6 +17,7 @@ TESTS_progs = \
 	core_getclient \
 	core_getstats \
 	core_getversion \
+	core_hotunplug \
 	core_setmaster_vs_auth \
 	debugfs_test \
 	drm_import_export \
diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
new file mode 100644
index 00000000..d36a0572
--- /dev/null
+++ b/tests/core_hotunplug.c
@@ -0,0 +1,222 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#include "igt.h"
+#include "igt_device.h"
+#include "igt_dummyload.h"
+#include "igt_kmod.h"
+#include "igt_sysfs.h"
+
+#include <limits.h>
+#include <string.h>
+#include <unistd.h>
+
+struct hotunplug {
+	int chipset;
+	struct {
+		int drm;
+		int sysfs_dev;
+		int sysfs_bus;
+	} fd;
+};
+
+/* Helpers */
+
+static void prepare(struct hotunplug *priv)
+{
+	/* open the driver */
+	priv->fd.drm = __drm_open_driver(priv->chipset);
+	igt_assert(priv->fd.drm >= 0);
+
+	/* prepare for device unplug */
+	priv->fd.sysfs_dev = igt_sysfs_open(priv->fd.drm);
+	igt_assert(priv->fd.sysfs_dev >= 0);
+
+	/* prepare for bus rescan */
+	priv->fd.sysfs_bus = openat(priv->fd.sysfs_dev, "device/subsystem",
+				    O_DIRECTORY);
+	igt_assert(priv->fd.sysfs_bus >= 0);
+}
+
+/* Re-bind the driver to the device */
+static void driver_bind(int fd_sysfs_drv, const char *dev_bus_addr)
+{
+	igt_set_timeout(60, "Driver re-bind timeout!");
+	igt_sysfs_set(fd_sysfs_drv, "bind", dev_bus_addr);
+	igt_reset_timeout();
+
+	close(fd_sysfs_drv);
+}
+
+/* Unbind the driver from the device */
+static void driver_unbind(int fd_sysfs_drv, const char *dev_bus_addr)
+{
+	igt_set_timeout(60, "Driver unbind timeout!");
+	igt_sysfs_set(fd_sysfs_drv, "unbind", dev_bus_addr);
+	igt_reset_timeout();
+
+	/* don't close fd_sysfs_drv, it will be used for driver rebinding */
+}
+
+/* Re-discover the device by rescanning its bus */
+static void bus_rescan(int fd_sysfs_bus)
+{
+	igt_set_timeout(60, "Bus rescan timeout!");
+	igt_sysfs_set(fd_sysfs_bus, "rescan", "1");
+	igt_reset_timeout();
+
+	close(fd_sysfs_bus);
+}
+
+/* Remove (virtually unplug) the device from its bus */
+static void device_unplug(int fd_sysfs_dev)
+{
+	igt_set_timeout(60, "Device unplug timeout!");
+	igt_sysfs_set(fd_sysfs_dev, "device/remove", "1");
+	igt_reset_timeout();
+
+	close(fd_sysfs_dev);
+}
+
+/* Subtests */
+
+static void unbind_rebind(int chipset)
+{
+	struct hotunplug priv;
+	int fd_sysfs_drv, len;
+	char path[PATH_MAX];
+	const char *dev_bus_addr;
+
+	priv.chipset = chipset;
+	prepare(&priv);
+
+	/* sysfs_bus not needed for unbind/rebind */
+	close(priv.fd.sysfs_bus);
+
+	/* prepare for driver bind/unbind */
+	fd_sysfs_drv = openat(priv.fd.sysfs_dev, "device/driver", O_DIRECTORY);
+	igt_assert(fd_sysfs_drv >= 0);
+
+	len = readlinkat(priv.fd.sysfs_dev, "device", path, sizeof(path) - 1);
+	path[len] = '\0';
+	dev_bus_addr = strrchr(path, '/') + 1;
+
+	/* sysfs_dev no longer needed for unbind/rebind */
+	close(priv.fd.sysfs_dev);
+
+	igt_debug("closing device\n");
+	close(priv.fd.drm);
+
+	igt_debug("unbinding driver\n");
+	driver_unbind(fd_sysfs_drv, dev_bus_addr);
+
+	igt_debug("rebinding driver\n");
+	driver_bind(fd_sysfs_drv, dev_bus_addr);
+
+	igt_debug("reopening device\n");
+	priv.fd.drm = __drm_open_driver(chipset);
+	igt_assert(priv.fd.drm >= 0);
+
+	close(priv.fd.drm);
+}
+
+static void unplug_rescan(int chipset)
+{
+	struct hotunplug priv;
+
+	priv.chipset = chipset;
+	prepare(&priv);
+
+	igt_debug("closing device\n");
+	close(priv.fd.drm);
+
+	igt_debug("unplugging device\n");
+	device_unplug(priv.fd.sysfs_dev);
+
+	igt_debug("recovering device\n");
+	bus_rescan(priv.fd.sysfs_bus);
+
+	igt_debug("reopening driver\n");
+	priv.fd.drm = __drm_open_driver(chipset);
+	igt_assert(priv.fd.drm >= 0);
+
+	close(priv.fd.drm);
+}
+
+static void drm_open_hotunplug(int chipset)
+{
+	struct hotunplug priv;
+
+	priv.chipset = chipset;
+	prepare(&priv);
+
+	igt_debug("unplugging device\n");
+	device_unplug(priv.fd.sysfs_dev);
+
+	igt_debug("recovering device\n");
+	bus_rescan(priv.fd.sysfs_bus);
+
+	igt_debug("closing device\n");
+	close(priv.fd.drm);
+
+	igt_debug("reopening driver\n");
+	priv.fd.drm = __drm_open_driver(chipset);
+	igt_assert(priv.fd.drm >= 0);
+
+	close(priv.fd.drm);
+}
+
+/* Main */
+
+igt_main {
+	int chipset;
+	char *module;
+
+	igt_fixture {
+		char path[PATH_MAX];
+		int fd_drm, fd_sysfs_dev, len;
+
+		/**
+		 * Since some subtests depend on successful unload of a driver
+		 * module, don't use drm_open_driver() as it keeps a device file
+		 * descriptor open for exit handler use and that effectively
+		 * prevents the module from being unloaded.
+		 */
+		fd_drm = __drm_open_driver(DRIVER_ANY);
+		igt_assert(fd_drm >= 0);
+
+		if (is_i915_device(fd_drm)) {
+			chipset = DRIVER_INTEL;
+			module = strdup("i915");
+		} else {
+			chipset = DRIVER_ANY;
+
+			/* Capture module name to be unloaded */
+			fd_sysfs_dev = igt_sysfs_open(fd_drm);
+			len = readlinkat(fd_sysfs_dev, "device/driver/module",
+					 path, sizeof(path) - 1);
+			close(fd_sysfs_dev);
+			path[len] = '\0';
+			module = strdup(strrchr(path, '/') + 1);
+		}
+		close(fd_drm);
+
+		igt_info("Running the test on driver \"%s\", chipset mask %#0x\n",
+			 module, chipset);
+	}
+
+	igt_subtest("unbind-rebind")
+		unbind_rebind(chipset);
+
+	igt_subtest("unplug-rescan")
+		unplug_rescan(chipset);
+
+	igt_subtest("drm_open-hotunplug")
+		drm_open_hotunplug(chipset);
+
+	igt_fixture {
+		free(module);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index f168fbba..0c022521 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -3,6 +3,7 @@ test_progs = [
 	'core_getclient',
 	'core_getstats',
 	'core_getversion',
+	'core_hotunplug',
 	'core_setmaster_vs_auth',
 	'debugfs_test',
 	'drm_import_export',
-- 
2.21.0

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

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

* [igt-dev] [PATCH i-g-t v11 1/1] tests: Add a new test for device hot unplug
@ 2019-06-07 11:51   ` Janusz Krzysztofik
  0 siblings, 0 replies; 10+ messages in thread
From: Janusz Krzysztofik @ 2019-06-07 11:51 UTC (permalink / raw)
  To: igt-dev; +Cc: janusz.krzysztofik, Petri Latvala, intel-gfx, Daniel Vetter

From: Janusz Krzysztofik <janusz.krzysztofik@intel.com>

There is a test which verifies unloading of i915 driver module but no test
exists that checks how a driver behaves when it gets unbound from a device
or when the device gets unplugged.  Provide such test using sysfs
interface.

Two minimalistic subtests - "unbind-rebind" and "unplug-rescan" - perform
desired operations on a DRM device which is beleived to be not in use.

A subtest named "drm_open-hotunplug" unplugs a DRM device while keeping
a file descriptor open.

Changelog:
v2:
- run a subprocess with dummy_load instead of external command
  (Antonio).

v3:
- run dummy_load from the test process directly (Antonio).

v4:
- run dummy_load from inside subtests (Antonio).

v5:
- try to restore the device to a working state after each subtest
  (Petri, Daniel).

v6:
- run workload inside an igt helper subprocess so resources consumed
  by the workload are cleaned up automatically on workload subprocess
  crash, without affecting test results,
- move the igt helper with workload back from subtests to initial
  fixture so workload crash also does not affect test results,
- other cleanups suggested by Katarzyna and Chris.

v7:
- no changes.

v8:
- move workload functions back from fixture to subtests,
- register different actions and different workloads in respective
  tables and iterate over those tables while enumerating subtests,
- introduce new subtest flavors by simply omiting module unload step,
- instead of simply requesting bus rescan or not, introduce action
  specific device recovery helpers, required specifically with those
  new subtests not touching the module,
- split workload functions in two parts, one spawning the workload,
  the other waiting for its completion,
- for the new subtests not requiring module unload, run workload
  functions directly from the test process and use new workload
  completion wait functions in place of subprocess completion wait,
- take more control over logging, longjumps and exit codes in
  workload subprocesses,
- add some debug messages for easy progress watching,
- move function API descriptions on top of respective typedefs.

v9:
All changes after Daniel's comments - thanks!
- flatten the code, don't try to create a midlayer (Daniel),
- provide mimimal subtests that even don't keep device open (Daniel),
- don't use driver unbind in more advanced subtests (Daniel),
- provide subtests with different level of resources allocated
  during device unplug (Daniel),
- provide subtests which check driver behavior after device hot
  unplug (Daniel).

v10:
- rename variables and function arguments to something that indicates
  they're file descriptors (Daniel),
- introduce a data structure that contains various file descriptors
  and a helper function to set them all (Daniel),
- fix strange indenting (Daniel),
- limit scope to first three subtests as the first set of tests to
  merge (Daniel).

v11:
- fix typos in some comments,
- use SPDX license identifier,
- include a per-patch changelog in the commit message (Daniel).

Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@intel.com>
---
 tests/Makefile.sources |   1 +
 tests/core_hotunplug.c | 222 +++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   1 +
 3 files changed, 224 insertions(+)
 create mode 100644 tests/core_hotunplug.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 027ed82f..3f24265f 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -17,6 +17,7 @@ TESTS_progs = \
 	core_getclient \
 	core_getstats \
 	core_getversion \
+	core_hotunplug \
 	core_setmaster_vs_auth \
 	debugfs_test \
 	drm_import_export \
diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
new file mode 100644
index 00000000..d36a0572
--- /dev/null
+++ b/tests/core_hotunplug.c
@@ -0,0 +1,222 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#include "igt.h"
+#include "igt_device.h"
+#include "igt_dummyload.h"
+#include "igt_kmod.h"
+#include "igt_sysfs.h"
+
+#include <limits.h>
+#include <string.h>
+#include <unistd.h>
+
+struct hotunplug {
+	int chipset;
+	struct {
+		int drm;
+		int sysfs_dev;
+		int sysfs_bus;
+	} fd;
+};
+
+/* Helpers */
+
+static void prepare(struct hotunplug *priv)
+{
+	/* open the driver */
+	priv->fd.drm = __drm_open_driver(priv->chipset);
+	igt_assert(priv->fd.drm >= 0);
+
+	/* prepare for device unplug */
+	priv->fd.sysfs_dev = igt_sysfs_open(priv->fd.drm);
+	igt_assert(priv->fd.sysfs_dev >= 0);
+
+	/* prepare for bus rescan */
+	priv->fd.sysfs_bus = openat(priv->fd.sysfs_dev, "device/subsystem",
+				    O_DIRECTORY);
+	igt_assert(priv->fd.sysfs_bus >= 0);
+}
+
+/* Re-bind the driver to the device */
+static void driver_bind(int fd_sysfs_drv, const char *dev_bus_addr)
+{
+	igt_set_timeout(60, "Driver re-bind timeout!");
+	igt_sysfs_set(fd_sysfs_drv, "bind", dev_bus_addr);
+	igt_reset_timeout();
+
+	close(fd_sysfs_drv);
+}
+
+/* Unbind the driver from the device */
+static void driver_unbind(int fd_sysfs_drv, const char *dev_bus_addr)
+{
+	igt_set_timeout(60, "Driver unbind timeout!");
+	igt_sysfs_set(fd_sysfs_drv, "unbind", dev_bus_addr);
+	igt_reset_timeout();
+
+	/* don't close fd_sysfs_drv, it will be used for driver rebinding */
+}
+
+/* Re-discover the device by rescanning its bus */
+static void bus_rescan(int fd_sysfs_bus)
+{
+	igt_set_timeout(60, "Bus rescan timeout!");
+	igt_sysfs_set(fd_sysfs_bus, "rescan", "1");
+	igt_reset_timeout();
+
+	close(fd_sysfs_bus);
+}
+
+/* Remove (virtually unplug) the device from its bus */
+static void device_unplug(int fd_sysfs_dev)
+{
+	igt_set_timeout(60, "Device unplug timeout!");
+	igt_sysfs_set(fd_sysfs_dev, "device/remove", "1");
+	igt_reset_timeout();
+
+	close(fd_sysfs_dev);
+}
+
+/* Subtests */
+
+static void unbind_rebind(int chipset)
+{
+	struct hotunplug priv;
+	int fd_sysfs_drv, len;
+	char path[PATH_MAX];
+	const char *dev_bus_addr;
+
+	priv.chipset = chipset;
+	prepare(&priv);
+
+	/* sysfs_bus not needed for unbind/rebind */
+	close(priv.fd.sysfs_bus);
+
+	/* prepare for driver bind/unbind */
+	fd_sysfs_drv = openat(priv.fd.sysfs_dev, "device/driver", O_DIRECTORY);
+	igt_assert(fd_sysfs_drv >= 0);
+
+	len = readlinkat(priv.fd.sysfs_dev, "device", path, sizeof(path) - 1);
+	path[len] = '\0';
+	dev_bus_addr = strrchr(path, '/') + 1;
+
+	/* sysfs_dev no longer needed for unbind/rebind */
+	close(priv.fd.sysfs_dev);
+
+	igt_debug("closing device\n");
+	close(priv.fd.drm);
+
+	igt_debug("unbinding driver\n");
+	driver_unbind(fd_sysfs_drv, dev_bus_addr);
+
+	igt_debug("rebinding driver\n");
+	driver_bind(fd_sysfs_drv, dev_bus_addr);
+
+	igt_debug("reopening device\n");
+	priv.fd.drm = __drm_open_driver(chipset);
+	igt_assert(priv.fd.drm >= 0);
+
+	close(priv.fd.drm);
+}
+
+static void unplug_rescan(int chipset)
+{
+	struct hotunplug priv;
+
+	priv.chipset = chipset;
+	prepare(&priv);
+
+	igt_debug("closing device\n");
+	close(priv.fd.drm);
+
+	igt_debug("unplugging device\n");
+	device_unplug(priv.fd.sysfs_dev);
+
+	igt_debug("recovering device\n");
+	bus_rescan(priv.fd.sysfs_bus);
+
+	igt_debug("reopening driver\n");
+	priv.fd.drm = __drm_open_driver(chipset);
+	igt_assert(priv.fd.drm >= 0);
+
+	close(priv.fd.drm);
+}
+
+static void drm_open_hotunplug(int chipset)
+{
+	struct hotunplug priv;
+
+	priv.chipset = chipset;
+	prepare(&priv);
+
+	igt_debug("unplugging device\n");
+	device_unplug(priv.fd.sysfs_dev);
+
+	igt_debug("recovering device\n");
+	bus_rescan(priv.fd.sysfs_bus);
+
+	igt_debug("closing device\n");
+	close(priv.fd.drm);
+
+	igt_debug("reopening driver\n");
+	priv.fd.drm = __drm_open_driver(chipset);
+	igt_assert(priv.fd.drm >= 0);
+
+	close(priv.fd.drm);
+}
+
+/* Main */
+
+igt_main {
+	int chipset;
+	char *module;
+
+	igt_fixture {
+		char path[PATH_MAX];
+		int fd_drm, fd_sysfs_dev, len;
+
+		/**
+		 * Since some subtests depend on successful unload of a driver
+		 * module, don't use drm_open_driver() as it keeps a device file
+		 * descriptor open for exit handler use and that effectively
+		 * prevents the module from being unloaded.
+		 */
+		fd_drm = __drm_open_driver(DRIVER_ANY);
+		igt_assert(fd_drm >= 0);
+
+		if (is_i915_device(fd_drm)) {
+			chipset = DRIVER_INTEL;
+			module = strdup("i915");
+		} else {
+			chipset = DRIVER_ANY;
+
+			/* Capture module name to be unloaded */
+			fd_sysfs_dev = igt_sysfs_open(fd_drm);
+			len = readlinkat(fd_sysfs_dev, "device/driver/module",
+					 path, sizeof(path) - 1);
+			close(fd_sysfs_dev);
+			path[len] = '\0';
+			module = strdup(strrchr(path, '/') + 1);
+		}
+		close(fd_drm);
+
+		igt_info("Running the test on driver \"%s\", chipset mask %#0x\n",
+			 module, chipset);
+	}
+
+	igt_subtest("unbind-rebind")
+		unbind_rebind(chipset);
+
+	igt_subtest("unplug-rescan")
+		unplug_rescan(chipset);
+
+	igt_subtest("drm_open-hotunplug")
+		drm_open_hotunplug(chipset);
+
+	igt_fixture {
+		free(module);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index f168fbba..0c022521 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -3,6 +3,7 @@ test_progs = [
 	'core_getclient',
 	'core_getstats',
 	'core_getversion',
+	'core_hotunplug',
 	'core_setmaster_vs_auth',
 	'debugfs_test',
 	'drm_import_export',
-- 
2.21.0

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for tests: Add a new test for device hot unplug (rev2)
  2019-06-07 11:51 ` [igt-dev] " Janusz Krzysztofik
  (?)
  (?)
@ 2019-06-07 12:42 ` Patchwork
  -1 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2019-06-07 12:42 UTC (permalink / raw)
  To: Janusz Krzysztofik; +Cc: igt-dev

== Series Details ==

Series: tests: Add a new test for device hot unplug (rev2)
URL   : https://patchwork.freedesktop.org/series/60454/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6217 -> IGTPW_3132
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/60454/revisions/2/mbox/

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_basic@create-fd-close:
    - fi-icl-u3:          [PASS][1] -> [DMESG-WARN][2] ([fdo#107724])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/fi-icl-u3/igt@gem_basic@create-fd-close.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/fi-icl-u3/igt@gem_basic@create-fd-close.html

  * igt@gem_ctx_exec@basic:
    - fi-icl-dsi:         [PASS][3] -> [INCOMPLETE][4] ([fdo#107713])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/fi-icl-dsi/igt@gem_ctx_exec@basic.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/fi-icl-dsi/igt@gem_ctx_exec@basic.html

  * igt@gem_sync@basic-many-each:
    - fi-snb-2600:        [PASS][5] -> [INCOMPLETE][6] ([fdo#105411])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/fi-snb-2600/igt@gem_sync@basic-many-each.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/fi-snb-2600/igt@gem_sync@basic-many-each.html

  * igt@kms_flip@basic-flip-vs-modeset:
    - fi-hsw-4770r:       [PASS][7] -> [DMESG-WARN][8] ([fdo#105602])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/fi-hsw-4770r/igt@kms_flip@basic-flip-vs-modeset.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/fi-hsw-4770r/igt@kms_flip@basic-flip-vs-modeset.html

  
#### Possible fixes ####

  * igt@gem_mmap_gtt@basic-short:
    - fi-icl-u3:          [DMESG-WARN][9] ([fdo#107724]) -> [PASS][10] +1 similar issue
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/fi-icl-u3/igt@gem_mmap_gtt@basic-short.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/fi-icl-u3/igt@gem_mmap_gtt@basic-short.html

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

  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724


Participating hosts (53 -> 48)
------------------------------

  Additional (1): fi-icl-guc 
  Missing    (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-bdw-samus 


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

  * IGT: IGT_5048 -> IGTPW_3132

  CI_DRM_6217: e670578ee842be1eff42d0f07023fdd697eec101 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3132: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/
  IGT_5048: 1a34b94f1ce07ac5978fe7893a17e8732d467868 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@core_hotunplug@drm_open-hotunplug
+igt@core_hotunplug@unbind-rebind
+igt@core_hotunplug@unplug-rescan

== Logs ==

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

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

* [igt-dev] ✗ Fi.CI.IGT: failure for tests: Add a new test for device hot unplug (rev2)
  2019-06-07 11:51 ` [igt-dev] " Janusz Krzysztofik
                   ` (2 preceding siblings ...)
  (?)
@ 2019-06-10  1:36 ` Patchwork
  -1 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2019-06-10  1:36 UTC (permalink / raw)
  To: Janusz Krzysztofik; +Cc: igt-dev

== Series Details ==

Series: tests: Add a new test for device hot unplug (rev2)
URL   : https://patchwork.freedesktop.org/series/60454/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6217_full -> IGTPW_3132_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_3132_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_3132_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/60454/revisions/2/mbox/

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@core_hotunplug@drm_open-hotunplug} (NEW):
    - shard-apl:          NOTRUN -> [DMESG-WARN][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-apl6/igt@core_hotunplug@drm_open-hotunplug.html
    - shard-snb:          NOTRUN -> [DMESG-WARN][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-snb4/igt@core_hotunplug@drm_open-hotunplug.html

  * igt@gem_ctx_engines@execute-one:
    - shard-glk:          [PASS][3] -> [DMESG-WARN][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/shard-glk2/igt@gem_ctx_engines@execute-one.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-glk4/igt@gem_ctx_engines@execute-one.html

  * igt@runner@aborted:
    - shard-snb:          NOTRUN -> [FAIL][5]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-snb4/igt@runner@aborted.html
    - shard-kbl:          NOTRUN -> [FAIL][6]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-kbl3/igt@runner@aborted.html
    - shard-apl:          NOTRUN -> [FAIL][7]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-apl6/igt@runner@aborted.html

  
New tests
---------

  New tests have been introduced between CI_DRM_6217_full and IGTPW_3132_full:

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

  * igt@core_hotunplug@drm_open-hotunplug:
    - Statuses : 4 dmesg-warn(s) 1 incomplete(s)
    - Exec time: [0.0, 6.64] s

  * igt@core_hotunplug@unbind-rebind:
    - Statuses : 4 pass(s)
    - Exec time: [0.69, 1.84] s

  * igt@core_hotunplug@unplug-rescan:
    - Statuses : 1 incomplete(s) 4 pass(s)
    - Exec time: [0.0, 3.72] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_persistent_relocs@forked-faulting-reloc-thrash-inactive:
    - shard-snb:          [PASS][8] -> [INCOMPLETE][9] ([fdo#105411])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/shard-snb2/igt@gem_persistent_relocs@forked-faulting-reloc-thrash-inactive.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-snb7/igt@gem_persistent_relocs@forked-faulting-reloc-thrash-inactive.html

  * igt@gem_tiled_swapping@non-threaded:
    - shard-iclb:         [PASS][10] -> [FAIL][11] ([fdo#108686])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/shard-iclb8/igt@gem_tiled_swapping@non-threaded.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-iclb8/igt@gem_tiled_swapping@non-threaded.html

  * igt@i915_suspend@debugfs-reader:
    - shard-apl:          [PASS][12] -> [DMESG-WARN][13] ([fdo#108566]) +3 similar issues
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/shard-apl3/igt@i915_suspend@debugfs-reader.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-apl2/igt@i915_suspend@debugfs-reader.html

  * igt@kms_flip@2x-flip-vs-expired-vblank:
    - shard-glk:          [PASS][14] -> [FAIL][15] ([fdo#105363])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/shard-glk9/igt@kms_flip@2x-flip-vs-expired-vblank.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-glk9/igt@kms_flip@2x-flip-vs-expired-vblank.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render:
    - shard-iclb:         [PASS][16] -> [FAIL][17] ([fdo#103167])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/shard-iclb3/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-iclb1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render.html

  * igt@kms_vblank@pipe-a-ts-continuation-suspend:
    - shard-kbl:          [PASS][18] -> [DMESG-WARN][19] ([fdo#108566]) +1 similar issue
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/shard-kbl2/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-kbl6/igt@kms_vblank@pipe-a-ts-continuation-suspend.html

  
#### Possible fixes ####

  * igt@gem_mmap_gtt@forked-medium-copy-odd:
    - shard-iclb:         [INCOMPLETE][20] ([fdo#107713]) -> [PASS][21]
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/shard-iclb5/igt@gem_mmap_gtt@forked-medium-copy-odd.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-iclb1/igt@gem_mmap_gtt@forked-medium-copy-odd.html

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - shard-apl:          [DMESG-WARN][22] ([fdo#108566]) -> [PASS][23] +4 similar issues
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/shard-apl7/igt@i915_suspend@fence-restore-tiled2untiled.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-apl7/igt@i915_suspend@fence-restore-tiled2untiled.html

  * igt@kms_cursor_crc@pipe-b-cursor-alpha-opaque:
    - shard-apl:          [FAIL][24] ([fdo#103232]) -> [PASS][25]
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/shard-apl3/igt@kms_cursor_crc@pipe-b-cursor-alpha-opaque.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-apl5/igt@kms_cursor_crc@pipe-b-cursor-alpha-opaque.html
    - shard-kbl:          [FAIL][26] ([fdo#103232]) -> [PASS][27]
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/shard-kbl2/igt@kms_cursor_crc@pipe-b-cursor-alpha-opaque.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-kbl1/igt@kms_cursor_crc@pipe-b-cursor-alpha-opaque.html

  * igt@kms_flip@modeset-vs-vblank-race-interruptible:
    - shard-glk:          [FAIL][28] ([fdo#103060]) -> [PASS][29]
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/shard-glk2/igt@kms_flip@modeset-vs-vblank-race-interruptible.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-glk1/igt@kms_flip@modeset-vs-vblank-race-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-badstride:
    - shard-iclb:         [FAIL][30] ([fdo#103167]) -> [PASS][31] +3 similar issues
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-badstride.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-iclb5/igt@kms_frontbuffer_tracking@fbc-badstride.html

  * igt@kms_setmode@basic:
    - shard-kbl:          [FAIL][32] ([fdo#99912]) -> [PASS][33]
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/shard-kbl3/igt@kms_setmode@basic.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-kbl4/igt@kms_setmode@basic.html

  
#### Warnings ####

  * igt@gem_mmap_gtt@forked-big-copy-xy:
    - shard-iclb:         [TIMEOUT][34] ([fdo#109673]) -> [INCOMPLETE][35] ([fdo#107713] / [fdo#109100])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6217/shard-iclb6/igt@gem_mmap_gtt@forked-big-copy-xy.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/shard-iclb7/igt@gem_mmap_gtt@forked-big-copy-xy.html

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

  [fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
  [fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (9 -> 5)
------------------------------

  Missing    (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005 


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

  * IGT: IGT_5048 -> IGTPW_3132
  * Piglit: piglit_4509 -> None

  CI_DRM_6217: e670578ee842be1eff42d0f07023fdd697eec101 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3132: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3132/
  IGT_5048: 1a34b94f1ce07ac5978fe7893a17e8732d467868 @ 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_3132/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [PATCH i-g-t v11 1/1] tests: Add a new test for device hot unplug
  2019-06-07 11:51   ` [igt-dev] " Janusz Krzysztofik
@ 2019-06-10  6:49     ` Petri Latvala
  -1 siblings, 0 replies; 10+ messages in thread
From: Petri Latvala @ 2019-06-10  6:49 UTC (permalink / raw)
  To: Janusz Krzysztofik; +Cc: janusz.krzysztofik, intel-gfx, igt-dev

On Fri, Jun 07, 2019 at 01:51:42PM +0200, Janusz Krzysztofik wrote:
> - use SPDX license identifier,


Why? We don't use those in IGT.


> diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
> new file mode 100644
> index 00000000..d36a0572
> --- /dev/null
> +++ b/tests/core_hotunplug.c
> @@ -0,0 +1,222 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright © 2019 Intel Corporation
> + */

And why GPL-2.0?


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

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

* Re: [igt-dev] [PATCH i-g-t v11 1/1] tests: Add a new test for device hot unplug
@ 2019-06-10  6:49     ` Petri Latvala
  0 siblings, 0 replies; 10+ messages in thread
From: Petri Latvala @ 2019-06-10  6:49 UTC (permalink / raw)
  To: Janusz Krzysztofik; +Cc: janusz.krzysztofik, intel-gfx, igt-dev, Daniel Vetter

On Fri, Jun 07, 2019 at 01:51:42PM +0200, Janusz Krzysztofik wrote:
> - use SPDX license identifier,


Why? We don't use those in IGT.


> diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
> new file mode 100644
> index 00000000..d36a0572
> --- /dev/null
> +++ b/tests/core_hotunplug.c
> @@ -0,0 +1,222 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright © 2019 Intel Corporation
> + */

And why GPL-2.0?


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

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

* Re: [PATCH i-g-t v11 1/1] tests: Add a new test for device hot unplug
  2019-06-10  6:49     ` [igt-dev] " Petri Latvala
@ 2019-06-10  7:34       ` Janusz Krzysztofik
  -1 siblings, 0 replies; 10+ messages in thread
From: Janusz Krzysztofik @ 2019-06-10  7:34 UTC (permalink / raw)
  To: Petri Latvala; +Cc: intel-gfx, igt-dev

On Monday, June 10, 2019 8:49:38 AM CEST Petri Latvala wrote:
> On Fri, Jun 07, 2019 at 01:51:42PM +0200, Janusz Krzysztofik wrote:
> > - use SPDX license identifier,
> 
> 
> Why? We don't use those in IGT.

I must have had got an idea to change it from somewhere, unfortunately I'm not 
able to recall from where, sorry.  I'll revert it.

> > diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
> > new file mode 100644
> > index 00000000..d36a0572
> > --- /dev/null
> > +++ b/tests/core_hotunplug.c
> > @@ -0,0 +1,222 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright © 2019 Intel Corporation
> > + */
> 
> And why GPL-2.0?

From the same source as the idea of SPDX, I guess. I'll fix it to be in line 
with IGT standards.

Thanks,
Janusz



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

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

* Re: [igt-dev] [PATCH i-g-t v11 1/1] tests: Add a new test for device hot unplug
@ 2019-06-10  7:34       ` Janusz Krzysztofik
  0 siblings, 0 replies; 10+ messages in thread
From: Janusz Krzysztofik @ 2019-06-10  7:34 UTC (permalink / raw)
  To: Petri Latvala; +Cc: intel-gfx, igt-dev, Daniel Vetter

On Monday, June 10, 2019 8:49:38 AM CEST Petri Latvala wrote:
> On Fri, Jun 07, 2019 at 01:51:42PM +0200, Janusz Krzysztofik wrote:
> > - use SPDX license identifier,
> 
> 
> Why? We don't use those in IGT.

I must have had got an idea to change it from somewhere, unfortunately I'm not 
able to recall from where, sorry.  I'll revert it.

> > diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
> > new file mode 100644
> > index 00000000..d36a0572
> > --- /dev/null
> > +++ b/tests/core_hotunplug.c
> > @@ -0,0 +1,222 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright © 2019 Intel Corporation
> > + */
> 
> And why GPL-2.0?

From the same source as the idea of SPDX, I guess. I'll fix it to be in line 
with IGT standards.

Thanks,
Janusz



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

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

end of thread, other threads:[~2019-06-10  7:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-07 11:51 [PATCH i-g-t v11 0/1] tests: Add a new test for device hot unplug Janusz Krzysztofik
2019-06-07 11:51 ` [igt-dev] " Janusz Krzysztofik
2019-06-07 11:51 ` [PATCH i-g-t v11 1/1] " Janusz Krzysztofik
2019-06-07 11:51   ` [igt-dev] " Janusz Krzysztofik
2019-06-10  6:49   ` Petri Latvala
2019-06-10  6:49     ` [igt-dev] " Petri Latvala
2019-06-10  7:34     ` Janusz Krzysztofik
2019-06-10  7:34       ` [igt-dev] " Janusz Krzysztofik
2019-06-07 12:42 ` [igt-dev] ✓ Fi.CI.BAT: success for tests: Add a new test for device hot unplug (rev2) Patchwork
2019-06-10  1:36 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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.