]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: Fixup startup of tests so they don't core
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 18 Mar 2016 01:41:46 +0000 (01:41 +0000)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 18 Mar 2016 13:36:04 +0000 (09:36 -0400)
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 <sharpd@cumulusnetworks.com>
tests/bgp_capability_test.c
tests/bgp_mp_attr_test.c
tests/bgp_mpath_test.c

index c981504e546825b8b86eba64a82bbd88a0a9d471..c31b1337548914f50488506e4733b5e2c4899fb1 100644 (file)
@@ -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);
index 10369cc74f26e1089a59a365cdcfce03ef4ab821..3968fa35f74c1beee2be684ffdc7de32660e98b1 100644 (file)
@@ -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);
index 3b0a3de0527cb3a4bcea2ea14c130581e0872fe5..1c6eaf7cb616779858c96986a32366f7834a76a9 100644 (file)
@@ -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)