diff options
Diffstat (limited to 'tests/qtest/vhost-user-test.c')
-rw-r--r-- | tests/qtest/vhost-user-test.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c index d4e4372..255bde5 100644 --- a/tests/qtest/vhost-user-test.c +++ b/tests/qtest/vhost-user-test.c @@ -458,7 +458,10 @@ static void chr_read(void *opaque, const uint8_t *buf, int size) case VHOST_USER_SET_VRING_KICK: case VHOST_USER_SET_VRING_CALL: /* consume the fd */ - qemu_chr_fe_get_msgfds(chr, &fd, 1); + if (!qemu_chr_fe_get_msgfds(chr, &fd, 1) && fd < 0) { + qos_printf("call fd: %d, do not set non-blocking\n", fd); + break; + } /* * This is a non-blocking eventfd. * The receive function forces it to be blocking, |