Skip to content

Commit

Permalink
Ensure that dumped OF flows in ovn tests include counters
Browse files Browse the repository at this point in the history
Signed-off-by: RYAN D. MOATS <[email protected]>
Signed-off-by: Russell Bryant <[email protected]>
  • Loading branch information
jayhawk87 authored and russellb committed Mar 24, 2016
1 parent 60bdd01 commit bb0c41d
Showing 1 changed file with 47 additions and 43 deletions.
90 changes: 47 additions & 43 deletions tests/ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -591,19 +591,6 @@ ovn_populate_arp
# Allow some time for ovn-northd and ovn-controller to catch up.
# XXX This should be more systematic.
sleep 1
ovn-sbctl dump-flows -- list multicast_group

echo "------ hv1 dump ------"
as hv1 ovs-vsctl show
as hv1 ovs-ofctl -O OpenFlow13 dump-flows br-int

echo "------ hv2 dump ------"
as hv2 ovs-vsctl show
as hv2 ovs-ofctl -O OpenFlow13 dump-flows br-int

echo "------ hv3 dump ------"
as hv3 ovs-vsctl show
as hv3 ovs-ofctl -O OpenFlow13 dump-flows br-int

# Given the name of a logical port, prints the name of the hypervisor
# on which it is located.
Expand Down Expand Up @@ -787,6 +774,20 @@ test_arp 11 f00000000011 $sip $tip
# XXX This can be improved.
sleep 1

# dump infomration and flows with counters
ovn-sbctl dump-flows -- list multicast_group

echo "------ hv1 dump ------"
as hv1 ovs-vsctl show
as hv1 ovs-ofctl -O OpenFlow13 dump-flows br-int

echo "------ hv2 dump ------"
as hv2 ovs-vsctl show
as hv2 ovs-ofctl -O OpenFlow13 dump-flows br-int

echo "------ hv3 dump ------"
as hv3 ovs-vsctl show
as hv3 ovs-ofctl -O OpenFlow13 dump-flows br-int
# Now check the packets actually received against the ones expected.
for i in 1 2 3; do
for j in 1 2 3; do
Expand Down Expand Up @@ -1108,21 +1109,6 @@ ovn_populate_arp
# Allow some time for ovn-northd and ovn-controller to catch up.
# XXX This should be more systematic.
sleep 1
echo "------ OVN dump ------"
ovn-nbctl show
ovn-sbctl show

echo "------ hv1 dump ------"
as hv1 ovs-vsctl show
as hv1 ovs-ofctl -O OpenFlow13 dump-flows br-int

echo "------ hv2 dump ------"
as hv2 ovs-vsctl show
as hv2 ovs-ofctl -O OpenFlow13 dump-flows br-int

echo "------ hv3 dump ------"
as hv3 ovs-vsctl show
as hv3 ovs-ofctl -O OpenFlow13 dump-flows br-int

# test_packet INPORT DST SRC ETHTYPE OUTPORT...
#
Expand Down Expand Up @@ -1184,6 +1170,23 @@ done
# XXX This can be improved.
sleep 1

# dump information with counters
echo "------ OVN dump ------"
ovn-nbctl show
ovn-sbctl show

echo "------ hv1 dump ------"
as hv1 ovs-vsctl show
as hv1 ovs-ofctl -O OpenFlow13 dump-flows br-int

echo "------ hv2 dump ------"
as hv2 ovs-vsctl show
as hv2 ovs-ofctl -O OpenFlow13 dump-flows br-int

echo "------ hv3 dump ------"
as hv3 ovs-vsctl show
as hv3 ovs-ofctl -O OpenFlow13 dump-flows br-int

# Now check the packets actually received against the ones expected.
for i in 1 2 3; do
file=hv$i/vif$i-tx.pcap
Expand Down Expand Up @@ -1685,8 +1688,6 @@ for i in 1 2 3; do
done
done

ovn-nbctl show

# Pre-populate the hypervisors' ARP tables so that we don't lose any
# packets for ARP resolution (native tunneling doesn't queue packets
# for ARP resolution).
Expand All @@ -1695,19 +1696,6 @@ ovn_populate_arp
# Allow some time for ovn-northd and ovn-controller to catch up.
# XXX This should be more systematic.
sleep 1
ovn-sbctl dump-flows -- list multicast_group

echo "------ hv1 dump ------"
as hv1 ovs-vsctl show
as hv1 ovs-ofctl -O OpenFlow13 dump-flows br-int

echo "------ hv2 dump ------"
as hv2 ovs-vsctl show
as hv2 ovs-ofctl -O OpenFlow13 dump-flows br-int

echo "------ hv3 dump ------"
as hv3 ovs-vsctl show
as hv3 ovs-ofctl -O OpenFlow13 dump-flows br-int

# Given the name of a logical port, prints the name of the hypervisor
# on which it is located.
Expand Down Expand Up @@ -1948,6 +1936,22 @@ done
# XXX This can be improved.
sleep 1

#dump information including flow counters
ovn-nbctl show
ovn-sbctl dump-flows -- list multicast_group

echo "------ hv1 dump ------"
as hv1 ovs-vsctl show
as hv1 ovs-ofctl -O OpenFlow13 dump-flows br-int

echo "------ hv2 dump ------"
as hv2 ovs-vsctl show
as hv2 ovs-ofctl -O OpenFlow13 dump-flows br-int

echo "------ hv3 dump ------"
as hv3 ovs-vsctl show
as hv3 ovs-ofctl -O OpenFlow13 dump-flows br-int

# Now check the packets actually received against the ones expected.
for i in 1 2 3; do
for j in 1 2 3; do
Expand Down

0 comments on commit bb0c41d

Please sign in to comment.