Commit 4158a4bf authored by Chris Wilson's avatar Chris Wilson

tests/sw_sync: Accept bytes transferred between sendmsg/recvmsg

sendmsg/recvmsg return the number of bytes transferred, not just an
error code.

Fixes: 520b6f7f ("sw_sync: Wait until the end")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110150Signed-off-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Petri Latvala's avatarPetri Latvala <petri.latvala@intel.com>
parent d38957ff
......@@ -197,7 +197,7 @@ static void test_sync_busy_fork_unixsocket(void)
msg.msg_control = c_buffer;
msg.msg_controllen = sizeof(c_buffer);
igt_assert(recvmsg(socket, &msg, 0) == 0);
igt_assert(recvmsg(socket, &msg, 0) > 0);
cmsg = CMSG_FIRSTHDR(&msg);
data = CMSG_DATA(cmsg);
......@@ -233,7 +233,7 @@ static void test_sync_busy_fork_unixsocket(void)
igt_assert_f(sync_fence_wait(fence, 0) == -ETIME,
"Fence signaled (it should not have been signalled yet)\n");
igt_assert(sendmsg(socket, &msg, 0) == 0);
igt_assert(sendmsg(socket, &msg, 0) > 0);
igt_assert_f(sync_fence_wait(fence, 2*1000) == 0,
"Fence not signaled (timeline value 1 fence seqno 1)\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment