diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-02-04 11:17:42 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-02-04 11:22:00 +0000 |
commit | 38fe49d9a80a45ca529adaf8bbbba63e271ad30d (patch) | |
tree | 776a4e303bab3509fdf94592b3c79fe2fc3a0924 /tests | |
parent | 01e467a6312184f963b82c9004b6d7ce09961cc2 (diff) |
tests/drv_hangman: Convert to using central list of engines
Rather than encoding our own list of engines, use the common one for
greater coverage.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/drv_hangman.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c index 174a517d..8a465cfa 100644 --- a/tests/drv_hangman.c +++ b/tests/drv_hangman.c @@ -288,19 +288,10 @@ static void test_error_state_capture(unsigned ring_id, check_error_state(gen, cmd_parser, ring_name, offset); } -static const struct target_ring { - const int id; - const char *short_name; - const char *full_name; -} rings[] = { - { I915_EXEC_RENDER, "render", "render ring" }, - { I915_EXEC_BSD, "bsd", "bsd ring" }, - { I915_EXEC_BLT, "blt", "blitter ring" }, - { I915_EXEC_VEBOX, "vebox", "video enhancement ring" }, -}; - igt_main { + const struct intel_execution_engine *e; + igt_skip_on_simulation(); igt_subtest("error-state-debugfs-entry") @@ -315,8 +306,12 @@ igt_main igt_subtest("error-state-basic") test_error_state_basic(); - for (int i = 0; i < sizeof(rings)/sizeof(rings[0]); i++) { - igt_subtest_f("error-state-capture-%s", rings[i].short_name) - test_error_state_capture(rings[i].id, rings[i].full_name); + for (e = intel_execution_engines; e->name; e++) { + if (e->exec_id == 0) + continue; + + igt_subtest_f("error-state-capture-%s", e->name) + test_error_state_capture(e->exec_id | e->flags, + e->full_name); } } |