[igt-dev] [V3 i-g-t 06/23] tests/i915: Close the fd before exit
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Thu Jun 22 06:54:05 UTC 2023
Close the file descriptor before exiting the test.
V2: - Drop tests those are initializing the fd with igt_fd_t
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
tests/dmabuf_sync_file.c | 3 +++
tests/i915/gem_barrier_race.c | 3 +++
tests/i915/gem_concurrent_all.c | 5 +++++
tests/i915/gem_ctx_exec.c | 3 +++
tests/i915/gem_ctx_freq.c | 3 +++
tests/i915/gem_eio.c | 3 +++
tests/i915/i915_pm_rps.c | 3 +++
7 files changed, 23 insertions(+)
diff --git a/tests/dmabuf_sync_file.c b/tests/dmabuf_sync_file.c
index 25bb6ad75..cfa73117b 100644
--- a/tests/dmabuf_sync_file.c
+++ b/tests/dmabuf_sync_file.c
@@ -380,4 +380,7 @@ igt_main
"operations.");
igt_subtest("import-multiple-read-write")
test_import_multiple(fd, true);
+
+ igt_fixture
+ drm_close_driver(fd);
}
diff --git a/tests/i915/gem_barrier_race.c b/tests/i915/gem_barrier_race.c
index be71d20e7..0ac1da3a4 100644
--- a/tests/i915/gem_barrier_race.c
+++ b/tests/i915/gem_barrier_race.c
@@ -165,4 +165,7 @@ igt_main
break;
}
}
+
+ igt_fixture
+ drm_close_driver(fd);
}
diff --git a/tests/i915/gem_concurrent_all.c b/tests/i915/gem_concurrent_all.c
index fb3b5f5d8..0bf46c0a2 100644
--- a/tests/i915/gem_concurrent_all.c
+++ b/tests/i915/gem_concurrent_all.c
@@ -2015,4 +2015,9 @@ igt_main
}
}
}
+
+ igt_fixture {
+ drm_close_driver(fd);
+ drm_close_driver(vgem_drv);
+ }
}
diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index bd6671ec8..f3939df86 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -605,4 +605,7 @@ igt_main
gem_context_destroy(fd, ctx_id);
put_ahnd(ahnd);
}
+
+ igt_fixture
+ drm_close_driver(fd);
}
diff --git a/tests/i915/gem_ctx_freq.c b/tests/i915/gem_ctx_freq.c
index d15f83600..8c0d7db3c 100644
--- a/tests/i915/gem_ctx_freq.c
+++ b/tests/i915/gem_ctx_freq.c
@@ -261,4 +261,7 @@ igt_main
igt_dynamic_f("gt%u", gt)
sysfs_range(dirfd, gt);
}
+
+ igt_fixture
+ drm_close_driver(i915);
}
diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index a5ebe6d2d..38fd19e89 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -1321,4 +1321,7 @@ igt_main
intel_allocator_multiprocess_stop();
}
}
+
+ igt_fixture
+ drm_close_driver(fd);
}
diff --git a/tests/i915/i915_pm_rps.c b/tests/i915/i915_pm_rps.c
index eaacc7c90..238d39240 100644
--- a/tests/i915/i915_pm_rps.c
+++ b/tests/i915/i915_pm_rps.c
@@ -999,4 +999,7 @@ igt_main
waitboost(drm_fd, true);
igt_disallow_hang(drm_fd, hang);
}
+
+ igt_fixture
+ drm_close_driver(drm_fd);
}
--
2.40.0
More information about the igt-dev
mailing list