[igt-dev] [PATCH i-g-t] i915/perf_pmu: Attempt to unload i915 while the PMU is active
Chris Wilson
chris at chris-wilson.co.uk
Thu Apr 30 18:33:02 UTC 2020
Quoting Chris Wilson (2020-04-30 19:28:59)
> +static void test_unload(void)
> +{
> + igt_fork(child, 1) {
...
> + igt_debug("Read %d events from perf and trial unload\n", count);
> + pmu_read_multi(fd, count, buf);
> + igt_assert_eq(unload_i915(), -EBUSY);
> + pmu_read_multi(fd, count, buf);
> + sleep(2);
> +
> + igt_debug("Close perf\n");
> + close(fd);
> +
> + free(buf);
> + }
> + igt_waitchildren();
> +
> + igt_debug("Final unload\n");
> + sleep(5);
> + igt_assert_eq(unload_i915(), 0);
The sleeps are not required, the child process is enough to kick the
perf_event_destroy.
-Chris
More information about the igt-dev
mailing list