From: Tvrtko Ursulin <tursulin@ursulin.net>
To: igt-dev@lists.freedesktop.org
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: [igt-dev] [PATCH i-g-t v2 7/9] tests/perf_pmu: Always skip missing engines
Date: Mon, 5 Feb 2018 11:37:10 +0000 [thread overview]
Message-ID: <20180205113710.14870-1-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <151760489869.15322.1829983553670528497@mail.alporthouse.com>
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Always skip missing engines to make tests skips very early and avoid
losing time in tests which need to do setups or waits before they would
otherwise detect this.
To ensure PMU is rejecting opening missing engines we will add an explicit
test later.
v2: Use subtest groups for engine checking. (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
tests/perf_pmu.c | 191 ++++++++++++++++++++++++++++++-------------------------
1 file changed, 105 insertions(+), 86 deletions(-)
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index ae322fd869d8..d00838c41333 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -361,8 +361,6 @@ most_busy_check_all(int gem_fd, const struct intel_execution_engine2 *e,
igt_spin_t *spin = NULL;
unsigned int idle_idx, i;
- gem_require_engine(gem_fd, e->class, e->instance);
-
i = 0;
for_each_engine_class_instance(fd, e_) {
if (!gem_has_engine(gem_fd, e_->class, e_->instance))
@@ -1301,7 +1299,8 @@ igt_main
for_each_engine_class_instance(fd, e) {
/**
- * Test that a single engine metric can be initialized.
+ * Test that a single engine metric can be initialized or it
+ * is correctly rejected.
*/
igt_subtest_f("init-busy-%s", e->name)
init(fd, e, I915_SAMPLE_BUSY);
@@ -1312,60 +1311,98 @@ igt_main
igt_subtest_f("init-sema-%s", e->name)
init(fd, e, I915_SAMPLE_SEMA);
- /**
- * Test that engines show no load when idle.
- */
- igt_subtest_f("idle-%s", e->name)
- single(fd, e, 0);
-
- /**
- * Test that a single engine reports load correctly.
- */
- igt_subtest_f("busy-%s", e->name)
- single(fd, e, TEST_BUSY);
- igt_subtest_f("busy-idle-%s", e->name)
- single(fd, e, TEST_BUSY | TEST_TRAILING_IDLE);
-
- /**
- * Test that when one engine is loaded other report no load.
- */
- igt_subtest_f("busy-check-all-%s", e->name)
- busy_check_all(fd, e, num_engines, TEST_BUSY);
- igt_subtest_f("busy-idle-check-all-%s", e->name)
- busy_check_all(fd, e, num_engines,
- TEST_BUSY | TEST_TRAILING_IDLE);
-
- /**
- * Test that when all except one engine are loaded all loads
- * are correctly reported.
- */
- igt_subtest_f("most-busy-check-all-%s", e->name)
- most_busy_check_all(fd, e, num_engines, TEST_BUSY);
- igt_subtest_f("most-busy-idle-check-all-%s", e->name)
- most_busy_check_all(fd, e, num_engines,
- TEST_BUSY | TEST_TRAILING_IDLE);
-
- /**
- * Test that semphore counters report no activity on idle
- * or busy engines.
- */
- igt_subtest_f("idle-no-semaphores-%s", e->name)
- no_sema(fd, e, 0);
-
- igt_subtest_f("busy-no-semaphores-%s", e->name)
- no_sema(fd, e, TEST_BUSY);
+ igt_subtest_group {
+ igt_fixture {
+ gem_require_engine(fd, e->class, e->instance);
+ }
- igt_subtest_f("busy-idle-no-semaphores-%s", e->name)
- no_sema(fd, e, TEST_BUSY | TEST_TRAILING_IDLE);
+ /**
+ * Test that engines show no load when idle.
+ */
+ igt_subtest_f("idle-%s", e->name)
+ single(fd, e, 0);
- /**
- * Test that semaphore waits are correctly reported.
- */
- igt_subtest_f("semaphore-wait-%s", e->name)
- sema_wait(fd, e, TEST_BUSY);
+ /**
+ * Test that a single engine reports load correctly.
+ */
+ igt_subtest_f("busy-%s", e->name)
+ single(fd, e, TEST_BUSY);
+ igt_subtest_f("busy-idle-%s", e->name)
+ single(fd, e, TEST_BUSY | TEST_TRAILING_IDLE);
- igt_subtest_f("semaphore-wait-idle-%s", e->name)
- sema_wait(fd, e, TEST_BUSY | TEST_TRAILING_IDLE);
+ /**
+ * Test that when one engine is loaded other report no
+ * load.
+ */
+ igt_subtest_f("busy-check-all-%s", e->name)
+ busy_check_all(fd, e, num_engines, TEST_BUSY);
+ igt_subtest_f("busy-idle-check-all-%s", e->name)
+ busy_check_all(fd, e, num_engines,
+ TEST_BUSY | TEST_TRAILING_IDLE);
+
+ /**
+ * Test that when all except one engine are loaded all
+ * loads are correctly reported.
+ */
+ igt_subtest_f("most-busy-check-all-%s", e->name)
+ most_busy_check_all(fd, e, num_engines,
+ TEST_BUSY);
+ igt_subtest_f("most-busy-idle-check-all-%s", e->name)
+ most_busy_check_all(fd, e, num_engines,
+ TEST_BUSY |
+ TEST_TRAILING_IDLE);
+
+ /**
+ * Test that semphore counters report no activity on
+ * idle or busy engines.
+ */
+ igt_subtest_f("idle-no-semaphores-%s", e->name)
+ no_sema(fd, e, 0);
+
+ igt_subtest_f("busy-no-semaphores-%s", e->name)
+ no_sema(fd, e, TEST_BUSY);
+
+ igt_subtest_f("busy-idle-no-semaphores-%s", e->name)
+ no_sema(fd, e, TEST_BUSY | TEST_TRAILING_IDLE);
+
+ /**
+ * Test that semaphore waits are correctly reported.
+ */
+ igt_subtest_f("semaphore-wait-%s", e->name)
+ sema_wait(fd, e, TEST_BUSY);
+
+ igt_subtest_f("semaphore-wait-idle-%s", e->name)
+ sema_wait(fd, e,
+ TEST_BUSY | TEST_TRAILING_IDLE);
+
+ /**
+ * Check that two perf clients do not influence each
+ * others observations.
+ */
+ igt_subtest_f("multi-client-%s", e->name)
+ multi_client(fd, e);
+
+ /**
+ * Check that reported usage is correct when PMU is
+ * enabled after the batch is running.
+ */
+ igt_subtest_f("busy-start-%s", e->name)
+ busy_start(fd, e);
+
+ /**
+ * Check that reported usage is correct when PMU is
+ * enabled after two batches are running.
+ */
+ igt_subtest_f("busy-double-start-%s", e->name)
+ busy_double_start(fd, e);
+
+ /**
+ * Check that the PMU can be safely enabled in face of
+ * interrupt-heavy engine load.
+ */
+ igt_subtest_f("enable-race-%s", e->name)
+ test_enable_race(fd, e);
+ }
/**
* Test that event waits are correctly reported.
@@ -1373,34 +1410,6 @@ igt_main
if (e->class == I915_ENGINE_CLASS_RENDER)
igt_subtest_f("event-wait-%s", e->name)
event_wait(fd, e);
-
- /**
- * Check that two perf clients do not influence each others
- * observations.
- */
- igt_subtest_f("multi-client-%s", e->name)
- multi_client(fd, e);
-
- /**
- * Check that reported usage is correct when PMU is enabled
- * after the batch is running.
- */
- igt_subtest_f("busy-start-%s", e->name)
- busy_start(fd, e);
-
- /**
- * Check that reported usage is correct when PMU is enabled
- * after two batches are running.
- */
- igt_subtest_f("busy-double-start-%s", e->name)
- busy_double_start(fd, e);
-
- /**
- * Check that the PMU can be safely enabled in face of
- * interrupt-heavy engine load.
- */
- igt_subtest_f("enable-race-%s", e->name)
- test_enable_race(fd, e);
}
/**
@@ -1466,10 +1475,20 @@ igt_main
}
for_each_engine_class_instance(fd, e) {
- igt_subtest_f("render-node-busy-%s", e->name)
- single(fd, e, TEST_BUSY);
- igt_subtest_f("render-node-busy-idle-%s", e->name)
- single(fd, e, TEST_BUSY | TEST_TRAILING_IDLE);
+ igt_subtest_group {
+ igt_fixture {
+ gem_require_engine(render_fd,
+ e->class,
+ e->instance);
+ }
+
+ igt_subtest_f("render-node-busy-%s", e->name)
+ single(fd, e, TEST_BUSY);
+ igt_subtest_f("render-node-busy-idle-%s",
+ e->name)
+ single(fd, e,
+ TEST_BUSY | TEST_TRAILING_IDLE);
+ }
}
igt_fixture {
--
2.14.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-02-05 11:37 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 18:37 [igt-dev] [PATCH v2 i-g-t 0/9] perf_pmu reliability improvements Tvrtko Ursulin
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 1/9] tests/perf_pmu: Tighten busy measurement Tvrtko Ursulin
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 2/9] tests/perf_pmu: More busy measurement tightening Tvrtko Ursulin
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 3/9] tests/perf_pmu: Use measured sleep in all time based tests Tvrtko Ursulin
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 4/9] tests/perf_pmu: Convert to flags Tvrtko Ursulin
2018-02-02 20:39 ` Chris Wilson
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 5/9] tests/perf_pmu: Add trailing edge idle test variants Tvrtko Ursulin
2018-02-02 20:45 ` Chris Wilson
2018-02-05 10:32 ` Tvrtko Ursulin
2018-02-05 11:36 ` [igt-dev] [PATCH i-g-t v2 " Tvrtko Ursulin
2018-02-05 14:08 ` Chris Wilson
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 6/9] tests/perf_pmu: PMU enable race test Tvrtko Ursulin
2018-02-02 20:52 ` Chris Wilson
2018-02-05 10:07 ` Tvrtko Ursulin
2018-02-05 10:16 ` Chris Wilson
2018-02-05 10:40 ` Tvrtko Ursulin
2018-02-05 14:11 ` Chris Wilson
2018-02-05 15:01 ` [igt-dev] [PATCH i-g-t v3 " Tvrtko Ursulin
2018-02-05 11:36 ` [igt-dev] [PATCH i-g-t v2 " Tvrtko Ursulin
2018-02-05 14:12 ` Chris Wilson
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 7/9] tests/perf_pmu: Always skip missing engines Tvrtko Ursulin
2018-02-02 20:54 ` Chris Wilson
2018-02-05 11:37 ` Tvrtko Ursulin [this message]
2018-02-05 14:13 ` [igt-dev] [PATCH i-g-t v2 " Chris Wilson
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 8/9] tests/perf_pmu: Explicitly test for engine availability in init tests Tvrtko Ursulin
2018-02-02 20:57 ` Chris Wilson
2018-02-05 11:37 ` [igt-dev] [PATCH i-g-t v2 " Tvrtko Ursulin
2018-02-05 14:14 ` Chris Wilson
2018-02-05 15:02 ` [igt-dev] [PATCH i-g-t v3 " Tvrtko Ursulin
2018-02-02 18:37 ` [igt-dev] [PATCH i-g-t 9/9] tests/perf_pmu: Use short batches from hotplug test Tvrtko Ursulin
2018-02-02 21:43 ` Chris Wilson
2018-02-05 11:38 ` [igt-dev] [PATCH i-g-t v2 " Tvrtko Ursulin
2018-02-05 14:37 ` Chris Wilson
2018-02-05 11:59 ` [igt-dev] [PATCH i-g-t " Tvrtko Ursulin
2018-02-02 19:18 ` [igt-dev] ✓ Fi.CI.BAT: success for perf_pmu reliability improvements (rev2) Patchwork
2018-02-02 22:20 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-02-05 12:12 ` [igt-dev] ✓ Fi.CI.BAT: success for perf_pmu reliability improvements (rev7) Patchwork
2018-02-05 13:55 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-02-05 15:21 ` [igt-dev] ✓ Fi.CI.BAT: success for perf_pmu reliability improvements (rev9) Patchwork
2018-02-05 17:35 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180205113710.14870-1-tvrtko.ursulin@linux.intel.com \
--to=tursulin@ursulin.net \
--cc=igt-dev@lists.freedesktop.org \
--cc=tvrtko.ursulin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox