Skip to content

Commit

Permalink
system-tests: Consolidate wait condition in CoPP test
Browse files Browse the repository at this point in the history
Add missing wait condition and at the same time
move the wait to the last ovn-nbctl command
of the chain, as there is no need to wait
if there are more command afterward.

Signed-off-by: Ales Musil <amusil@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
(cherry picked from commit 907b4fe)
  • Loading branch information
almusil authored and dceara committed Dec 7, 2023
1 parent 4ef375e commit ba7a45b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/system-ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -7332,9 +7332,9 @@ check ovn-nbctl lsp-add public public1 \

NS_EXEC([sw01], [tcpdump -l -n -i sw01 icmp -Q in > reject.pcap &])
check ovn-nbctl meter-add acl-meter drop 1 pktps 0
check ovn-nbctl --wait=hv copp-add copp0 reject acl-meter
check ovn-nbctl --wait=hv ls-copp-add copp0 sw0
check ovn-nbctl acl-add sw0 from-lport 1002 'inport == "sw01" && ip && udp' reject
check ovn-nbctl copp-add copp0 reject acl-meter
check ovn-nbctl ls-copp-add copp0 sw0
check ovn-nbctl --wait=hv acl-add sw0 from-lport 1002 'inport == "sw01" && ip && udp' reject

AT_CHECK([ovn-nbctl copp-list copp0], [0], [dnl
reject: acl-meter
Expand All @@ -7355,7 +7355,7 @@ rm -f reject.pcap

# Let's update the meter
NS_EXEC([sw01], [tcpdump -l -n -i sw01 icmp -Q in > reject.pcap &])
check ovn-nbctl --may-exist meter-add acl-meter drop 10 pktps 0
check ovn-nbctl --may-exist --wait=hv meter-add acl-meter drop 10 pktps 0
ip netns exec sw01 scapy -H <<-EOF
p = IP(src="192.168.1.2", dst="192.168.1.1") / UDP(dport = 12345) / Raw(b"X"*64)
send (p, iface='sw01', loop = 0, verbose = 0, count = 40)
Expand Down Expand Up @@ -7386,7 +7386,7 @@ kill $(pidof tcpdump)

NS_EXEC([server], [tcpdump -l -n -i s1 arp[[24:4]]=0xac100164 > arp.pcap &])
check ovn-nbctl meter-add arp-meter drop 1 pktps 0
check ovn-nbctl --wait=hv copp-add copp1 arp-resolve arp-meter
check ovn-nbctl copp-add copp1 arp-resolve arp-meter
check ovn-nbctl --wait=hv lr-copp-add copp1 R1
AT_CHECK([ovn-nbctl copp-list copp1], [0], [dnl
arp-resolve: arp-meter
Expand All @@ -7405,7 +7405,7 @@ OVS_WAIT_UNTIL([
kill $(pidof tcpdump)

check ovn-nbctl meter-add icmp-meter drop 1 pktps 0
check ovn-nbctl --wait=hv copp-add copp2 icmp4-error icmp-meter
check ovn-nbctl copp-add copp2 icmp4-error icmp-meter
check ovn-nbctl --wait=hv lr-copp-add copp2 R1
AT_CHECK([ovn-nbctl copp-list copp2 |grep icmp4-error], [0], [dnl
icmp4-error: icmp-meter
Expand All @@ -7425,7 +7425,7 @@ OVS_WAIT_UNTIL([
kill $(pidof tcpdump)

check ovn-nbctl meter-add bfd-meter drop 1 pktps 0
check ovn-nbctl --wait=hv copp-add copp3 bfd bfd-meter
check ovn-nbctl copp-add copp3 bfd bfd-meter
check ovn-nbctl --wait=hv lr-copp-add copp3 R1
AT_CHECK([ovn-nbctl copp-list copp3 |grep bfd], [0], [dnl
bfd: bfd-meter
Expand Down Expand Up @@ -7455,7 +7455,7 @@ kill $(pidof tcpdump)

check ovn-nbctl set nb_global . options:svc_monitor_mac="33:33:33:33:33:33"
check ovn-nbctl meter-add svc-meter drop 1 pktps 0
check ovn-nbctl --wait=hv copp-add copp4 svc-monitor svc-meter
check ovn-nbctl copp-add copp4 svc-monitor svc-meter
check ovn-nbctl --wait=hv ls-copp-add copp4 sw0
check ovn-appctl -t ovn-controller vlog/set vconn:dbg
AT_CHECK([ovn-nbctl copp-list copp4], [0], [dnl
Expand Down

0 comments on commit ba7a45b

Please sign in to comment.