[rtems-libbsd commit] syscalls01: Fix sporadic test failures
Sebastian Huber
sebh at rtems.org
Mon Feb 10 19:22:42 UTC 2020
Module: rtems-libbsd
Branch: 5-freebsd-12
Commit: ca9084764f5bebae9867cb7ddc1013a34da07eb1
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=ca9084764f5bebae9867cb7ddc1013a34da07eb1
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Feb 10 19:38:15 2020 +0100
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 37cce2f..5875056 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);
More information about the vc
mailing list