From a1f8862a38a5f8d29565cd8c84f9880a740ae95e Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sat, 15 Nov 2025 14:58:31 +0200 Subject: [PATCH] shared/tester: better debug output on io memcmp failure --- src/shared/tester.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/shared/tester.c b/src/shared/tester.c index d1e872b8f..1f59322bc 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); -- 2.47.3