[i-g-t] i915/perf_pmu: Add the missing igt_dynamic to dynamic rcs* test selection
diff mbox series

Message ID 20200406085309.1585743-1-chris@chris-wilson.co.uk
State New
Headers show
Series
  • [i-g-t] i915/perf_pmu: Add the missing igt_dynamic to dynamic rcs* test selection
Related show

Commit Message

Chris Wilson April 6, 2020, 8:53 a.m. UTC
An important ingredient to using igt_subtest_with_dynamic is to include
an igt_dynamic at some point.

Reported-by: Petri Latvala <petri.latvala@intel.com>
Fixes: 311cb1b360b7 ("i915/perf_pmu: Dynamic active engine tests")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
---
 tests/perf_pmu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Petri Latvala April 6, 2020, 9:01 a.m. UTC | #1
On Mon, Apr 06, 2020 at 09:53:09AM +0100, Chris Wilson wrote:
> An important ingredient to using igt_subtest_with_dynamic is to include
> an igt_dynamic at some point.
> 
> Reported-by: Petri Latvala <petri.latvala@intel.com>
> Fixes: 311cb1b360b7 ("i915/perf_pmu: Dynamic active engine tests")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Petri Latvala <petri.latvala@intel.com>

Thanks,

Reviewed-by: Petri Latvala <petri.latvala@intel.com>


If someone (tm) is feeling like there's not enough to do, perf_pmu
could use a refactoring with the dynamic subtests to do


igt_subtest_with_dynamic() {
  igt_require(system-wide things);

  igt_dynamic_f() { igt_require(engine-specific thing); }
}

so that skips happen for a whole subtest at a time for things like gen
checks.

Patch
diff mbox series

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index 92aee1d1d..b9ca6a493 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -1866,7 +1866,8 @@  static void faulting_read(int gem_fd, const struct mmap_offset *t)
 
 #define test_each_rcs(T, i915, e) \
 	igt_subtest_with_dynamic(T) __for_each_physical_engine(i915, e) \
-		for_each_if((e)->class == I915_ENGINE_CLASS_RENDER)
+		for_each_if((e)->class == I915_ENGINE_CLASS_RENDER) \
+			igt_dynamic_f("%s", e->name)
 
 igt_main
 {