igt/gem_exec_flush: Add interruptible testing

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2016-05-02 09:01:48 +01:00
parent 16c9edb464
commit 805a05caae

View File

@ -32,6 +32,7 @@ IGT_TEST_DESCRIPTION("Basic check of flushing after batches");
#define WRITE 2
#define KERNEL 4
#define SET_DOMAIN 8
#define INTERRUPTIBLE 16
static void run(int fd, unsigned ring, int nchild, int timeout,
unsigned flags)
@ -160,10 +161,11 @@ static void run(int fd, unsigned ring, int nchild, int timeout,
gem_execbuf(fd, &execbuf);
igt_interruptible(flags & INTERRUPTIBLE) {
if (flags & SET_DOMAIN) {
gem_set_domain(fd, obj[0].handle,
I915_GEM_DOMAIN_GTT,
flags & WRITE ? I915_GEM_DOMAIN_GTT : 0);
(flags & WRITE) ? I915_GEM_DOMAIN_GTT : 0);
if (xor)
igt_assert_eq_u32(map[i], i ^ 0xffffffff);
@ -206,6 +208,7 @@ static void run(int fd, unsigned ring, int nchild, int timeout,
}
}
}
}
igt_info("Child[%d]: %lu cycles\n", child, cycles);
gem_close(fd, obj[2].handle);
@ -263,12 +266,26 @@ igt_main
run(fd, ring, ncpus, timeout,
UNCACHED | m->flags);
igt_subtest_f("%suc-%s-%s-interruptible",
e->exec_id == 0 ? "basic-" : "",
m->name,
e->name)
run(fd, ring, ncpus, timeout,
UNCACHED | m->flags | INTERRUPTIBLE);
igt_subtest_f("%swb-%s-%s",
e->exec_id == 0 ? "basic-" : "",
m->name,
e->name)
run(fd, ring, ncpus, timeout,
COHERENT | m->flags);
igt_subtest_f("%swb-%s-%s-interruptible",
e->exec_id == 0 ? "basic-" : "",
m->name,
e->name)
run(fd, ring, ncpus, timeout,
COHERENT | m->flags | INTERRUPTIBLE);
}
}