diff options
author | Paul Jakma <paul@quagga.net> | 2012-06-14 11:42:39 +0200 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2012-06-19 14:40:22 +0200 |
commit | c9e4f8623642fc005c97830256000bef5680aa26 (patch) | |
tree | 00a40a75d31cf30727c6dabf8066054e72092647 /tests | |
parent | bgpd: Add "no listen" socket option for the BGP master configuration (diff) | |
download | frr-c9e4f8623642fc005c97830256000bef5680aa26.tar.xz frr-c9e4f8623642fc005c97830256000bef5680aa26.zip |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/aspath_test.c | 1 | ||||
-rw-r--r-- | tests/bgp_capability_test.c | 1 | ||||
-rw-r--r-- | tests/bgp_mp_attr_test.c | 1 | ||||
-rw-r--r-- | tests/bgp_mpath_test.c | 3 |
4 files changed, 5 insertions, 1 deletions
diff --git a/tests/aspath_test.c b/tests/aspath_test.c index 83eb9d808..9170455fb 100644 --- a/tests/aspath_test.c +++ b/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) diff --git a/tests/bgp_capability_test.c b/tests/bgp_capability_test.c index 83da2e48f..65c6a7002 100644 --- a/tests/bgp_capability_test.c +++ b/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)); diff --git a/tests/bgp_mp_attr_test.c b/tests/bgp_mp_attr_test.c index 1a48f4b74..f086740fd 100644 --- a/tests/bgp_mp_attr_test.c +++ b/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)); diff --git a/tests/bgp_mpath_test.c b/tests/bgp_mpath_test.c index 15e450a20..3d0ecb78b 100644 --- a/tests/bgp_mpath_test.c +++ b/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; |