[CI 2/9] tests/intel/perf_pmu: Remove trial unload
Lucas De Marchi
lucas.demarchi at intel.com
Tue Nov 19 05:40:01 UTC 2024
Remove the trial module so there are no more users of
__igt_i915_driver_unload() and thus i915 can start sharing the xe logic.
Later when perf_pmu_unregister() is fixed in the kernel, a new check can
be added for trying to unbind the device while still having open events.
Reviewed-by: Matt Roper <matthew.d.roper at intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
tests/intel/perf_pmu.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/tests/intel/perf_pmu.c b/tests/intel/perf_pmu.c
index bfa2d501a..f916ded53 100644
--- a/tests/intel/perf_pmu.c
+++ b/tests/intel/perf_pmu.c
@@ -2282,7 +2282,6 @@ static void test_unload(unsigned int num_engines)
int fd[4 + num_engines * 3], i;
uint64_t *buf;
int count = 0, ret;
- char *who = NULL;
int i915;
i915 = __drm_open_driver(DRIVER_INTEL);
@@ -2337,23 +2336,19 @@ static void test_unload(unsigned int num_engines)
igt_debug("Read %d events from perf and trial unload\n", count);
pmu_read_multi(fd[0], count, buf);
- ret = __igt_i915_driver_unload(&who);
- igt_debug("__igt_i915_driver_unload: ret %d who %s\n", ret, who);
- igt_assert(ret != 0 && !strcmp(who, "i915"));
- free(who);
- pmu_read_multi(fd[0], count, buf);
igt_debug("Close perf\n");
-
for (i = 0; i < count; i++)
close(fd[i]);
+ igt_debug("Final unload\n");
+ /* After perf is closed, we should be able to remove the module */
+ ret = igt_i915_driver_unload();
+ igt_assert_eq(ret, 0);
+
free(buf);
}
igt_waitchildren();
-
- igt_debug("Final unload\n");
- igt_assert_eq(__igt_i915_driver_unload(NULL), 0);
}
static void pmu_read(int i915)
--
2.47.0
More information about the igt-dev
mailing list