[igt-dev] [PATCH i-g-t] i915/gem_exec_gttfill: Run basic test on simulation

Prathap Kumar Valsan
2019-03-21T22:51:54Z

Basic test don't take long to complete, so allow basic test to
run on simulation.
---
tests/i915/gem_exec_gttfill.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/tests/i915/gem_exec_gttfill.c b/tests/i915/gem_exec_gttfill.c
index efd612bb..92c3cf62 100644
--- a/tests/i915/gem_exec_gttfill.c
+++ b/tests/i915/gem_exec_gttfill.c
@@ -144,7 +144,8 @@ static void fillgtt(int fd, unsigned ring, int timeout)
count = size / BATCH_SIZE + 1;
igt_debug("Using %'d batches to fill %'llu aperture on %d engines\n",
count, (long long)size, nengine);
- intel_require_memory(count, BATCH_SIZE, CHECK_RAM);
+ if (!igt_run_in_simulation())
+ intel_require_memory(count, BATCH_SIZE, CHECK_RAM);
intel_detect_and_clear_missed_interrupts(fd);

memset(&execbuf, 0, sizeof(execbuf));
@@ -210,8 +211,6 @@ igt_main
const struct intel_execution_engine *e;
int device = -1;

- igt_skip_on_simulation();
-
igt_fixture {
device = drm_open_driver(DRIVER_INTEL);
igt_require_gem(device);
@@ -223,11 +222,15 @@ igt_main
fillgtt(device, 0, 1); /* just enough to run a single pass */

for (e = intel_execution_engines; e->name; e++)
- igt_subtest_f("%s", e->name)
+ igt_subtest_f("%s", e->name) {
+ igt_skip_on_simulation();
fillgtt(device, e->exec_id | e->flags, 20);
+ }

- igt_subtest("all")
+ igt_subtest("all") {
+ igt_skip_on_simulation();
fillgtt(device, 0, 150);
+ }

igt_fixture {
igt_stop_hang_detector();
--
2.20.1