summary refs log tree commit diff stats
path: root/tests/qtest/vhost-user-test.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>2025-09-16 16:13:59 +0300
committerDaniel P. Berrangé <berrange@redhat.com>2025-09-19 12:46:07 +0100
commit6f607941b1c01679d6d3dca036ddd23bbe95a44c (patch)
tree41e43a055f178ad973c38bbf8877d1a438fbb8ae /tests/qtest/vhost-user-test.c
parent5d1d32ce9d26a7cdc1c60dceb1b0c55ff9ad9b3e (diff)
downloadfocaccia-qemu-6f607941b1c01679d6d3dca036ddd23bbe95a44c.tar.gz
focaccia-qemu-6f607941b1c01679d6d3dca036ddd23bbe95a44c.zip
treewide: use qemu_set_blocking instead of g_unix_set_fd_nonblocking
Instead of open-coded g_unix_set_fd_nonblocking() calls, use
QEMU wrapper qemu_set_blocking().

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
[DB: fix missing closing ) in tap-bsd.c, remove now unused GError var]
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'tests/qtest/vhost-user-test.c')
-rw-r--r--tests/qtest/vhost-user-test.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c
index 56472ca709..6ec4ec2d5a 100644
--- a/tests/qtest/vhost-user-test.c
+++ b/tests/qtest/vhost-user-test.c
@@ -330,7 +330,6 @@ static int chr_can_read(void *opaque)
 
 static void chr_read(void *opaque, const uint8_t *buf, int size)
 {
-    g_autoptr(GError) err = NULL;
     TestServer *s = opaque;
     CharBackend *chr = &s->chr;
     VhostUserMsg msg;
@@ -471,8 +470,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
          * The receive function forces it to be blocking,
          * so revert it back to non-blocking.
          */
-        g_unix_set_fd_nonblocking(fd, true, &err);
-        g_assert_no_error(err);
+        qemu_set_blocking(fd, false, &error_abort);
         break;
 
     case VHOST_USER_SET_LOG_BASE: