Skip to content

Commit

Permalink
tests: Fix flaky "IPv6 Neighbor Solicitation for unknown MAC".
Browse files Browse the repository at this point in the history
Tests were failing as first waiting for expected number of packets to
be received (including bcast packets), then removing bcast packets.

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 c0c9a67 commit 944a01f
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions tests/ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -14542,23 +14542,10 @@ nd_target=20010db800010000020002fffe010205
as hv1 test_ipv6 1 $src_mac $dst_mac $src_ip $dst_ip $dst_mcast_mac \
$mcast_node_ip $nd_target $nd_src_ip

OVS_WAIT_WHILE([test 24 = $(wc -c hv1/br-phys_n1-tx.pcap | cut -d " " -f1)])
OVS_WAIT_WHILE([test 24 = $(wc -c hv1/br-phys-tx.pcap | cut -d " " -f1)])

# Use the grep here to filter out rarp packets that might have arrived
$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/br-phys_n1-tx.pcap | \
grep -v ffffffffffff | trim_zeros > 1.packets
$PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/br-phys-tx.pcap | \
grep -v ffffffffffff | trim_zeros > 2.packets

cat ipv6_ns.expected | cut -c -112 > expout
AT_CHECK([cat 1.packets | cut -c -112], [0], [expout])
AT_CHECK([cat 2.packets | cut -c -112], [0], [expout])

# Skipping the ICMPv6 checksum
cat ipv6_ns.expected | cut -c 117- > expout
AT_CHECK([cat 1.packets | cut -c 117-], [0], [expout])
AT_CHECK([cat 2.packets | cut -c 117-], [0], [expout])
OVN_CHECK_PACKETS_REMOVE_BROADCAST([hv1/br-phys_n1-tx.pcap], [ipv6_ns.expected], [cut -c -112])
OVN_CHECK_PACKETS_REMOVE_BROADCAST([hv1/br-phys-tx.pcap], [ipv6_ns.expected], [cut -c -112])
OVN_CHECK_PACKETS_REMOVE_BROADCAST([hv1/br-phys_n1-tx.pcap], [ipv6_ns.expected], [cut -c 117-])
OVN_CHECK_PACKETS_REMOVE_BROADCAST([hv1/br-phys-tx.pcap], [ipv6_ns.expected], [cut -c 117-])

# Check that NS packets are not flooded across routing domains. That means
# that hv2 should not send any packets across the physical network.
Expand Down

0 comments on commit 944a01f

Please sign in to comment.