From ca9084764f5bebae9867cb7ddc1013a34da07eb1 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 10 Feb 2020 19:38:15 +0100 Subject: [PATCH] syscalls01: Fix sporadic test failures --- testsuite/syscalls01/test_main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testsuite/syscalls01/test_main.c b/testsuite/syscalls01/test_main.c index 37cce2f2..58750561 100644 --- a/testsuite/syscalls01/test_main.c +++ b/testsuite/syscalls01/test_main.c @@ -340,6 +340,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);