From 8375bae08bd24cd8a54ee08a164b8db5795cd294 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 7 Apr 2015 11:34:21 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7870 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- test/rt/test.c | 4 ++-- test/rt/testsys.c | 31 +++++++++++++++++++++++++++---- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/test/rt/test.c b/test/rt/test.c index d21dd2ffb..f4a08eeea 100644 --- a/test/rt/test.c +++ b/test/rt/test.c @@ -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 }; diff --git a/test/rt/testsys.c b/test/rt/testsys.c index c5a9d70e1..241fbbe46 100644 --- a/test/rt/testsys.c +++ b/test/rt/testsys.c @@ -105,14 +105,36 @@ ROMCONST struct testcase testsys1 = { }; /** - * @page test_sys_002 System integrity check + * @page test_sys_002 Interrupts handling + * + *

Description

+ * 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 * *

Description

* 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 }; -- cgit v1.2.3