From 4a14126d760c09cbef4933ba1be7860c520b61c8 Mon Sep 17 00:00:00 2001 From: Jiuzhu Dong Date: Fri, 31 Dec 2021 17:46:49 +0800 Subject: [PATCH] ostest: fix assert when enable CONFIG_PRIORITY_INHERITANCE [ 96.555456] [265] ap: up_assert: Assertion failed at file:semaphore/sem_holder.c line: 112 task: pt-0x5b09fd0b [ 96.555657] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b [ 96.555828] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b [ 96.556023] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b [ 96.556222] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b [ 96.556437] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b [ 96.556639] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b [ 96.556842] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b [ 96.557036] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b Signed-off-by: Jiuzhu Dong --- testing/ostest/roundrobin.c | 1 + 1 file changed, 1 insertion(+) diff --git a/testing/ostest/roundrobin.c b/testing/ostest/roundrobin.c index f46a8f423..095e41ef1 100644 --- a/testing/ostest/roundrobin.c +++ b/testing/ostest/roundrobin.c @@ -188,6 +188,7 @@ void rr_test(void) sched_lock(); sem_init(&g_rrsem, 0, 0); + sem_setprotocol(&g_rrsem, SEM_PRIO_NONE); /* Start the threads */