diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-01-28 22:01:37 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-02-04 09:49:29 +0000 |
commit | 3992babd985e1c70e216cdc42aab3e8872c07ad8 (patch) | |
tree | 642fa0c2ba05c38f95215d30f26c9e52c4828133 /tests/gem_busy.c | |
parent | 3005665ead7b88607269e034f03742d5771dd924 (diff) |
igt/gem_busy: Refactor to use gem_require_ring()
Now that gem_require_ring() does the right thing with BSD1/BSD2 we can
use it to our advantage here.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_busy.c')
-rw-r--r-- | tests/gem_busy.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/gem_busy.c b/tests/gem_busy.c index 4605d04e..35662c73 100644 --- a/tests/gem_busy.c +++ b/tests/gem_busy.c @@ -161,6 +161,8 @@ static void test_ring(int fd, unsigned ring, uint32_t flags) uint32_t active; unsigned i; + gem_require_ring(fd, ring | flags); + handle[TEST] = gem_create(fd, 4096); handle[BATCH] = gem_create(fd, 4096); gem_write(fd, handle[BATCH], 0, &bbe, sizeof(bbe)); @@ -169,14 +171,14 @@ static void test_ring(int fd, unsigned ring, uint32_t flags) handle[BUSY] = busy_blt(fd); /* Queue a batch after the busy, it should block and remain "busy" */ - igt_require(exec_noop(fd, handle, ring | flags, false)); + igt_assert(exec_noop(fd, handle, ring | flags, false)); igt_assert(still_busy(fd, handle[BUSY])); __gem_busy(fd, handle[TEST], &read, &write); igt_assert_eq(read, 1 << ring); igt_assert_eq(write, 0); /* Requeue with a write */ - igt_require(exec_noop(fd, handle, ring | flags, true)); + igt_assert(exec_noop(fd, handle, ring | flags, true)); igt_assert(still_busy(fd, handle[BUSY])); __gem_busy(fd, handle[TEST], &read, &write); igt_assert_eq(read, 1 << ring); |