diff options
Diffstat (limited to 'lib/flowspec_test.c')
-rw-r--r-- | lib/flowspec_test.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/flowspec_test.c b/lib/flowspec_test.c index 518b8fc7..03649b99 100644 --- a/lib/flowspec_test.c +++ b/lib/flowspec_test.c @@ -8,7 +8,6 @@ #include "test/birdtest.h" #include "lib/flowspec.h" -#include "lib/io-loop.h" #define NET_ADDR_FLOW4_(what,prefix,pxlen,data_) \ do \ @@ -448,7 +447,6 @@ static int t_builder4(void) { struct flow_builder *fb = flow_builder_init(&root_pool); - linpool *lp = lp_new_default(&root_pool); /* Expectation */ @@ -491,7 +489,7 @@ t_builder4(void) flow_builder_set_type(fb, FLOW_TYPE_TCP_FLAGS); flow_builder_add_op_val(fb, 0, 0x55); - net_addr_flow4 *res = flow_builder4_finalize(fb, lp); + net_addr_flow4 *res = flow_builder4_finalize(fb, tmp_linpool); bt_assert(memcmp(res, expect, expect->length) == 0); @@ -528,7 +526,6 @@ t_builder6(void) { net_addr_ip6 ip; - linpool *lp = lp_new_default(&root_pool); struct flow_builder *fb = flow_builder_init(&root_pool); fb->ipv6 = 1; @@ -572,7 +569,7 @@ t_builder6(void) flow_builder_set_type(fb, FLOW_TYPE_LABEL); flow_builder_add_op_val(fb, 0, 0x55); - net_addr_flow6 *res = flow_builder6_finalize(fb, lp); + net_addr_flow6 *res = flow_builder6_finalize(fb, tmp_linpool); bt_assert(memcmp(res, expect, expect->length) == 0); /* Reverse order */ @@ -599,7 +596,7 @@ t_builder6(void) flow_builder_set_type(fb, FLOW_TYPE_DST_PREFIX); flow_builder6_add_pfx(fb, &ip, 61); - res = flow_builder6_finalize(fb, lp); + res = flow_builder6_finalize(fb, tmp_linpool); bt_assert(memcmp(res, expect, expect->length) == 0); return 1; @@ -664,16 +661,10 @@ t_formatting6(void) return 1; } -void resource_sys_init(void); - int main(int argc, char *argv[]) { bt_init(argc, argv); - resource_sys_init(); - resource_init(); - the_bird_lock(); - birdloop_init(); bt_test_suite(t_read_length, "Testing get NLRI length"); bt_test_suite(t_write_length, "Testing set NLRI length"); @@ -689,6 +680,5 @@ main(int argc, char *argv[]) bt_test_suite(t_formatting4, "Formatting Flow Specification (IPv4) into text representation"); bt_test_suite(t_formatting6, "Formatting Flow Specification (IPv6) into text representation"); - the_bird_unlock(); return bt_exit_value(); } |