Message ID | 20180327083711.21549-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 27/03/2018 09:37, Chris Wilson wrote: > The test is whether with all but one engine busy we record the correct > load on each engine. If we only have one engine, this test degenerates > into all-idle/all-busy, so we can skip to avoid crashing on the > assumption that we have a busy spinner. > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > --- > tests/perf_pmu.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c > index f27b7ec7..b59af818 100644 > --- a/tests/perf_pmu.c > +++ b/tests/perf_pmu.c > @@ -513,6 +513,7 @@ most_busy_check_all(int gem_fd, const struct intel_execution_engine2 *e, > val[i++] = I915_PMU_ENGINE_BUSY(e_->class, e_->instance); > } > igt_assert(i == num_engines); > + igt_require(spin); /* at least one busy engine */ Or igt_require(num_engines > 1) higher up. But same effect: Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Regards, Tvrtko > > fd[0] = -1; > for (i = 0; i < num_engines; i++) >
Quoting Tvrtko Ursulin (2018-03-27 09:54:35) > > On 27/03/2018 09:37, Chris Wilson wrote: > > The test is whether with all but one engine busy we record the correct > > load on each engine. If we only have one engine, this test degenerates > > into all-idle/all-busy, so we can skip to avoid crashing on the > > assumption that we have a busy spinner. > > > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > > --- > > tests/perf_pmu.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c > > index f27b7ec7..b59af818 100644 > > --- a/tests/perf_pmu.c > > +++ b/tests/perf_pmu.c > > @@ -513,6 +513,7 @@ most_busy_check_all(int gem_fd, const struct intel_execution_engine2 *e, > > val[i++] = I915_PMU_ENGINE_BUSY(e_->class, e_->instance); > > } > > igt_assert(i == num_engines); > > + igt_require(spin); /* at least one busy engine */ > > Or igt_require(num_engines > 1) higher up. But same effect: I'm happy for both, if you want a preemptive r-b :) > Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> -Chris
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c index f27b7ec7..b59af818 100644 --- a/tests/perf_pmu.c +++ b/tests/perf_pmu.c @@ -513,6 +513,7 @@ most_busy_check_all(int gem_fd, const struct intel_execution_engine2 *e, val[i++] = I915_PMU_ENGINE_BUSY(e_->class, e_->instance); } igt_assert(i == num_engines); + igt_require(spin); /* at least one busy engine */ fd[0] = -1; for (i = 0; i < num_engines; i++)
The test is whether with all but one engine busy we record the correct load on each engine. If we only have one engine, this test degenerates into all-idle/all-busy, so we can skip to avoid crashing on the assumption that we have a busy spinner. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> --- tests/perf_pmu.c | 1 + 1 file changed, 1 insertion(+)