summaryrefslogtreecommitdiffstats
path: root/testsuite/thread01
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-07-26 12:03:45 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-07-26 12:03:45 +0200
commit6fb003f5880405d664f532ce9313f0bd666ca675 (patch)
tree69f4042fce391bf1c705f5b2535ca0e309306a53 /testsuite/thread01
parentAvoid malloc() in getsockaddr() (diff)
downloadrtems-libbsd-6fb003f5880405d664f532ce9313f0bd666ca675.tar.bz2
Fix sporadic test failures via uma_timeout()
Diffstat (limited to 'testsuite/thread01')
-rw-r--r--testsuite/thread01/test_main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/testsuite/thread01/test_main.c b/testsuite/thread01/test_main.c
index f1cef304..fa15b9f6 100644
--- a/testsuite/thread01/test_main.c
+++ b/testsuite/thread01/test_main.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2013, 2018 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Dornierstr. 4
@@ -43,6 +43,8 @@
#include <sys/kthread.h>
#include <sys/errno.h>
+#include <vm/uma.h>
+
#include <rtems/bsd/bsd.h>
#include <rtems.h>
@@ -284,8 +286,15 @@ test_rtems_bsd_get_curthread_or_null(void)
static void
test_main(void)
{
+
main_task_id = rtems_task_self();
+ /*
+ * Stop interferences of uma_timeout() which may need some dynamic
+ * memory. This could disturb the no memory tests.
+ */
+ rtems_uma_drain_timeout();
+
test_non_bsd_thread();
test_kproc_start();
test_kthread_start();