diff options
Diffstat (limited to 'src/user/app/init/tests')
-rw-r--r-- | src/user/app/init/tests/main.c | 6 | ||||
-rw-r--r-- | src/user/app/init/tests/pipe.c | 5 | ||||
-rw-r--r-- | src/user/app/init/tests/semaphore.c | 6 | ||||
-rw-r--r-- | src/user/app/init/tests/stress.c | 4 | ||||
-rw-r--r-- | src/user/app/init/tests/tests.h (renamed from src/user/app/init/tests/main.h) | 2 |
5 files changed, 15 insertions, 8 deletions
diff --git a/src/user/app/init/tests/main.c b/src/user/app/init/tests/main.c index 4f8e858..cf59925 100644 --- a/src/user/app/init/tests/main.c +++ b/src/user/app/init/tests/main.c @@ -1,10 +1,12 @@ #define TEST_MACROS +#include "tests.h" #include <camellia/errno.h> #include <camellia/execbuf.h> #include <camellia/flags.h> #include <camellia/syscalls.h> -#include <user/app/init/tests/main.h> -#include <user/lib/stdlib.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> static void run_forked(void (*fn)()) { if (!fork()) { diff --git a/src/user/app/init/tests/pipe.c b/src/user/app/init/tests/pipe.c index 227007a..f7005f8 100644 --- a/src/user/app/init/tests/pipe.c +++ b/src/user/app/init/tests/pipe.c @@ -1,8 +1,9 @@ #define TEST_MACROS +#include "tests.h" #include <camellia/flags.h> #include <camellia/syscalls.h> -#include <user/app/init/tests/main.h> -#include <user/lib/stdlib.h> +#include <string.h> +#include <unistd.h> static const char *pipe_msgs[2] = {"hello", "world"}; diff --git a/src/user/app/init/tests/semaphore.c b/src/user/app/init/tests/semaphore.c index b55db9e..fc0cc10 100644 --- a/src/user/app/init/tests/semaphore.c +++ b/src/user/app/init/tests/semaphore.c @@ -1,9 +1,11 @@ #define TEST_MACROS +#include "tests.h" #include <camellia/flags.h> #include <camellia/syscalls.h> -#include <user/app/init/tests/main.h> +#include <stdio.h> +#include <string.h> +#include <unistd.h> #include <user/lib/esemaphore.h> -#include <user/lib/stdlib.h> static void odd(handle_t out, struct evil_sem *sem1, struct evil_sem *sem2) { _syscall_write(out, "1", 1, -1); diff --git a/src/user/app/init/tests/stress.c b/src/user/app/init/tests/stress.c index f797611..e620f0a 100644 --- a/src/user/app/init/tests/stress.c +++ b/src/user/app/init/tests/stress.c @@ -1,8 +1,8 @@ #define TEST_MACROS +#include "tests.h" #include <camellia/flags.h> #include <camellia/syscalls.h> -#include <user/app/init/tests/main.h> -#include <user/lib/stdlib.h> +#include <unistd.h> static void run_forked(void (*fn)()) { if (!fork()) { diff --git a/src/user/app/init/tests/main.h b/src/user/app/init/tests/tests.h index ed11c5e..23ed1e3 100644 --- a/src/user/app/init/tests/main.h +++ b/src/user/app/init/tests/tests.h @@ -1,4 +1,6 @@ #pragma once +#include <camellia/syscalls.h> +#include <stdio.h> void stress_all(void); void test_all(void); |