diff options
author | Richard Braun <rbraun@sceen.net> | 2018-02-10 11:19:11 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2018-02-12 21:09:21 +0100 |
commit | 0215812c408cdfe879363759290d522573c565e7 (patch) | |
tree | 36648ccc3c3c14b7d52c66b42c0783a75c3f45d2 | |
parent | 18542cebec31c29b210fb3a423a1ec9392b875f5 (diff) |
test: define test_setup as an __init function
-rw-r--r-- | test/test_llsync_defer.c | 3 | ||||
-rw-r--r-- | test/test_mutex.c | 3 | ||||
-rw-r--r-- | test/test_mutex_pi.c | 3 | ||||
-rw-r--r-- | test/test_pmap_update_mp.c | 3 | ||||
-rw-r--r-- | test/test_sref_dirty_zeroes.c | 3 | ||||
-rw-r--r-- | test/test_sref_noref.c | 3 | ||||
-rw-r--r-- | test/test_sref_weakref.c | 3 | ||||
-rw-r--r-- | test/test_vm_page_fill.c | 3 | ||||
-rw-r--r-- | test/test_xcall.c | 5 |
9 files changed, 19 insertions, 10 deletions
diff --git a/test/test_llsync_defer.c b/test/test_llsync_defer.c index c87aff77..b57efc29 100644 --- a/test/test_llsync_defer.c +++ b/test/test_llsync_defer.c @@ -34,6 +34,7 @@ #include <kern/condition.h> #include <kern/error.h> +#include <kern/init.h> #include <kern/kmem.h> #include <kern/llsync.h> #include <kern/macros.h> @@ -185,7 +186,7 @@ test_read(void *arg) } } -void +void __init test_setup(void) { struct thread_attr attr; diff --git a/test/test_mutex.c b/test/test_mutex.c index 029e2fee..684ec1b5 100644 --- a/test/test_mutex.c +++ b/test/test_mutex.c @@ -33,6 +33,7 @@ #include <kern/atomic.h> #include <kern/clock.h> #include <kern/error.h> +#include <kern/init.h> #include <kern/kmem.h> #include <kern/log.h> #include <kern/mutex.h> @@ -161,7 +162,7 @@ test_report_syscnt(struct timer *timer) timer_schedule(timer, time); } -void +void __init test_setup(void) { uint64_t time; diff --git a/test/test_mutex_pi.c b/test/test_mutex_pi.c index ef470488..4332a91d 100644 --- a/test/test_mutex_pi.c +++ b/test/test_mutex_pi.c @@ -80,6 +80,7 @@ #include <kern/cpumap.h> #include <kern/error.h> +#include <kern/init.h> #include <kern/mutex.h> #include <kern/panic.h> #include <kern/syscnt.h> @@ -416,7 +417,7 @@ test_e(void *arg) } } -void +void __init test_setup(void) { struct thread_attr attr; diff --git a/test/test_pmap_update_mp.c b/test/test_pmap_update_mp.c index c058323a..7b6431a0 100644 --- a/test/test_pmap_update_mp.c +++ b/test/test_pmap_update_mp.c @@ -31,6 +31,7 @@ #include <kern/condition.h> #include <kern/cpumap.h> #include <kern/error.h> +#include <kern/init.h> #include <kern/mutex.h> #include <kern/panic.h> #include <kern/thread.h> @@ -94,7 +95,7 @@ test_run2(void *arg) printf("done\n"); } -void +void __init test_setup(void) { struct thread_attr attr; diff --git a/test/test_sref_dirty_zeroes.c b/test/test_sref_dirty_zeroes.c index 6fcf9767..53183358 100644 --- a/test/test_sref_dirty_zeroes.c +++ b/test/test_sref_dirty_zeroes.c @@ -31,6 +31,7 @@ #include <kern/condition.h> #include <kern/error.h> +#include <kern/init.h> #include <kern/kmem.h> #include <kern/macros.h> #include <kern/mutex.h> @@ -101,7 +102,7 @@ test_noref(struct sref_counter *counter) panic("0 references, page released\n"); } -void +void __init test_setup(void) { struct thread_attr attr; diff --git a/test/test_sref_noref.c b/test/test_sref_noref.c index 71990e27..40f1d8fe 100644 --- a/test/test_sref_noref.c +++ b/test/test_sref_noref.c @@ -37,6 +37,7 @@ #include <kern/condition.h> #include <kern/error.h> +#include <kern/init.h> #include <kern/kmem.h> #include <kern/macros.h> #include <kern/mutex.h> @@ -168,7 +169,7 @@ test_run(void *arg) kmem_free(threads, sizeof(*threads) * nr_threads); } -void +void __init test_setup(void) { struct thread_attr attr; diff --git a/test/test_sref_weakref.c b/test/test_sref_weakref.c index f1396c39..d1d44071 100644 --- a/test/test_sref_weakref.c +++ b/test/test_sref_weakref.c @@ -36,6 +36,7 @@ #include <stdio.h> #include <kern/error.h> +#include <kern/init.h> #include <kern/macros.h> #include <kern/sref.h> #include <kern/syscnt.h> @@ -101,7 +102,7 @@ test_ref(void *arg) } } -void +void __init test_setup(void) { struct thread_attr attr; diff --git a/test/test_vm_page_fill.c b/test/test_vm_page_fill.c index 0b4278bf..2f6e644b 100644 --- a/test/test_vm_page_fill.c +++ b/test/test_vm_page_fill.c @@ -28,6 +28,7 @@ #include <kern/cpumap.h> #include <kern/error.h> +#include <kern/init.h> #include <kern/list.h> #include <kern/thread.h> #include <machine/page.h> @@ -134,7 +135,7 @@ test_run(void *arg) } } -void +void __init test_setup(void) { struct thread_attr attr; diff --git a/test/test_xcall.c b/test/test_xcall.c index 39f08310..c2fc54bc 100644 --- a/test/test_xcall.c +++ b/test/test_xcall.c @@ -25,8 +25,9 @@ #include <stddef.h> #include <stdio.h> -#include <kern/error.h> #include <kern/cpumap.h> +#include <kern/error.h> +#include <kern/init.h> #include <kern/log.h> #include <kern/panic.h> #include <kern/thread.h> @@ -122,7 +123,7 @@ test_run(void *arg) log_info("done\n"); } -void +void __init test_setup(void) { struct thread_attr attr; |