100% code coverage for condvars.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@898 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
gdisirio 2009-04-12 16:40:44 +00:00
parent 3dda222a77
commit 90c431b280
2 changed files with 11 additions and 8 deletions

View File

@ -84,8 +84,8 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
- FIX: Removed usused list functions (bug 2755230)(backported in stable - FIX: Removed usused list functions (bug 2755230)(backported in stable
branch). branch).
- NEW: Added a code coverage analysis application under ./tests/coverage. - NEW: Added a code coverage analysis application under ./tests/coverage.
- Added more test cases in order to improve code coverage (it was 74% in - Added more test cases in order to improve the test suite code coverage (it
version 1.2.0). was 74% in version 1.2.0).
*** 1.2.0 *** *** 1.2.0 ***
- Added license exception text to the 1.2.0 branch. - Added license exception text to the 1.2.0 branch.

View File

@ -361,11 +361,14 @@ static void mtx6_execute(void) {
threads[2] = chThdCreateStatic(wa[2], WA_SIZE, prio+3, thread10, "C"); threads[2] = chThdCreateStatic(wa[2], WA_SIZE, prio+3, thread10, "C");
threads[3] = chThdCreateStatic(wa[3], WA_SIZE, prio+4, thread10, "B"); threads[3] = chThdCreateStatic(wa[3], WA_SIZE, prio+4, thread10, "B");
threads[4] = chThdCreateStatic(wa[4], WA_SIZE, prio+5, thread10, "A"); threads[4] = chThdCreateStatic(wa[4], WA_SIZE, prio+5, thread10, "A");
chCondSignal(&c1); chSysLock();
chCondSignal(&c1); chCondSignalI(&c1);
chCondSignal(&c1); chCondSignalI(&c1);
chCondSignal(&c1); chCondSignalI(&c1);
chCondSignal(&c1); chCondSignalI(&c1);
chCondSignalI(&c1);
chSchRescheduleS();
chSysUnlock();
test_wait_threads(); test_wait_threads();
test_assert_sequence("ABCDE"); test_assert_sequence("ABCDE");
} }
@ -425,7 +428,7 @@ static msg_t thread11(void *p) {
chMtxLock(&m2); chMtxLock(&m2);
chMtxLock(&m1); chMtxLock(&m1);
chCondWait(&c1); chCondWaitTimeout(&c1, TIME_INFINITE);
test_emit_token(*(char *)p); test_emit_token(*(char *)p);
chMtxUnlock(); chMtxUnlock();
chMtxUnlock(); chMtxUnlock();