[PATCH i-g-t v3 12/19] tests/core_hotunplug: Fail subtests on device close errors
Janusz Krzysztofik
janusz.krzysztofik at linux.intel.com
Mon Aug 17 15:14:58 UTC 2020
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.
v3: Refresh.
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski at intel.com>
---
tests/core_hotunplug.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
index d6d5b3121..1999eefae 100644
--- a/tests/core_hotunplug.c
+++ b/tests/core_hotunplug.c
@@ -159,8 +159,8 @@ static void device_unplug(struct hotunplug *priv, const char *prefix)
igt_reset_timeout();
priv->fd.sysfs_dev = local_close(priv->fd.sysfs_dev);
- igt_warn_on_f(priv->fd.sysfs_dev != -1,
- "Device sysfs node close failed\n");
+ igt_assert_f(priv->fd.sysfs_dev == -1,
+ "Device sysfs node close failed\n");
}
/* Re-discover the device by rescanning its bus */
@@ -268,7 +268,7 @@ static void hotunbind_lateclose(struct hotunplug *priv)
driver_bind(priv);
igt_debug("late closing the unbound device instance\n");
- igt_ignore_warn(local_close_driver(priv->fd.drm, priv));
+ igt_assert_eq(local_close_driver(priv->fd.drm, priv), -1);
}
static void hotunplug_lateclose(struct hotunplug *priv)
@@ -280,7 +280,7 @@ static void hotunplug_lateclose(struct hotunplug *priv)
bus_rescan(priv);
igt_debug("late closing the removed device instance\n");
- igt_ignore_warn(local_close_driver(priv->fd.drm, priv));
+ igt_assert_eq(local_close_driver(priv->fd.drm, priv), -1);
}
/* Main */
--
2.21.1
More information about the Intel-gfx-trybot
mailing list