summaryrefslogtreecommitdiff
path: root/tests/core_hotunplug.c
diff options
context:
space:
mode:
authorJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>2020-07-19 23:26:42 +0200
committerJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>2020-09-14 20:47:49 +0200
commit8a441b8c64d8cc5d36d6b1f6d54937c75b40c8b3 (patch)
tree2e7102977fc730d6b7e35d730683bf309eb0f3d4 /tests/core_hotunplug.c
parentece0974cb59ff3bec7e888ea4b41126db961c016 (diff)
tests/core_hotunplug: Fail subtests on device close errors
Since health checks are now run from follow-up fixture sections, it is safe to fail subtests without the need to abort the test execution. Do that on device close errors instead of just emitting warnings. v2: Rebase only. v3: Refresh. v4: Refresh. Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Reviewed-by: MichaƂ Winiarski <michal.winiarski@intel.com>
Diffstat (limited to 'tests/core_hotunplug.c')
-rw-r--r--tests/core_hotunplug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
index 7fc6df68..d31faf21 100644
--- a/tests/core_hotunplug.c
+++ b/tests/core_hotunplug.c
@@ -158,6 +158,7 @@ static void device_unplug(struct hotunplug *priv, const char *prefix)
igt_reset_timeout();
priv->fd.sysfs_dev = close_sysfs(priv->fd.sysfs_dev);
+ igt_assert_eq(priv->fd.sysfs_dev, -1);
}
/* Re-discover the device by rescanning its bus */
@@ -279,6 +280,7 @@ static void hotunbind_lateclose(struct hotunplug *priv)
driver_bind(priv);
priv->fd.drm = close_device(priv->fd.drm, "late ", "unbound ");
+ igt_assert_eq(priv->fd.drm, -1);
healthcheck(priv);
}
@@ -293,6 +295,7 @@ static void hotunplug_lateclose(struct hotunplug *priv)
bus_rescan(priv);
priv->fd.drm = close_device(priv->fd.drm, "late ", "removed ");
+ igt_assert_eq(priv->fd.drm, -1);
healthcheck(priv);
}