[igt-dev] [PATCH i-g-t] tests/sw_sync: Accept bytes transferred between sendmsg/recvmsg

Chris Wilson chris at chris-wilson.co.uk
Mon Mar 18 08:13:22 UTC 2019


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

Fixes: 520b6f7fbb6c ("sw_sync: Wait until the end")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110150
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/sw_sync.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/sw_sync.c b/tests/sw_sync.c
index 26457ce76..950b8b614 100644
--- a/tests/sw_sync.c
+++ b/tests/sw_sync.c
@@ -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");
-- 
2.20.1



More information about the igt-dev mailing list