From: Donald Sharp Date: Fri, 18 Mar 2016 01:41:46 +0000 (+0000) Subject: tests: Fixup startup of tests so they don't core X-Git-Tag: frr-2.0-rc1~1053 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=ebf004583cb56ce231287d4027c1d3751c278e47;p=mirror%2Ffrr.git 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 --- 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)