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 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx