diff options
author | Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> | 2020-07-18 22:00:38 +0200 |
---|---|---|
committer | Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> | 2020-09-14 20:46:55 +0200 |
commit | 845b99ddadf809a3ff2563d8d7615f691bb6afee (patch) | |
tree | bfd161987bdb9c37bb2b6d6267a72a3239d8e9a0 /tests/core_hotunplug.c | |
parent | b98abf190a2c06d38b64a820a7c7c80d253ffc24 (diff) |
tests/core_hotunplug: Skip selectively on sysfs close errors
Since we no longer open a device DRM sysfs node, only a PCI one, driver
unbind operations are no longer affected by missed or unsuccessful
sysfs file close attempts. Skip only affected subtests if that
happens.
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.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index 7f5e800c..d5152602 100644 --- a/tests/core_hotunplug.c +++ b/tests/core_hotunplug.c @@ -111,7 +111,6 @@ static void prepare(struct hotunplug *priv) igt_assert_fd(priv->fd.sysfs_bus); priv->fd.sysfs_dev = close_sysfs(priv->fd.sysfs_dev); - igt_assert_eq(priv->fd.sysfs_dev, -1); } /* Unbind the driver from the device */ @@ -141,7 +140,8 @@ static void driver_bind(struct hotunplug *priv) /* Remove (virtually unplug) the device from its bus */ static void device_unplug(struct hotunplug *priv, const char *prefix) { - igt_assert_eq(priv->fd.sysfs_dev, -1); + igt_require(priv->fd.sysfs_dev == -1); + priv->fd.sysfs_dev = openat(priv->fd.sysfs_bus, priv->dev_bus_addr, O_DIRECTORY); igt_assert_fd(priv->fd.sysfs_dev); @@ -200,7 +200,6 @@ static void post_healthcheck(struct hotunplug *priv) igt_abort_on_f(priv->failure, "%s\n", priv->failure); igt_require(priv->fd.drm == -1); - igt_require(priv->fd.sysfs_dev == -1); } static void set_filter_from_device(int fd) |