From 3992babd985e1c70e216cdc42aab3e8872c07ad8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 28 Jan 2016 22:01:37 +0000 Subject: 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 --- tests/gem_busy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/gem_busy.c') 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); -- cgit v1.2.3