aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/virtio-net-test.c
diff options
context:
space:
mode:
authorZhu Jun <zhujun2@cmss.chinamobile.com>2023-11-21 00:08:02 -0800
committerThomas Huth <thuth@redhat.com>2023-12-04 15:12:57 +0100
commit4d98618b8a657f1ce361d90e0eade759af912b98 (patch)
tree67af9d404b764017f88e5d704e7b0ddc138cd4fb /tests/qtest/virtio-net-test.c
parent55339361276a81ab3d306e6e8e81151e2977c5da (diff)
downloadqemu-4d98618b8a657f1ce361d90e0eade759af912b98.zip
qemu-4d98618b8a657f1ce361d90e0eade759af912b98.tar.gz
qemu-4d98618b8a657f1ce361d90e0eade759af912b98.tar.bz2
tests/qtest: check the return value
These variables "ret" are never referenced in the code, thus add check logic for the "ret" Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20231121080802.4500-1-zhujun2@cmss.chinamobile.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest/virtio-net-test.c')
-rw-r--r--tests/qtest/virtio-net-test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/qtest/virtio-net-test.c b/tests/qtest/virtio-net-test.c
index fab5dd8..2df75c9 100644
--- a/tests/qtest/virtio-net-test.c
+++ b/tests/qtest/virtio-net-test.c
@@ -91,6 +91,7 @@ static void tx_test(QVirtioDevice *dev,
len = ntohl(len);
ret = recv(socket, buffer, len, 0);
+ g_assert_cmpint(ret, ==, len);
g_assert_cmpstr(buffer, ==, "TEST");
}