Diff between 231372ca5e1545eb505dd22be1ff28d89b68fd22 and a1f8862a38a5f8d29565cd8c84f9880a740ae95e

Changed Files

File Additions Deletions Status
src/shared/tester.c +4 -3 modified

Full Patch

diff --git a/src/shared/tester.c b/src/shared/tester.c
index d1e872b..1f59322 100644
--- a/src/shared/tester.c
+++ b/src/shared/tester.c
@@ -983,10 +983,11 @@ static bool test_io_recv(struct io *io, void *user_data)
 	if (test->iovcnt && !iov->iov_base)
 		iov = test_get_iov(test);
 
-	g_assert_cmpint(len, ==, iov->iov_len);
+	if (memcmp(buf, iov->iov_base, len) || (size_t)len != iov->iov_len)
+		tester_monitor('!', 0x0004, 0x0000, iov->iov_base,
+							iov->iov_len);
 
-	if (memcmp(buf, iov->iov_base, len))
-		tester_monitor('!', 0x0004, 0x0000, iov->iov_base, len);
+	g_assert_cmpint(len, ==, iov->iov_len);
 
 	g_assert(memcmp(buf, iov->iov_base, len) == 0);