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.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index f9c8987678..5cb38f90da 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -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);