diff options
author | David Marchand <david.marchand@redhat.com> | 2022-07-25 10:19:08 +0200 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-07-25 18:45:53 +0200 |
commit | 1cecd385f4e756943d8099c2574fcc822fb9fc46 (patch) | |
tree | d044357adde50a6e9f512d93525b56525afd837a /tests | |
parent | f36acef00d045fb58c18097bd629fd63319bb148 (diff) | |
download | openvswitch-1cecd385f4e756943d8099c2574fcc822fb9fc46.tar.gz |
system-offloads-traffic: Avoid check_pkt_len action test random failures.
On my Fedora 36, the test with enabled offloads often fails with one of
those ping failing.
By chance (?), the previous tcpdumps are not stopped and I can see for
example:
10:04:02.534492 IP 10.1.1.1 > 10.1.1.2: ICMP echo request, id 62835, seq 2, length 72
10:04:02.639443 IP 10.1.1.1 > 10.1.1.2: ICMP echo request, id 62835, seq 3, length 72
10:04:02.743447 IP 10.1.1.1 > 10.1.1.2: ICMP echo request, id 62835, seq 4, length 72
10:04:02.846447 IP 10.1.1.1 > 10.1.1.2: ICMP echo request, id 62835, seq 5, length 72
10:04:02.950519 IP 10.1.1.1 > 10.1.1.2: ICMP echo request, id 62835, seq 6, length 72
10:04:03.054697 IP 10.1.1.1 > 10.1.1.2: ICMP echo request, id 62835, seq 7, length 72
10:04:03.158448 IP 10.1.1.1 > 10.1.1.2: ICMP echo request, id 62835, seq 8, length 72
10:04:03.262541 IP 10.1.1.1 > 10.1.1.2: ICMP echo request, id 62835, seq 9, length 72
10:04:03.366444 IP 10.1.1.1 > 10.1.1.2: ICMP echo request, id 62835, seq 10, length 72
10:04:03.466501 IP 10.1.1.1 > 10.1.1.2: ICMP echo request, id 62835, seq 11, length 72
The first ping request has not been handled correctly.
Adding a sleep 1 (like other offloads unit tests) seems to be enough to
avoid this situation.
Fixes: 02dabb21f243 ("tests: Add check_pkt_len action test to system-offload-traffic.")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system-offloads-traffic.at | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/system-offloads-traffic.at b/tests/system-offloads-traffic.at index 97eba00ef..834d444f0 100644 --- a/tests/system-offloads-traffic.at +++ b/tests/system-offloads-traffic.at @@ -538,6 +538,7 @@ table=4,in_port=1,reg0=0x1 actions=mod_nw_tos:4,output:3 table=4,in_port=1,reg0=0x0 actions=mod_dl_src:00:11:11:11:11:11,output:4 ]) AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flows br0 flows.txt]) +sleep 1 NS_CHECK_EXEC([at_ns1], [ping -q -c 10 -i 0.1 -w 2 -s 64 10.1.1.2 | FORMAT_PING], [0], [dnl 10 packets transmitted, 10 received, 0% packet loss, time 0ms ], [], [ovs-appctl dpctl/dump-flows; ovs-ofctl dump-flows br0]) @@ -555,6 +556,7 @@ table=4,in_port=1,reg0=0x1 actions=mod_dl_src:00:11:11:11:11:11,output:3 table=4,in_port=1,reg0=0x0 actions=mod_nw_tos:8,output:4 ]) AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flows br0 flows.txt]) +sleep 1 NS_CHECK_EXEC([at_ns1], [ping -q -c 10 -i 0.1 -w 2 -s 64 10.1.1.2 | FORMAT_PING], [0], [dnl 10 packets transmitted, 10 received, 0% packet loss, time 0ms ], [], [ovs-appctl dpctl/dump-flows; ovs-ofctl dump-flows br0]) |