Skip to content

Commit

Permalink
tests: make tests happy for pthread changes
Browse files Browse the repository at this point in the history
Signed-off-by: Quentin Young <[email protected]>
  • Loading branch information
qlyoung committed Jan 24, 2018
1 parent a715eab commit cadc5f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion tests/bgpd/test_aspath.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 5 additions & 1 deletion tests/bgpd/test_capability.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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));

Expand Down

0 comments on commit cadc5f3

Please sign in to comment.