From patchwork Fri May 7 04:06:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1475319 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Fbxk626ckz9sPf for ; Fri, 7 May 2021 14:07:41 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C6E14404FC; Fri, 7 May 2021 04:07:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u27NMWVQtNd5; Fri, 7 May 2021 04:07:38 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTP id C5D324050D; Fri, 7 May 2021 04:07:35 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0F109C002B; Fri, 7 May 2021 04:07:35 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1CE1BC000F for ; Fri, 7 May 2021 04:07:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id D14F540387 for ; Fri, 7 May 2021 04:07:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4yDrcMinHGhJ for ; Fri, 7 May 2021 04:07:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by smtp2.osuosl.org (Postfix) with ESMTPS id C6F4640379 for ; Fri, 7 May 2021 04:07:23 +0000 (UTC) X-Originating-IP: 75.54.222.30 Received: from sigfpe.attlocal.net (75-54-222-30.lightspeed.rdcyca.sbcglobal.net [75.54.222.30]) (Authenticated sender: blp@ovn.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 58071C0004; Fri, 7 May 2021 04:07:21 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Thu, 6 May 2021 21:06:42 -0700 Message-Id: <20210507040659.26830-11-blp@ovn.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210507040659.26830-1-blp@ovn.org> References: <20210507040659.26830-1-blp@ovn.org> MIME-Version: 1.0 Cc: Ben Pfaff Subject: [ovs-dev] [PATCH ovn v3 10/27] tests: Miscellaneous debuggability improvements. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: Ben Pfaff --- tests/ovn.at | 51 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index 175cce0049cd..8adaaa9fde64 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -9683,9 +9683,10 @@ wait_for_ports_up check ovn-nbctl --wait=hv sync as hv1 ovs-vsctl show -echo "*************************" -ovn-sbctl list DNS -echo "*************************" +ovn-sbctl list DNS > dns +AT_CAPTURE_FILE([dns]) +ovn-sbctl dump-flows > sbflows +AT_CAPTURE_FILE([sbflows]) reset_pcap_file() { local iface=$1 @@ -9879,8 +9880,7 @@ reset_pcap_file hv1-vif2 hv1/vif2 rm -f 1.expected rm -f 2.expected -# Try vm1 again but an all-caps query name - +AS_BOX([Try vm1 again but an all-caps query name]) set_dns_params VM1 src_ip=`ip_to_hex 10 0 0 6` dst_ip=`ip_to_hex 10 0 0 1` @@ -9902,8 +9902,12 @@ reset_pcap_file hv1-vif2 hv1/vif2 rm -f 1.expected rm -f 2.expected -# Clear the query name options for ls1-lp2 +AS_BOX([Clear the query name options for ls1-lp2]) ovn-nbctl --wait=hv remove DNS $DNS1 records vm2.ovn.org +ovn-sbctl list DNS > dns2 +AT_CAPTURE_FILE([dns2]) +ovn-sbctl dump-flows > sbflows2 +AT_CAPTURE_FILE([sbflows2]) set_dns_params vm2 src_ip=`ip_to_hex 10 0 0 4` @@ -9922,10 +9926,14 @@ reset_pcap_file hv1-vif2 hv1/vif2 rm -f 1.expected rm -f 2.expected -# Clear the query name for ls1-lp1 +AS_BOX([Clear the query name for ls1-lp1]) # Since ls1 has no query names configued, # ovn-northd should not add the DNS flows. ovn-nbctl --wait=hv remove DNS $DNS1 records vm1.ovn.org +ovn-sbctl list DNS > dns3 +AT_CAPTURE_FILE([dns3]) +ovn-sbctl dump-flows > sbflows3 +AT_CAPTURE_FILE([sbflows3]) set_dns_params vm1 src_ip=`ip_to_hex 10 0 0 6` @@ -9944,9 +9952,13 @@ reset_pcap_file hv1-vif2 hv1/vif2 rm -f 1.expected rm -f 2.expected -# Test IPv6 (AAAA records) using IPv4 packet. +AS_BOX([Test IPv6 (AAAA records) using IPv4 packet.]) # Add back the DNS options for ls1-lp1. ovn-nbctl --wait=hv set DNS $DNS1 records:vm1.ovn.org="10.0.0.4 aef0::4" +ovn-sbctl list DNS > dns4 +AT_CAPTURE_FILE([dns4]) +ovn-sbctl dump-flows > sbflows4 +AT_CAPTURE_FILE([sbflows4]) set_dns_params vm1_ipv6_only src_ip=`ip_to_hex 10 0 0 6` @@ -9969,7 +9981,7 @@ reset_pcap_file hv1-vif2 hv1/vif2 rm -f 1.expected rm -f 2.expected -# Test both IPv4 (A) and IPv6 (AAAA records) using IPv4 packet. +AS_BOX([Test both IPv4 (A) and IPv6 (AAAA records) using IPv4 packet.]) set_dns_params vm1_ipv4_v6 src_ip=`ip_to_hex 10 0 0 6` dst_ip=`ip_to_hex 10 0 0 1` @@ -9991,7 +10003,7 @@ reset_pcap_file hv1-vif2 hv1/vif2 rm -f 1.expected rm -f 2.expected -# Invalid type. +AS_BOX([Invalid type]) set_dns_params vm1_invalid_type src_ip=`ip_to_hex 10 0 0 6` dst_ip=`ip_to_hex 10 0 0 1` @@ -10009,7 +10021,7 @@ reset_pcap_file hv1-vif2 hv1/vif2 rm -f 1.expected rm -f 2.expected -# Incomplete DNS packet. +AS_BOX([Incomplete DNS packet]) set_dns_params vm1_incomplete src_ip=`ip_to_hex 10 0 0 6` dst_ip=`ip_to_hex 10 0 0 1` @@ -10027,8 +10039,12 @@ reset_pcap_file hv1-vif2 hv1/vif2 rm -f 1.expected rm -f 2.expected -# Add one more DNS record to the ls1. +AS_BOX([Add one more DNS record to the ls1]) ovn-nbctl --wait=hv set Logical_switch ls1 dns_records="$DNS1 $DNS2" +ovn-sbctl list DNS > dns5 +AT_CAPTURE_FILE([dns5]) +ovn-sbctl dump-flows > sbflows5 +AT_CAPTURE_FILE([sbflows5]) set_dns_params vm3 src_ip=`ip_to_hex 10 0 0 4` @@ -10051,7 +10067,7 @@ reset_pcap_file hv1-vif2 hv1/vif2 rm -f 1.expected rm -f 2.expected -# Try DNS query over IPv6 +AS_BOX([Try DNS query over IPv6]) set_dns_params vm1 src_ip=aef00000000000000000000000000004 dst_ip=aef00000000000000000000000000001 @@ -11176,10 +11192,10 @@ check ovn-nbctl --wait=hv sync # Check that there is a logical flow in logical switch foo's pipeline # to set the outport to rp-foo with the condition is_chassis_redirect. -ovn-sbctl dump-flows foo > sbflows +OVS_WAIT_UNTIL([ovn-sbctl dump-flows foo > sbflows + test 1 = `grep ls_in_l2_lkup sbflows | \ + grep rp-foo | grep is_chassis_resident | grep priority=50 -c`]) AT_CAPTURE_FILE([sbflows]) -OVS_WAIT_UNTIL([test 1 = `grep ls_in_l2_lkup sbflows | \ -grep rp-foo | grep is_chassis_resident | grep priority=50 -c`]) (echo "---------NB dump-----" ovn-nbctl show @@ -11256,9 +11272,12 @@ options:rxq_pcap=dummy-rx.pcap options:rxq_pcap=${pcap_file}-rx.pcap } +as hv1 ovs-appctl dpif/del-flows + as hv1 reset_pcap_file br-ex_n2 hv1/br-ex_n2 as hv3 reset_pcap_file hv3-vif1 hv3/vif1 as hv1 ovs-appctl netdev-dummy/receive hv1-vif1 $packet +as hv1 ovs-appctl ofproto/trace br-int in_port=hv1-vif1 $packet sleep 2 # On hv1, table 37 check that no packet goes via the tunnel port