tests: make tests happy for pthread changes

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2018-01-24 15:53:07 -05:00
parent a715eab3ce
commit cadc5f3377
No known key found for this signature in database
GPG Key ID: DAF48E0F57E0834F
2 changed files with 10 additions and 2 deletions

View File

@ -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);

View File

@ -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));