From 8ff61f3173e8ba55b5d0debf61dfa6e36e2da557 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Mon, 28 Mar 2016 14:22:13 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9175 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- test/rt/configuration.xml | 242 ++++++++++++++++++++------------------ 1 file changed, 129 insertions(+), 113 deletions(-) diff --git a/test/rt/configuration.xml b/test/rt/configuration.xml index d02b17b75..338cc36ed 100644 --- a/test/rt/configuration.xml +++ b/test/rt/configuration.xml @@ -597,6 +597,135 @@ test_assert_sequence("ABCDE");]]> + + + Priority change test. + + + A series of priority changes are performed on the current thread in order to verify that the priority change happens as expected. + + + + + + + + + + + + + + + + + + + Thread priority is increased by one then a check is performed. + + + + + + + + + + + Thread priority is returned to the previous value then a check is performed. + + + + + + + + + + + + + Priority change test with Priority Inheritance. + + + A series of priority changes are performed on the current thread in order to verify that the priority change happens as expected. + + + CH_CFG_USE_MUTEXES + + + + + + + + + + + + + + + + Simulating a priority boost situation (prio > realprio). + + + + + + prio += 2; +test_assert(chThdGetPriorityX() == prio + 2, "unexpected priority level");]]> + + + + + Raising thread priority above original priority but below the boosted level. + + + + + + prio == prio + 2, "unexpected priority level"); +test_assert(chThdGetSelfX()->realprio == prio + 1, "unexpected returned real priority level");]]> + + + + + Raising thread priority above the boosted level. + + + + + + prio == prio + 3, "unexpected priority level"); +test_assert(chThdGetSelfX()->realprio == prio + 3, "unexpected real priority level");]]> + + + + + Restoring original conditions. + + + + + + prio = prio; +chThdGetSelfX()->realprio = prio; +chSysUnlock();]]> + + + + @@ -681,119 +810,6 @@ test_assert_lock(chSemGetCounterI(&sem1) == 2, "wrong counter value");]]> - - - Semaphore primitives, with state change. - - - Wait, Signal and Reset primitives are tested. The testing thread triggers a state change. - - - - - - - - - - - - - - - - - - - The function chSemWait() is invoked, after return the counter and the returned message are tested. The semaphore is signaled by another thread. - - - - - - - - - - - The function chSemWait() is invoked, after return the counter and the returned message are tested. The semaphore is reset by another thread. - - - - - - - - - - - - - Semaphores timeout. - - - Timeout on semaphores is tested. - - - - - - - - - - - - - - - - - - - The function chSemWaitTimeout() is invoked a first time, after return the system time, the counter and the returned message are tested. - - - - - - - - - - - The function chSemWaitTimeout() is invoked again, after return the system time, the counter and the returned message are tested. - - - - - - - - - -