diff mbox series

[ovs-dev] system-tests: Consolidate wait condition in CoPP test

Message ID 20231121095248.57246-1-amusil@redhat.com
State Accepted
Headers show
Series [ovs-dev] system-tests: Consolidate wait condition in CoPP test | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Ales Musil Nov. 21, 2023, 9:52 a.m. UTC
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>
---
 tests/system-ovn.at | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Dumitru Ceara Dec. 7, 2023, 12:33 p.m. UTC | #1
On 11/21/23 10:52, Ales Musil wrote:
> 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>
> ---

Thanks for the cleanup, Ales!  I applied this to main and backported it
down to 22.03.

Regards,
Dumitru
diff mbox series

Patch

diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index c45452607..9dfabb9dd 100644
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -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
@@ -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)
@@ -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
@@ -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
@@ -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
@@ -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