public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/sw_sync: Accept bytes transferred between sendmsg/recvmsg
@ 2019-03-18  8:13 Chris Wilson
  2019-03-18 12:00 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2019-03-18  8:13 UTC (permalink / raw)
  To: igt-dev

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@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

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-18 15:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-18  8:13 [igt-dev] [PATCH i-g-t] tests/sw_sync: Accept bytes transferred between sendmsg/recvmsg Chris Wilson
2019-03-18 12:00 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-03-18 13:14 ` [igt-dev] [PATCH i-g-t] " Petri Latvala
2019-03-18 15:21 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox