diff options
Diffstat (limited to 'test/testbmk.c')
-rw-r--r-- | test/testbmk.c | 91 |
1 files changed, 13 insertions, 78 deletions
diff --git a/test/testbmk.c b/test/testbmk.c index 9e0d687e2..a67c09af1 100644 --- a/test/testbmk.c +++ b/test/testbmk.c @@ -102,11 +102,6 @@ static unsigned int msg_loop_test(Thread *tp) { * printed in the output log.
*/
-static char *bmk1_gettest(void) {
-
- return "Benchmark, messages #1";
-}
-
static void bmk1_execute(void) {
uint32_t n;
@@ -121,7 +116,7 @@ static void bmk1_execute(void) { }
const struct testcase testbmk1 = {
- bmk1_gettest,
+ "Benchmark, messages #1",
NULL,
NULL,
bmk1_execute
@@ -136,11 +131,6 @@ const struct testcase testbmk1 = { * printed in the output log.
*/
-static char *bmk2_gettest(void) {
-
- return "Benchmark, messages #2";
-}
-
static void bmk2_execute(void) {
uint32_t n;
@@ -155,7 +145,7 @@ static void bmk2_execute(void) { }
const struct testcase testbmk2 = {
- bmk2_gettest,
+ "Benchmark, messages #2",
NULL,
NULL,
bmk2_execute
@@ -176,11 +166,6 @@ static msg_t thread2(void *p) { * printed in the output log.
*/
-static char *bmk3_gettest(void) {
-
- return "Benchmark, messages #3";
-}
-
static void bmk3_execute(void) {
uint32_t n;
@@ -199,7 +184,7 @@ static void bmk3_execute(void) { }
const struct testcase testbmk3 = {
- bmk3_gettest,
+ "Benchmark, messages #3",
NULL,
NULL,
bmk3_execute
@@ -215,11 +200,6 @@ const struct testcase testbmk3 = { * iterations after a second of continuous operations.
*/
-static char *bmk4_gettest(void) {
-
- return "Benchmark, context switch";
-}
-
msg_t thread4(void *p) {
msg_t msg;
Thread *self = chThdSelf();
@@ -265,7 +245,7 @@ static void bmk4_execute(void) { }
const struct testcase testbmk4 = {
- bmk4_gettest,
+ "Benchmark, context switch",
NULL,
NULL,
bmk4_execute
@@ -282,11 +262,6 @@ const struct testcase testbmk4 = { * a second of continuous operations.
*/
-static char *bmk5_gettest(void) {
-
- return "Benchmark, threads, full cycle";
-}
-
static void bmk5_execute(void) {
uint32_t n = 0;
@@ -307,7 +282,7 @@ static void bmk5_execute(void) { }
const struct testcase testbmk5 = {
- bmk5_gettest,
+ "Benchmark, threads, full cycle",
NULL,
NULL,
bmk5_execute
@@ -326,11 +301,6 @@ const struct testcase testbmk5 = { * a second of continuous operations.
*/
-static char *bmk6_gettest(void) {
-
- return "Benchmark, threads, create only";
-}
-
static void bmk6_execute(void) {
uint32_t n = 0;
@@ -351,7 +321,7 @@ static void bmk6_execute(void) { }
const struct testcase testbmk6 = {
- bmk6_gettest,
+ "Benchmark, threads, create only",
NULL,
NULL,
bmk6_execute
@@ -376,11 +346,6 @@ static msg_t thread3(void *p) { return 0;
}
-static char *bmk7_gettest(void) {
-
- return "Benchmark, mass reschedule, 5 threads";
-}
-
static void bmk7_setup(void) {
chSemInit(&sem1, 0);
@@ -417,7 +382,7 @@ static void bmk7_execute(void) { }
const struct testcase testbmk7 = {
- bmk7_gettest,
+ "Benchmark, mass reschedule, 5 threads",
bmk7_setup,
NULL,
bmk7_execute
@@ -448,11 +413,6 @@ static msg_t thread8(void *p) { return 0;
}
-static char *bmk8_gettest(void) {
-
- return "Benchmark, round robin context switching";
-}
-
static void bmk8_execute(void) {
uint32_t n;
@@ -475,7 +435,7 @@ static void bmk8_execute(void) { }
const struct testcase testbmk8 = {
- bmk8_gettest,
+ "Benchmark, round robin context switching",
NULL,
NULL,
bmk8_execute
@@ -491,11 +451,6 @@ const struct testcase testbmk8 = { * a second of continuous operations.
*/
-static char *bmk9_gettest(void) {
-
- return "Benchmark, I/O Queues throughput";
-}
-
static void bmk9_execute(void) {
uint32_t n;
static uint8_t ib[16];
@@ -525,7 +480,7 @@ static void bmk9_execute(void) { }
const struct testcase testbmk9 = {
- bmk9_gettest,
+ "Benchmark, I/O Queues throughput",
NULL,
NULL,
bmk9_execute
@@ -540,11 +495,6 @@ const struct testcase testbmk9 = { * a second of continuous operations.
*/
-static char *bmk10_gettest(void) {
-
- return "Benchmark, virtual timers set/reset";
-}
-
static void tmo(void *param) {(void)param;}
static void bmk10_execute(void) {
@@ -571,7 +521,7 @@ static void bmk10_execute(void) { }
const struct testcase testbmk10 = {
- bmk10_gettest,
+ "Benchmark, virtual timers set/reset",
NULL,
NULL,
bmk10_execute
@@ -587,11 +537,6 @@ const struct testcase testbmk10 = { * a second of continuous operations.
*/
-static char *bmk11_gettest(void) {
-
- return "Benchmark, semaphores wait/signal";
-}
-
static void bmk11_setup(void) {
chSemInit(&sem1, 1);
@@ -622,7 +567,7 @@ static void bmk11_execute(void) { }
const struct testcase testbmk11 = {
- bmk11_gettest,
+ "Benchmark, semaphores wait/signal",
bmk11_setup,
NULL,
bmk11_execute
@@ -639,11 +584,6 @@ const struct testcase testbmk11 = { * a second of continuous operations.
*/
-static char *bmk12_gettest(void) {
-
- return "Benchmark, mutexes lock/unlock";
-}
-
static void bmk12_setup(void) {
chMtxInit(&mtx1);
@@ -674,7 +614,7 @@ static void bmk12_execute(void) { }
const struct testcase testbmk12 = {
- bmk12_gettest,
+ "Benchmark, mutexes lock/unlock",
bmk12_setup,
NULL,
bmk12_execute
@@ -688,11 +628,6 @@ const struct testcase testbmk12 = { * The memory size of the various kernel objects is printed.
*/
-static char *bmk13_gettest(void) {
-
- return "Benchmark, RAM footprint";
-}
-
static void bmk13_execute(void) {
test_print("--- System: ");
@@ -740,7 +675,7 @@ static void bmk13_execute(void) { }
const struct testcase testbmk13 = {
- bmk13_gettest,
+ "Benchmark, RAM footprint",
NULL,
NULL,
bmk13_execute
|