diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-01-05 17:14:09 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-01-05 17:14:09 +0000 |
commit | 855fe2391d07c5dab27129ad626541482fe8d782 (patch) | |
tree | 93d4213cd7de59ab0d1b930e653d60fbf8914dc4 /test | |
parent | de95f94fbeb425a7e36e664181824db6ed021ccc (diff) | |
download | ChibiOS-855fe2391d07c5dab27129ad626541482fe8d782.tar.gz ChibiOS-855fe2391d07c5dab27129ad626541482fe8d782.tar.bz2 ChibiOS-855fe2391d07c5dab27129ad626541482fe8d782.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1501 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test')
-rw-r--r-- | test/test.dox | 44 | ||||
-rw-r--r-- | test/testqueues.c | 12 |
2 files changed, 44 insertions, 12 deletions
diff --git a/test/test.dox b/test/test.dox index ad3c03927..75a46366e 100644 --- a/test/test.dox +++ b/test/test.dox @@ -18,20 +18,52 @@ */
/**
- * @page testsuite Test Suite
+ * @page testsuite Testing Strategy
* <h2>Description</h2>
* Most of the ChibiOS/RT demos link a set of software modules (test suite) in
* order to verify the proper working of the kernel, the port and the demo
- * itself.<br>
- * Each Test Module performs a series of tests on a specified subsystem or
+ * itself.
+ *
+ * <h2>Strategy by Components</h2>
+ * The OS components are tested in various modes depending on their importance:
+ * - <b>Kernel</b>. The kernel code is subject to rigorous testing. The test
+ * suite aims to test <b>all</b> the kernel code and reach a code coverage
+ * as close to 100% as possible. In addition to the code coverage, the kernel
+ * code is tested for <b>functionality</b> and benchmarked for <b>speed</b>
+ * and <b>size</b> before each stable release. In addition to the code
+ * coverage and functional testing a <b>batch compilation test</b> is
+ * performed before each release, the kernel is compiled by alternatively
+ * enabling and disabling all the various configuration options, the
+ * kernel code is expected to compile without errors nor warnings and
+ * execute the test suite without failures (a specific simulator is used
+ * for this execution test, it is done automatically by a script because
+ * the entire sequence can require hours).<br>
+ * All the tests results are included as reports in the OS distribution
+ * under @p ./docs/reports.
+ * - <b>Ports</b>. The port code is tested by executing the kernel test
+ * suite on the target hardware. A port is validated only if it passes all
+ * the tests. Speed and size benchmarks for all the supported architectures
+ * are performed, both size and speed regressions are <b>monitored</b>.
+ * - <b>HAL</b>. The HAL high level code and device drivers implementations
+ * are tested by use in the various demos and/or by users.
+ * - <b>Various</b>. The miscellaneous code is tested by use in the various
+ * demos and/or by users.
+ * - <b>External Code</b>. Not tested, external libraries or components are
+ * used as-is or with minor patching where required, problems are usually
+ * reported upstream.
+ * .
+ * <h2>Kernel Test Suite</h2>
+ * The kernel test suite is divided in modules or test sequences. Each Test
+ * Module performs a series of tests on a specified kernel subsystem or
* subsystems and can report a failure/success status and/or a performance
* index as the test suite output.<br>
* The test suite is usually activated in the demo applications by pressing a
* button on the target board, see the readme into the various demos
- * directories. The test suite output is usually sent through a serial port and
- * can be examined by using a terminal emulator program.
+ * directories. The test suite output is usually sent through a serial port
+ * and can be examined by using a terminal emulator program.
+ *
+ * <h2>Kernel Test Modules</h2>
*
- * <h2>Test Modules</h2>
* - @subpage test_threads
* - @subpage test_dynamic
* - @subpage test_msg
diff --git a/test/testqueues.c b/test/testqueues.c index 6989442c4..c07e8aee3 100644 --- a/test/testqueues.c +++ b/test/testqueues.c @@ -86,6 +86,7 @@ static void queues1_setup(void) { static void queues1_execute(void) {
unsigned i;
+ size_t n;
/* Initial empty state */
test_assert(1, chIQIsEmpty(&iq), "not empty");
@@ -107,9 +108,8 @@ static void queues1_execute(void) { chIQPutI(&iq, 'A' + i);
/* Reading the whole thing */
- test_assert(6,
- chIQRead(&iq, wa[1], TEST_QUEUES_SIZE * 2) == TEST_QUEUES_SIZE,
- "wrong returned size");
+ n = chIQReadTimeout(&iq, wa[1], TEST_QUEUES_SIZE * 2, TIME_IMMEDIATE);
+ test_assert(6, n == TEST_QUEUES_SIZE, "wrong returned size");
test_assert(7, chIQIsEmpty(&iq), "still full");
/* Testing reset */
@@ -148,6 +148,7 @@ static void queues2_setup(void) { static void queues2_execute(void) {
unsigned i;
+ size_t n;
/* Initial empty state */
test_assert(1, chOQIsEmpty(&oq), "not empty");
@@ -165,9 +166,8 @@ static void queues2_execute(void) { test_assert(5, chOQGetI(&oq) == Q_EMPTY, "failed to report Q_EMPTY");
/* Writing the whole thing */
- test_assert(6,
- chOQWrite(&oq, wa[1], TEST_QUEUES_SIZE * 2) == TEST_QUEUES_SIZE,
- "wrong returned size");
+ n = chOQWriteTimeout(&oq, wa[1], TEST_QUEUES_SIZE * 2, TIME_IMMEDIATE);
+ test_assert(6, n == TEST_QUEUES_SIZE,"wrong returned size");
test_assert(7, chOQIsFull(&oq), "not full");
/* Testing reset */
|