diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-07-18 10:04:51 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-07-18 10:25:56 +0100 |
commit | 3d8f55c3e0b4545a6385a44094a70e68e071a49c (patch) | |
tree | 56cc855e24a0e62502871df5602a225565b3d945 /lib | |
parent | ee5d5c47c44183f3ab7d6493c0e7c41556e34e73 (diff) |
igt/vgem_slow: Test for the expected -ETIMEDOUT upon fence timeout
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/igt_vgem.c | 12 | ||||
-rw-r--r-- | lib/igt_vgem.h | 1 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/igt_vgem.c b/lib/igt_vgem.c index 66557913..81c5a3b7 100644 --- a/lib/igt_vgem.c +++ b/lib/igt_vgem.c @@ -155,7 +155,7 @@ uint32_t vgem_fence_attach(int fd, struct vgem_bo *bo, unsigned flags) return arg.out_fence; } -static int __vgem_fence_signal(int fd, struct local_vgem_fence_signal *arg) +static int ioctl_vgem_fence_signal(int fd, struct local_vgem_fence_signal *arg) { int err = 0; if (igt_ioctl(fd, LOCAL_IOCTL_VGEM_FENCE_SIGNAL, arg)) @@ -164,11 +164,17 @@ static int __vgem_fence_signal(int fd, struct local_vgem_fence_signal *arg) return err; } -void vgem_fence_signal(int fd, uint32_t fence) +int __vgem_fence_signal(int fd, uint32_t fence) { struct local_vgem_fence_signal arg; memset(&arg, 0, sizeof(arg)); arg.fence = fence; - igt_assert_eq(__vgem_fence_signal(fd, &arg), 0); + + return ioctl_vgem_fence_signal(fd, &arg); +} + +void vgem_fence_signal(int fd, uint32_t fence) +{ + igt_assert_eq(__vgem_fence_signal(fd, fence), 0); } diff --git a/lib/igt_vgem.h b/lib/igt_vgem.h index ab9ece4c..002ad7f0 100644 --- a/lib/igt_vgem.h +++ b/lib/igt_vgem.h @@ -44,6 +44,7 @@ bool vgem_fence_has_flag(int fd, unsigned flags); uint32_t vgem_fence_attach(int fd, struct vgem_bo *bo, unsigned flags); #define VGEM_FENCE_WRITE 0x1 #define WIP_VGEM_FENCE_NOTIMEOUT 0x2 +int __vgem_fence_signal(int fd, uint32_t fence); void vgem_fence_signal(int fd, uint32_t fence); #endif /* IGT_VGEM_H */ |