Browse Source

tests: BGP unit tests to set BGP_OPT_NO_LISTEN so they can run

BGP tests had been broken by auto-creation of listen socket. This allows
them to run at least, though at least 1 test seems to have other breakage,
aspath_test.
Paul Jakma 8 years ago
parent
commit
c9e4f86236
4 changed files with 5 additions and 1 deletions
  1. 1 0
      tests/aspath_test.c
  2. 1 0
      tests/bgp_capability_test.c
  3. 1 0
      tests/bgp_mp_attr_test.c
  4. 2 1
      tests/bgp_mpath_test.c

+ 1 - 0
tests/aspath_test.c

@@ -1259,6 +1259,7 @@ main (void)
   int i = 0;
   bgp_master_init ();
   master = bm->master;
+  bgp_option_set (BGP_OPT_NO_LISTEN);
   bgp_attr_init ();
   
   while (test_segments[i].name)

+ 1 - 0
tests/bgp_capability_test.c

@@ -618,6 +618,7 @@ main (void)
   
   master = thread_master_create ();
   bgp_master_init ();
+  bgp_option_set (BGP_OPT_NO_LISTEN);
   
   if (fileno (stdout) >= 0) 
     tty = isatty (fileno (stdout));

+ 1 - 0
tests/bgp_mp_attr_test.c

@@ -515,6 +515,7 @@ main (void)
   
   master = thread_master_create ();
   bgp_master_init ();
+  bgp_option_set (BGP_OPT_NO_LISTEN);
   
   if (fileno (stdout) >= 0) 
     tty = isatty (fileno (stdout));

+ 2 - 1
tests/bgp_mpath_test.c

@@ -378,7 +378,8 @@ global_test_init (void)
   master = thread_master_create ();
   zclient = zclient_new ();
   bgp_master_init ();
-
+  bgp_option_set (BGP_OPT_NO_LISTEN);
+  
   if (fileno (stdout) >= 0)
     tty = isatty (fileno (stdout));
   return 0;