mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
qtest: Add error reporting to socket_accept()
We're not using the GLib infrastructure here, to allow cleaning up the sockets. Still, knowing why a certain test run failed can be valuable. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
a7ded163db
commit
a7d915f388
1 changed files with 3 additions and 0 deletions
|
@ -93,6 +93,9 @@ static int socket_accept(int sock)
|
|||
do {
|
||||
ret = accept(sock, (struct sockaddr *)&addr, &addrlen);
|
||||
} while (ret == -1 && errno == EINTR);
|
||||
if (ret == -1) {
|
||||
fprintf(stderr, "%s failed: %s\n", __func__, strerror(errno));
|
||||
}
|
||||
close(sock);
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue