From 8ff61f3173e8ba55b5d0debf61dfa6e36e2da557 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Mon, 28 Mar 2016 14:22:13 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9175 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- test/rt/configuration.xml | 186 +++++++++++++++++++++++++--------------------- 1 file changed, 101 insertions(+), 85 deletions(-) (limited to 'test/rt') 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,199 +597,215 @@ test_assert_sequence("ABCDE");]]> - - - - - Internal Tests - - - Semaphores. - - - This sequence tests the ChibiOS/NIL functionalities related to counter semaphores. - - - CH_CFG_USE_SEMAPHORES - - - - - - Semaphore primitives, no state change. + Priority change test. - Wait, Signal and Reset primitives are tested. The testing thread does not trigger a state change. + A series of priority changes are performed on the current thread in order to verify that the priority change happens as expected. - + - + - + - The function chSemWait() is invoked, after return the counter and the returned message are tested. + Thread priority is increased by one then a check is performed. - + - The function chSemSignal() is invoked, after return the counter is tested. + Thread priority is returned to the previous value then a check is performed. - - - - - - The function chSemReset() is invoked, after return the counter is tested. - - - - - - + - Semaphore primitives, with state change. + Priority change test with Priority Inheritance. - Wait, Signal and Reset primitives are tested. The testing thread triggers a state change. + 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 - + - + - + - The function chSemWait() is invoked, after return the counter and the returned message are tested. The semaphore is signaled by another thread. + Simulating a priority boost situation (prio > realprio). - + prio += 2; +test_assert(chThdGetPriorityX() == prio + 2, "unexpected priority level");]]> - The function chSemWait() is invoked, after return the counter and the returned message are tested. The semaphore is reset by another thread. + 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();]]> + + + + + Internal Tests + + + Semaphores. + + + This sequence tests the ChibiOS/NIL functionalities related to counter semaphores. + + + CH_CFG_USE_SEMAPHORES + + + + + - Semaphores timeout. + Semaphore primitives, no state change. - Timeout on semaphores is tested. + Wait, Signal and Reset primitives are tested. The testing thread does not trigger a state change. - + - + - The function chSemWaitTimeout() is invoked a first time, after return the system time, the counter and the returned message are tested. + The function chSemWait() is invoked, after return the counter and the returned message are tested. - +test_assert(MSG_OK == msg, "wrong returned message");]]> - The function chSemWaitTimeout() is invoked again, after return the system time, the counter and the returned message are tested. + The function chSemSignal() is invoked, after return the counter is tested. - + + + + + + The function chSemReset() is invoked, after return the counter is tested. + + + + + + -- cgit v1.2.3