summaryrefslogtreecommitdiffstats
path: root/testsuite/syscalls01/test_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/syscalls01/test_main.c')
-rw-r--r--testsuite/syscalls01/test_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/syscalls01/test_main.c b/testsuite/syscalls01/test_main.c
index 78c7dd44..5db3013c 100644
--- a/testsuite/syscalls01/test_main.c
+++ b/testsuite/syscalls01/test_main.c
@@ -335,6 +335,12 @@ test_socket(const socket_test *st)
errno = 0;
sd = socket(st->domain, st->type, st->protocol);
+
+ if (sd < 0) {
+ epoch_cleanup();
+ sd = socket(st->domain, st->type, st->protocol);
+ }
+
if (st->expect_errno == 0) {
assert(sd >= 0);