From e755d5f5ec0212a2271c0597cabd206ad31aba15 Mon Sep 17 00:00:00 2001 From: Zheng Da Date: Thu, 14 Jan 2010 08:58:53 +0100 Subject: make the test program compilable. --- dde26_test/main.c | 47 ++++++++++++----------------------------------- 1 file changed, 12 insertions(+), 35 deletions(-) (limited to 'dde26_test') diff --git a/dde26_test/main.c b/dde26_test/main.c index 88d33ba6..50906779 100644 --- a/dde26_test/main.c +++ b/dde26_test/main.c @@ -17,13 +17,12 @@ #include //#include -#include -#include -#include +#include +//#include +#include +#include -#include -#include -#include +int using_std = 1; /* We define 4 initcalls and see if these are executed * in the beginning. @@ -32,10 +31,10 @@ static __init void foo(void) { printk("foo module_init\n"); } static __init void bar(void) { printk("bar device_initcall\n"); } static __init void bla(void) { printk("bla arch_initcall\n"); } static __init void blub(void) { printk("blub subsys_initcall\n"); } -module_init(foo); -device_initcall(bar); -arch_initcall(bla); -subsys_initcall(blub); +//module_init(foo); +//device_initcall(bar); +//arch_initcall(bla); +//subsys_initcall(blub); /*********************************************************************** ** Test 1: Check whether the current() macro works. ** @@ -236,7 +235,7 @@ static void timer_test(void) l4dde26_init_timers(); printk("BEGIN TIMER TEST\n"); - printk("jiffies(%p): %ld, HZ(%p): %ld\n", &jiffies, jiffies, &HZ, HZ); + printk("jiffies: %ld, HZ: %ld\n", jiffies, HZ); setup_timer(&_timer, tick_func, 0); _timer.expires = jiffies + HZ; @@ -441,28 +440,8 @@ int main(int argc, const char **argv) int test_pci = 1; msleep(1000); - - if (parse_cmdline(&argc, &argv, - 'c', "current", "test current() function", - PARSE_CMD_SWITCH, 1, &test_current, - 'k', "kernel-thread", "test startup of kernel threads", - PARSE_CMD_SWITCH, 1, &test_kernel_thread, - 'w', "waitqueue", "test wait queues", - PARSE_CMD_SWITCH, 1, &test_wait, - 't', "tasklet", "test tasklets", - PARSE_CMD_SWITCH, 1, &test_tasklet, - 'T', "timer", "test timers", - PARSE_CMD_SWITCH, 1, &test_timer, - 'm', "memory", "test memory management", - PARSE_CMD_SWITCH, 1, &test_memory, - 'K', "kthread", "test kthreads", - PARSE_CMD_SWITCH, 1, &test_kthread, - 'W', "workqueue", "test work queues", - PARSE_CMD_SWITCH, 1, &test_work, - 'p', "pci", "test PCI stuff", - PARSE_CMD_SWITCH, 1, &test_pci, - 0, 0)) - return 1; + + l4dde26_do_initcalls (); printk("DDEKit test. Carrying out tests:\n"); printk("\t* current()\n"); @@ -496,7 +475,5 @@ int main(int argc, const char **argv) // if (test_pci) pci_test(); printk("Test done.\n"); - l4_sleep_forever(); - return 0; } -- cgit v1.2.3