diff options
Diffstat (limited to 'tests/gem_softpin.c')
-rw-r--r-- | tests/gem_softpin.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/gem_softpin.c b/tests/gem_softpin.c index 23f93623..336008b8 100644 --- a/tests/gem_softpin.c +++ b/tests/gem_softpin.c @@ -359,11 +359,12 @@ static void test_evict_hang(int fd) execbuf.buffers_ptr = to_user_pointer(&object); execbuf.buffer_count = 1; - hang = igt_hang_ctx(fd, 0, 0, 0, (uint64_t *)&expected); - object.offset = expected; - object.flags = EXEC_OBJECT_PINNED; + hang = igt_hang_ctx(fd, 0, 0, 0); + expected = hang.spin->obj[1].offset; /* Replace the hung batch with ourselves, forcing an eviction */ + object.offset = expected; + object.flags = EXEC_OBJECT_PINNED; gem_execbuf(fd, &execbuf); igt_assert_eq_u64(object.offset, expected); |