[PATCH i-g-t 17/20] tests/core_hotunplug: Add unbind-unplug-restore variant
Janusz Krzysztofik
janusz.krzysztofik at linux.intel.com
Fri Jul 24 10:44:00 UTC 2020
Check if this 3-step procedure exhibits any issues with device recovery
after unplug. Such issues may indicate insufficient device hardware
re-initialization performed by the device driver, or other kernel bugs
outside the driver code.
v2: rebase on upstream
v3: rebase on top of "Fixes and enhancements"
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
---
tests/core_hotunplug.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
index bc23e8c05..fdd67fe26 100644
--- a/tests/core_hotunplug.c
+++ b/tests/core_hotunplug.c
@@ -282,6 +282,17 @@ static void unbind_rebind(struct hotunplug *priv)
driver_bind(priv);
}
+static void unbind_unplug_restore(struct hotunplug *priv)
+{
+ priv->failure = "subtest failure";
+
+ driver_unbind(priv, "");
+
+ device_unplug(priv, "");
+
+ device_restore(priv);
+}
+
static void unplug_restore(struct hotunplug *priv)
{
priv->failure = "subtest failure";
@@ -380,6 +391,18 @@ igt_main
recover(&priv);
}
+ igt_fixture
+ post_healthcheck(&priv);
+
+ igt_subtest_group {
+ igt_describe("Check if a device with the driver unbound from it can be cleanly restored after being unplugged\n");
+ igt_subtest("unbind-unplug-restore")
+ unbind_unplug_restore(&priv);
+
+ igt_fixture
+ recover(&priv);
+ }
+
igt_fixture
post_healthcheck(&priv);
--
2.21.1
More information about the Intel-gfx-trybot
mailing list