summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2010-09-11 20:52:53 +0200
committerAlexis211 <alexis211@gmail.com>2010-09-11 20:52:53 +0200
commit43c6a4a1e7d76e82b9a1d4757c5b5c12f92905d7 (patch)
tree29303de9de469bdb156c1e7c0a26e2290d4d6393
parenta8da6dba7ddc5e3d31a1914597e7b38fbc2d197c (diff)
downloadTCE-43c6a4a1e7d76e82b9a1d4757c5b5c12f92905d7.tar.gz
TCE-43c6a4a1e7d76e82b9a1d4757c5b5c12f92905d7.zip
Minor changes to display.
-rw-r--r--src/kernel/core/test.c14
-rw-r--r--src/modules/test/main.c2
2 files changed, 7 insertions, 9 deletions
diff --git a/src/kernel/core/test.c b/src/kernel/core/test.c
index 77c7029..fa26c7b 100644
--- a/src/kernel/core/test.c
+++ b/src/kernel/core/test.c
@@ -3,16 +3,14 @@
#include <mem/mem.h>
#include "sys.h"
-#define TEST_KMALLOC(var, sz) monitor_write("kmalloc:"); monitor_writeHex(sz); void *var = kmalloc(sz); \
- if (var < 0xE0000000) { monitor_write(":FAIL\t"); PANIC("A test failed."); } \
- else monitor_write(":OK:"); monitor_writeHex(var); monitor_write("\t");
-#define TEST_KFREE(var) if (var != 0) { monitor_write("kfree:"); monitor_writeHex(var); kfree(var); monitor_write(":OK\t"); }
+#define TEST_KMALLOC(var, sz) void *var = kmalloc(sz); ASSERT(var > 0xE0000000);
+#define TEST_KFREE(var) if (var != 0) { kfree(var); }
void test_run() {
- monitor_write("Run kmalloc() and kfree() unit tests:\n");
+ monitor_write("Unit tests:\n\tkmalloc:");
int i;
- for (i = 1; i <= 5; i++) {
- monitor_write("\nMALLOC TEST SERIES #"); monitor_writeDec(i); monitor_write(":\n");
+ for (i = 1; i <= 7; i++) {
+ monitor_write(" #"); monitor_writeDec(i);
TEST_KMALLOC(a, 32);
TEST_KMALLOC(b, 64);
TEST_KMALLOC(c, 256);
@@ -27,5 +25,5 @@ void test_run() {
TEST_KFREE(f);
TEST_KFREE(g);
}
- monitor_write("\nUnit tests finished.\n");
+ monitor_write("\n >> Tests OK\n");
}
diff --git a/src/modules/test/main.c b/src/modules/test/main.c
index 8085007..26ff840 100644
--- a/src/modules/test/main.c
+++ b/src/modules/test/main.c
@@ -23,7 +23,7 @@ void thread_cascade(void* d) {
}
int main() {
- printk("Hi world from unregistered test module !\n");
+ printk("Hi world from test module !\n");
printk("{1} Creating thread cascade len:1\n");
thread_new(thread_cascade, (void*)1);