summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-03-12 14:37:10 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-03-16 14:57:41 +0100
commit4ebdbee81523bbf8ae08d0d8c1346ef472263c52 (patch)
tree27393d9db98a587008bacc174fb04908436c42d5 /testsuites/smptests
parentrtems: Require RTEMS_PRIORITY for MrsP semaphores (diff)
downloadrtems-4ebdbee81523bbf8ae08d0d8c1346ef472263c52.tar.bz2
rtems: Allow initially locked MrsP semaphores
Rejecting initially locked MrsP semaphores was due to a limitiation of the early limitiation of the MrsP protocol. This limitation no longer exists.
Diffstat (limited to 'testsuites/smptests')
-rw-r--r--testsuites/smptests/smpmrsp01/init.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/testsuites/smptests/smpmrsp01/init.c b/testsuites/smptests/smpmrsp01/init.c
index 76bb928982..147838957d 100644
--- a/testsuites/smptests/smpmrsp01/init.c
+++ b/testsuites/smptests/smpmrsp01/init.c
@@ -734,12 +734,12 @@ static void test_mrsp_flush_error(test_context *ctx)
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
}
-static void test_mrsp_initially_locked_error(void)
+static void test_mrsp_initially_locked(void)
{
rtems_status_code sc;
rtems_id id;
- puts("test MrsP initially locked error");
+ puts("test MrsP initially locked");
sc = rtems_semaphore_create(
rtems_build_name('M', 'R', 'S', 'P'),
@@ -749,7 +749,13 @@ static void test_mrsp_initially_locked_error(void)
1,
&id
);
- rtems_test_assert(sc == RTEMS_INVALID_NUMBER);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ sc = rtems_semaphore_release(id);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ sc = rtems_semaphore_delete(id);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
}
static void test_mrsp_nested_obtain_error(test_context *ctx)
@@ -1750,7 +1756,7 @@ static void Init(rtems_task_argument arg)
}
test_mrsp_flush_error(ctx);
- test_mrsp_initially_locked_error();
+ test_mrsp_initially_locked();
test_mrsp_nested_obtain_error(ctx);
test_mrsp_deadlock_error(ctx);
test_mrsp_multiple_obtain(ctx);