aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/rt/test.c4
-rw-r--r--test/rt/testsys.c31
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
+ *
+ * <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
};