Skip to content

Commit

Permalink
tests: Fix flaky "controller event".
Browse files Browse the repository at this point in the history
ovn-nbctl wait sync wasn't enough to guarantee that the injected
packet was handled by ovs.

Signed-off-by: Xavier Simonart <[email protected]>
Signed-off-by: 0-day Robot <[email protected]>
  • Loading branch information
simonartxavier authored and ovsrobot committed Dec 10, 2024
1 parent 944a01f commit 8385488
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -22498,8 +22498,8 @@ packet0="inport==\"sw0-p11\" && eth.src==00:00:00:00:00:11 && eth.dst==00:00:00:
ip4 && ip.ttl==64 && ip4.src==192.168.1.11 && ip4.dst==192.168.1.100 &&
tcp && tcp.src==10000 && tcp.dst==80"
OVS_WAIT_UNTIL([as hv1 ovs-appctl -t ovn-controller inject-pkt "$packet0"])
check ovn-nbctl --wait=hv sync

wait_row_count controller_event 1
ovn-sbctl list controller_event > events
AT_CAPTURE_FILE([events])
uuid=$(awk '/_uuid/{print $3}' < events)
Expand Down Expand Up @@ -22527,7 +22527,7 @@ packet1="inport==\"sw1-p0\" && eth.src==00:00:00:00:00:33 && eth.dst==00:00:00:0
tcp && tcp.src==10000 && tcp.dst==80"

OVS_WAIT_UNTIL([as hv1 ovs-appctl -t ovn-controller inject-pkt "$packet1"])
check ovn-nbctl --wait=hv sync
wait_row_count controller_event 1
ovn-sbctl list controller_event
uuid=$(ovn-sbctl list controller_event | awk '/_uuid/{print $3}')
AT_CHECK([ovn-sbctl get controller_event $uuid event_type], [0], [dnl
Expand All @@ -22543,7 +22543,7 @@ packet2="inport==\"sw0-p11\" && eth.src==00:00:00:00:00:11 && eth.dst==00:00:00:
tcp && tcp.src==10000 && tcp.dst==50051"

OVS_WAIT_UNTIL([as hv1 ovs-appctl -t ovn-controller inject-pkt "$packet2"])
check ovn-nbctl --wait=hv sync
wait_row_count controller_event 1
ovn-sbctl list controller_event
uuid=$(ovn-sbctl list controller_event | awk '/_uuid/{print $3}')

Expand Down

0 comments on commit 8385488

Please sign in to comment.