git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7870 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
Giovanni Di Sirio 2015-04-07 11:34:21 +00:00
parent f1080803f7
commit 8375bae08b
2 changed files with 29 additions and 6 deletions

View File

@ -26,6 +26,7 @@
#include "hal.h"
#include "test.h"
#include "testsys.h"
#include "testthd.h"
#include "testsem.h"
#include "testmtx.h"
@ -36,13 +37,13 @@
#include "testpools.h"
#include "testdyn.h"
#include "testqueues.h"
#include "testsys.h"
#include "testbmk.h"
/*
* Array of all the test patterns.
*/
static ROMCONST struct testcase * ROMCONST *patterns[] = {
patternsys,
patternthd,
patternsem,
patternmtx,
@ -53,7 +54,6 @@ static ROMCONST struct testcase * ROMCONST *patterns[] = {
patternpools,
patterndyn,
patternqueues,
patternsys,
patternbmk,
NULL
};

View File

@ -105,14 +105,36 @@ ROMCONST struct testcase testsys1 = {
};
/**
* @page test_sys_002 System integrity check
* @page test_sys_002 Interrupts handling
*
* <h2>Description</h2>
* The interrupts handling API is invoked for coverage.
*/
static void sys2_execute(void) {
chSysSuspend();
chSysDisable();
chSysSuspend();
chSysEnable();
}
ROMCONST struct testcase testsys2 = {
"System, interrupts handling",
NULL,
NULL,
sys2_execute
};
/**
* @page test_sys_003 System integrity check
*
* <h2>Description</h2>
* The chSysIntegrityCheckI() API is invoked in order to asses the state of the
* system data structures.
*/
static void sys2_execute(void) {
static void sys3_execute(void) {
bool result;
chSysLock();
@ -136,11 +158,11 @@ static void sys2_execute(void) {
test_assert(4, result == false, "port layer check failed");
}
ROMCONST struct testcase testsys2 = {
ROMCONST struct testcase testsys3 = {
"System, integrity",
NULL,
NULL,
sys2_execute
sys3_execute
};
/**
@ -149,5 +171,6 @@ ROMCONST struct testcase testsys2 = {
ROMCONST struct testcase * ROMCONST patternsys[] = {
&testsys1,
&testsys2,
&testsys3,
NULL
};