summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-03-18 02:41:46 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-03-18 14:36:04 +0100
commitebf004583cb56ce231287d4027c1d3751c278e47 (patch)
treef4076989276856f606c17b1875af96ea2602e2bf /tests
parentMakfile issues to compile better (diff)
downloadfrr-ebf004583cb56ce231287d4027c1d3751c278e47.tar.xz
frr-ebf004583cb56ce231287d4027c1d3751c278e47.zip
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 <sharpd@cumulusnetworks.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bgp_capability_test.c3
-rw-r--r--tests/bgp_mp_attr_test.c3
-rw-r--r--tests/bgp_mpath_test.c1
3 files changed, 5 insertions, 2 deletions
diff --git a/tests/bgp_capability_test.c b/tests/bgp_capability_test.c
index c981504e5..c31b13375 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 10369cc74..3968fa35f 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 3b0a3de05..1c6eaf7cb 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)