From ebf004583cb56ce231287d4027c1d3751c278e47 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 18 Mar 2016 01:41:46 +0000 Subject: [PATCH] tests: Fixup startup of tests so they don't core Tests were not even compiling due to non updated API changes. Additionally tests were core'ing after compile issue because the vrf subsystem is being used now and it needs to be initialized. Signed-off-by: Donald Sharp --- tests/bgp_capability_test.c | 3 ++- tests/bgp_mp_attr_test.c | 3 ++- tests/bgp_mpath_test.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/bgp_capability_test.c b/tests/bgp_capability_test.c index c981504e54..c31b133754 100644 --- a/tests/bgp_capability_test.c +++ b/tests/bgp_capability_test.c @@ -615,12 +615,13 @@ main (void) master = thread_master_create (); bgp_master_init (); + vrf_init (); bgp_option_set (BGP_OPT_NO_LISTEN); if (fileno (stdout) >= 0) tty = isatty (fileno (stdout)); - if (bgp_get (&bgp, &asn, NULL)) + if (bgp_get (&bgp, &asn, NULL, BGP_INSTANCE_TYPE_DEFAULT)) return -1; peer = peer_create_accept (bgp); diff --git a/tests/bgp_mp_attr_test.c b/tests/bgp_mp_attr_test.c index 10369cc74f..3968fa35f7 100644 --- a/tests/bgp_mp_attr_test.c +++ b/tests/bgp_mp_attr_test.c @@ -512,12 +512,13 @@ main (void) master = thread_master_create (); bgp_master_init (); + vrf_init (); bgp_option_set (BGP_OPT_NO_LISTEN); if (fileno (stdout) >= 0) tty = isatty (fileno (stdout)); - if (bgp_get (&bgp, &asn, NULL)) + if (bgp_get (&bgp, &asn, NULL, BGP_INSTANCE_TYPE_DEFAULT)) return -1; peer = peer_create_accept (bgp); diff --git a/tests/bgp_mpath_test.c b/tests/bgp_mpath_test.c index 3b0a3de052..1c6eaf7cb6 100644 --- a/tests/bgp_mpath_test.c +++ b/tests/bgp_mpath_test.c @@ -376,6 +376,7 @@ global_test_init (void) master = thread_master_create (); zclient = zclient_new(master); bgp_master_init (); + vrf_init (); bgp_option_set (BGP_OPT_NO_LISTEN); if (fileno (stdout) >= 0) -- 2.39.5