diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-01-24 21:53:07 +0100 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-01-24 21:53:07 +0100 |
commit | cadc5f3377eec33c17e5cc230b0671c884c3fcca (patch) | |
tree | 662e839e85d8d8490c450c1824323760d61cf291 | |
parent | bgpd: update pthreads to use lib changes (diff) | |
download | frr-cadc5f3377eec33c17e5cc230b0671c884c3fcca.tar.xz frr-cadc5f3377eec33c17e5cc230b0671c884c3fcca.zip |
tests: make tests happy for pthread changes
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
-rw-r--r-- | tests/bgpd/test_aspath.c | 6 | ||||
-rw-r--r-- | tests/bgpd/test_capability.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/tests/bgpd/test_aspath.c b/tests/bgpd/test_aspath.c index 56808bc8a..9e5cb7fe5 100644 --- a/tests/bgpd/test_aspath.c +++ b/tests/bgpd/test_aspath.c @@ -25,8 +25,9 @@ #include "privs.h" #include "queue.h" #include "filter.h" +#include "frr_pthread.h" -#include "bgpd/bgpd.h" +#include "bgpd/bgpd.c" #include "bgpd/bgp_aspath.h" #include "bgpd/bgp_attr.h" #include "bgpd/bgp_packet.h" @@ -1272,6 +1273,9 @@ static int handle_attr_test(struct aspath_tests *t) struct aspath *asp; size_t datalen; + bgp_pthreads_init(); + frr_pthread_get(PTHREAD_KEEPALIVES)->running = true; + asp = make_aspath(t->segment->asdata, t->segment->len, 0); peer.curr = stream_new(BGP_MAX_PACKET_SIZE); diff --git a/tests/bgpd/test_capability.c b/tests/bgpd/test_capability.c index a5092708e..3d5518f3b 100644 --- a/tests/bgpd/test_capability.c +++ b/tests/bgpd/test_capability.c @@ -27,8 +27,9 @@ #include "memory.h" #include "queue.h" #include "filter.h" +#include "frr_pthread.h" -#include "bgpd/bgpd.h" +#include "bgpd/bgpd.c" #include "bgpd/bgp_open.h" #include "bgpd/bgp_debug.h" #include "bgpd/bgp_packet.h" @@ -915,6 +916,9 @@ int main(void) vrf_init(NULL, NULL, NULL, NULL); bgp_option_set(BGP_OPT_NO_LISTEN); + bgp_pthreads_init(); + frr_pthread_get(PTHREAD_KEEPALIVES)->running = true; + if (fileno(stdout) >= 0) tty = isatty(fileno(stdout)); |