Skip to content

Commit

Permalink
tests: Fix flaky BFD system test.
Browse files Browse the repository at this point in the history
Wait for bfdd-beacon to properly start.
Using the NETNS_DAEMONIZE macro, we also guarantee that the last
bfdd-beacon is also stopped at exit.

Signed-off-by: Xavier Simonart <[email protected]>
Acked-by: Mark Michelson <[email protected]>
Signed-off-by: Mark Michelson <[email protected]>
  • Loading branch information
simonartxavier authored and putnopvut committed Sep 11, 2024
1 parent 55e270f commit c4a6c06
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/system-ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -6920,7 +6920,8 @@ check ovn-nbctl lsp-add public public1 \
-- lsp-set-type public1 localnet \
-- lsp-set-options public1 network_name=phynet

NS_CHECK_EXEC([server], [bfdd-beacon --listen=172.16.1.50], [0])
NETNS_DAEMONIZE([server], [bfdd-beacon --nofork --tee --listen=172.16.1.50 >beacon.stdout 2>&1], [beacon.pid])
OVS_WAIT_UNTIL([grep -q "Listening for BFD connections" beacon.stdout])
NS_CHECK_EXEC([server], [bfdd-control allow 172.16.1.1], [0], [dnl
Allowing connections from 172.16.1.1
])
Expand Down Expand Up @@ -6980,7 +6981,8 @@ check ovn-nbctl set logical_router R1 options:chassis=hv1
check ovn-nbctl set logical_router_static_route $route_uuid bfd=$uuid

# restart bfdd
NS_CHECK_EXEC([server], [bfdd-beacon --listen=172.16.1.50], [0])
NETNS_DAEMONIZE([server], [bfdd-beacon --nofork --tee --listen=172.16.1.50 >beacon.stdout 2>&1], [beacon.pid])
OVS_WAIT_UNTIL([grep -q "Listening for BFD connections" beacon.stdout])
NS_CHECK_EXEC([server], [bfdd-control allow 172.16.1.1], [0], [dnl
Allowing connections from 172.16.1.1
])
Expand Down Expand Up @@ -7022,7 +7024,8 @@ check ovn-nbctl lr-route-add R1 2000::/64 1000::b
route_uuid_v6=$(fetch_column nb:logical_router_static_route _uuid ip_prefix=\"2000::/64\")
ovn-nbctl set logical_router_static_route $route_uuid_v6 bfd=$uuid_v6
check ovn-nbctl --wait=hv sync
NS_CHECK_EXEC([server], [bfdd-beacon --listen=1000::b], [0])
NETNS_DAEMONIZE([server], [bfdd-beacon --nofork --tee --listen=1000::b >beacon.stdout 2>&1], [beacon.pid])
OVS_WAIT_UNTIL([grep -q "Listening for BFD connections" beacon.stdout])
NS_CHECK_EXEC([server], [bfdd-control allow 1000::a], [0], [dnl
Allowing connections from 1000::a
])
Expand Down

0 comments on commit c4a6c06

Please sign in to comment.