summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/birdtest.c5
-rw-r--r--test/bt-utils.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/test/birdtest.c b/test/birdtest.c
index a1da078f..c6a09684 100644
--- a/test/birdtest.c
+++ b/test/birdtest.c
@@ -58,11 +58,14 @@ u64 bt_random_state[] = {
0x53d9772877c1b647, 0xab8ce3eb466de6c5, 0xad02844c8a8e865f, 0xe8cc78080295065d
};
+void resource_sys_init(void);
+
void
bt_init(int argc, char *argv[])
{
int c;
+ resource_sys_init();
initstate(BT_RANDOM_SEED, (char *) bt_random_state, sizeof(bt_random_state));
bt_verbose = 0;
@@ -240,7 +243,7 @@ bt_log_result(int result, u64 time, const char *fmt, va_list argptr)
printf("%s\n", result_str);
if (do_die && !result)
- abort();
+ exit(1);
}
static u64
diff --git a/test/bt-utils.c b/test/bt-utils.c
index cbca3a6b..98aaed3d 100644
--- a/test/bt-utils.c
+++ b/test/bt-utils.c
@@ -53,16 +53,20 @@ cf_file_read(byte *dest, uint max_len, int fd)
return l;
}
+void resource_sys_init(void);
+
void
bt_bird_init(void)
{
+ resource_sys_init();
if(bt_verbose)
log_init_debug("");
log_switch(bt_verbose != 0, NULL, NULL);
+ the_bird_lock();
resource_init();
+ birdloop_init();
olock_init();
- timer_init();
io_init();
rt_init();
if_init();
@@ -79,6 +83,7 @@ void bt_bird_cleanup(void)
class_to_protocol[i] = NULL;
config = new_config = NULL;
+ the_bird_unlock();
}
static char *