[rtems commit] smpscheduler02: Avoid sporadic test failures

Sebastian Huber sebh at rtems.org
Fri Nov 3 12:11:01 UTC 2017


Module:    rtems
Branch:    master
Commit:    a54d10d17724ffe780e998acd0b7f3d673b2ff67
Changeset: http://git.rtems.org/rtems/commit/?id=a54d10d17724ffe780e998acd0b7f3d673b2ff67

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Nov  3 12:53:51 2017 +0100

smpscheduler02: Avoid sporadic test failures

---

 testsuites/smptests/smpscheduler02/init.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testsuites/smptests/smpscheduler02/init.c b/testsuites/smptests/smpscheduler02/init.c
index 5cd3783..831cff0 100644
--- a/testsuites/smptests/smpscheduler02/init.c
+++ b/testsuites/smptests/smpscheduler02/init.c
@@ -380,6 +380,10 @@ static void test(void)
     sc = rtems_event_transient_receive(RTEMS_WAIT, RTEMS_NO_TIMEOUT);
     rtems_test_assert(sc == RTEMS_SUCCESSFUL);
 
+    /* Ensure that the other task waits for the mutex owned by us */
+    sc = rtems_task_wake_after(2);
+    rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
     sc = rtems_task_set_scheduler(RTEMS_SELF, scheduler_b_id, 1);
     rtems_test_assert(sc == RTEMS_RESOURCE_IN_USE);
 




More information about the vc mailing list