[rtems-libbsd commit] syscalls01: Fix sporadic test failures

Sebastian Huber sebh at rtems.org
Mon Feb 10 18:42:22 UTC 2020


Module:    rtems-libbsd
Branch:    master
Commit:    2bbeeb65296c7793897aaafe6b284a2ee42a9d4b
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=2bbeeb65296c7793897aaafe6b284a2ee42a9d4b

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 78c7dd4..5db3013 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);
 



More information about the vc mailing list