From fd153e305d0088a1c0ee7d8c26e997fa48bd1c9a Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Mon, 12 Nov 2018 18:06:46 +0100 Subject: [PATCH] fix self test --- core/main.c | 3 +++ tests/test.c | 5 ++--- tests/test.h | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/main.c b/core/main.c index c3817e1..eece175 100644 --- a/core/main.c +++ b/core/main.c @@ -63,6 +63,9 @@ void kmain(unsigned long magic, unsigned long addr) printf("Setting up Pagination\n"); paddr_t lastUserByMem; memSetup(upper_mem, &lastUserByMem); +#ifdef RUN_TEST + testPhymem(); +#endif pagingSetup(lastUserByMem); printf("Setting up IRQ handlers\n"); diff --git a/tests/test.c b/tests/test.c index a92b09e..c5662df 100644 --- a/tests/test.c +++ b/tests/test.c @@ -3,7 +3,7 @@ #include "serial.h" #include "vga.h" -static void testPhymem() +void testPhymem(void) { printf("Testing memory PHY\n"); struct mem_desc *allocated_page_list; @@ -38,9 +38,8 @@ static void testPhymem() } } -void run_test() +void run_test(void) { - testPhymem(); printf("Testing Serial"); serialWrite('h'); serialWrite('e'); diff --git a/tests/test.h b/tests/test.h index 3715a92..b05cda1 100644 --- a/tests/test.h +++ b/tests/test.h @@ -1,3 +1,4 @@ #pragma once -void run_test(); +void testPhymem(void); +void run_test(void);