aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/libqtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qtest/libqtest.c')
-rw-r--r--tests/qtest/libqtest.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index 2fbc3b8..5cb38f9 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -203,7 +203,7 @@ void qtest_wait_qemu(QTestState *s)
#ifndef _WIN32
pid_t pid;
- TFR(pid = waitpid(s->qemu_pid, &s->wstatus, 0));
+ pid = RETRY_ON_EINTR(waitpid(s->qemu_pid, &s->wstatus, 0));
assert(pid == s->qemu_pid);
#else
DWORD ret;
@@ -689,9 +689,7 @@ int qtest_socket_server(const char *socket_path)
addr.sun_family = AF_UNIX;
snprintf(addr.sun_path, sizeof(addr.sun_path), "%s", socket_path);
- do {
- ret = bind(sock, (struct sockaddr *)&addr, sizeof(addr));
- } while (ret == -1 && errno == EINTR);
+ ret = RETRY_ON_EINTR(bind(sock, (struct sockaddr *)&addr, sizeof(addr)));
g_assert_cmpint(ret, !=, -1);
ret = listen(sock, 1);
g_assert_cmpint(ret, !=, -1);