From patchwork Thu Sep 24 09:34:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, XiX" X-Patchwork-Id: 78663 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BBA78A04B1; Thu, 24 Sep 2020 11:32:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A3E361DD09; Thu, 24 Sep 2020 11:32:47 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 73E361D155 for ; Thu, 24 Sep 2020 11:32:45 +0200 (CEST) IronPort-SDR: xNpnwAFswuPiLo8offsNr09JgW4y4fE8SVHF0B7XY2XFsb6VJ1U2AB/aKRUQBZfj8yL7xsTF95 DqYhOjZOe71g== X-IronPort-AV: E=McAfee;i="6000,8403,9753"; a="140605830" X-IronPort-AV: E=Sophos;i="5.77,297,1596524400"; d="scan'208";a="140605830" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2020 02:32:44 -0700 IronPort-SDR: eUPO5JTbnIJ7uQyRrVky0TSj8fGXrlU+0fQi+L3Kdux52aenWcLtPGBx/7Sv8UX2jcC0UHyEQd M6EeI6ZtxOVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,297,1596524400"; d="scan'208";a="322903093" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.182.150]) by orsmga002.jf.intel.com with ESMTP; 24 Sep 2020 02:32:42 -0700 From: xizhan4x To: dts@dpdk.org Cc: xizhan4x Date: Thu, 24 Sep 2020 17:34:10 +0800 Message-Id: <1600940050-3782-1-git-send-email-xix.zhang@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V1] tests/TestSuite_vxlan/TestSuite_nvgre:Meson default RTE_ IXGBE_ INC_ VECTOR is n X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Meson default RTE_IXGBE_ INC_ VECTOR is n , so skip compilation Signed-off-by: xizhan4x Tested-by: Zhang, XiX --- tests/TestSuite_nvgre.py | 67 +++++++++++++++++++++++++--------------------- tests/TestSuite_vxlan.py | 69 +++++++++++++++++++++++++++--------------------- 2 files changed, 76 insertions(+), 60 deletions(-) diff --git a/tests/TestSuite_nvgre.py b/tests/TestSuite_nvgre.py index e81b370..b36dc38 100644 --- a/tests/TestSuite_nvgre.py +++ b/tests/TestSuite_nvgre.py @@ -468,7 +468,9 @@ class TestNvgre(TestCase): config.outer_mac_dst = self.dut_rx_port_mac config.create_pcap() self.dut.send_expect("start", "testpmd>", 10) + time.sleep(3) config.send_pcap() + time.sleep(2) # check whether detect nvgre type out = self.dut.get_session_output() print(out) @@ -513,7 +515,9 @@ class TestNvgre(TestCase): # send nvgre packet config.create_pcap() self.dut.send_expect("start", "testpmd>", 10) + time.sleep(3) config.send_pcap() + time.sleep(2) out = self.dut.get_session_output() print(out) queue = -1 @@ -581,12 +585,11 @@ class TestNvgre(TestCase): self.logger.info("nvgre packet %s" % arg_str) out = self.dut.send_expect("start", "testpmd>", 10) - + time.sleep(5) # create pcap file with supplied arguments config = NvgreTestConfig(self, **kwargs) config.outer_mac_dst = self.dut_rx_port_mac config.create_pcap() - # remove temporary files self.tester.send_expect("rm -rf %s" % config.capture_file, "# ") # save the capture packet into pcap format @@ -627,13 +630,14 @@ class TestNvgre(TestCase): print("CVL support default none VECTOR") src_vec_model = 'n' else: - out = self.dut.send_expect("cat config/common_base", "]# ", 10) - src_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1] - if src_vec_model == 'y': - self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch - + "%s=n/' config/common_base" % self.compile_switch, "# ", 30) - self.dut.skip_setup = False - self.dut.build_install_dpdk(self.target) + if self.dut.build_type != "meson": + out = self.dut.send_expect("cat config/common_base", "]# ", 10) + src_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1] + if src_vec_model == 'y': + self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch + + "%s=n/' config/common_base" % self.compile_switch, "# ", 30) + self.dut.skip_setup = False + self.dut.build_install_dpdk(self.target) # check no nvgre packet self.nvgre_detect(outer_l3_type = "IPv6", outer_ip_proto=0xFF) @@ -653,13 +657,14 @@ class TestNvgre(TestCase): print("CVL support default none VECTOR") src_vec_model = 'n' else: - out = self.dut.send_expect("cat config/common_base", "]# ", 10) - dst_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1] - if src_vec_model != dst_vec_model: - self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch - + "%s=%s/' config/common_base" % (self.compile_switch, src_vec_model), "# ", 30) - self.dut.skip_setup = False - self.dut.build_install_dpdk(self.target) + if self.dut.build_type != "meson": + out = self.dut.send_expect("cat config/common_base", "]# ", 10) + dst_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1] + if src_vec_model != dst_vec_model: + self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch + + "%s=%s/' config/common_base" % (self.compile_switch, src_vec_model), "# ", 30) + self.dut.skip_setup = False + self.dut.build_install_dpdk(self.target) def test_nvgre_ipv6_checksum_offload(self): # check nvgre packet + inner IPv6 + inner L4 invalid @@ -702,13 +707,14 @@ class TestNvgre(TestCase): print("CVL support default none VECTOR") src_vec_model = 'n' else: - out = self.dut.send_expect("cat config/common_base", "]# ", 10) - src_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1] - if src_vec_model == 'y': - self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch - + "%s=n/' config/common_base" % self.compile_switch, "# ", 30) - self.dut.skip_setup = False - self.dut.build_install_dpdk(self.target) + if self.dut.build_type != "meson": + out = self.dut.send_expect("cat config/common_base", "]# ", 10) + src_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1] + if src_vec_model == 'y': + self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch + + "%s=n/' config/common_base" % self.compile_switch, "# ", 30) + self.dut.skip_setup = False + self.dut.build_install_dpdk(self.target) # check no nvgre packet self.nvgre_detect(outer_ip_proto=0xFF) @@ -726,13 +732,14 @@ class TestNvgre(TestCase): print("CVL support default none VECTOR") src_vec_model = 'n' else: - out = self.dut.send_expect("cat config/common_base", "]# ", 10) - dst_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1] - if src_vec_model != dst_vec_model: - self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch - + "%s=%s/' config/common_base" % (self.compile_switch, src_vec_model), "# ", 30) - self.dut.skip_setup = False - self.dut.build_install_dpdk(self.target) + if self.dut.build_type != "meson": + out = self.dut.send_expect("cat config/common_base", "]# ", 10) + dst_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1] + if src_vec_model != dst_vec_model: + self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch + + "%s=%s/' config/common_base" % (self.compile_switch, src_vec_model), "# ", 30) + self.dut.skip_setup = False + self.dut.build_install_dpdk(self.target) def test_tunnel_filter(self): # verify tunnel filter feature diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py index d6cd93c..58a1119 100644 --- a/tests/TestSuite_vxlan.py +++ b/tests/TestSuite_vxlan.py @@ -382,9 +382,11 @@ class TestVxlan(TestCase, IxiaPacketGenerator): config.outer_mac_dst = self.dut_port_mac config.create_pcap() self.dut.send_expect("start", "testpmd>", 10) + time.sleep(3) config.send_pcap(self.tester_iface) # check whether detect vxlan type + time.sleep(2) out = self.dut.get_session_output(timeout=2) print(out) self.verify(config.packet_type() in out, "Vxlan Packet not detected") @@ -438,15 +440,16 @@ class TestVxlan(TestCase, IxiaPacketGenerator): self.logger.info("vxlan packet %s" % arg_str) out = self.dut.send_expect("start", "testpmd>", 10) - + time.sleep(3) # create pcap file with supplied arguments config = VxlanTestConfig(self, **kwargs) config.outer_mac_dst = self.dut_port_mac config.create_pcap() - # save the capture packet into pcap format inst = self.tester.tcpdump_sniff_packets(self.recv_iface) + time.sleep(2) config.send_pcap(self.tester_iface) + time.sleep(2) pkt = self.tester.load_tcpdump_sniff_packets(inst, timeout=3) # extract the checksum offload from saved pcap file @@ -505,7 +508,9 @@ class TestVxlan(TestCase, IxiaPacketGenerator): # send vxlan packet config.create_pcap() self.dut.send_expect("start", "testpmd>", 10) + time.sleep(2) config.send_pcap(self.tester_iface) + time.sleep(2) out = self.dut.get_session_output(timeout=2) print(out) @@ -528,13 +533,14 @@ class TestVxlan(TestCase, IxiaPacketGenerator): print("CVL support default none VECTOR") src_vec_model = 'n' else: - out = self.dut.send_expect("cat config/common_base", "]# ", 10) - src_vec_model = re.search("%s=." % self.compile_switch, out).group()[-1] - if src_vec_model == 'y': - self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch - + "%s=n/' config/common_base" % self.compile_switch, "# ", 30) - self.dut.skip_setup = False - self.dut.build_install_dpdk(self.target) + if self.dut.build_type != "meson": + out = self.dut.send_expect("cat config/common_base", "]# ", 10) + src_vec_model = re.search("%s=." % self.compile_switch, out).group()[-1] + if src_vec_model == 'y': + self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch + + "%s=n/' config/common_base" % self.compile_switch, "# ", 30) + self.dut.skip_setup = False + self.dut.build_install_dpdk(self.target) pmd_temp = "./%(TARGET)s -c %(COREMASK)s -n " + \ "%(CHANNEL)d -- -i --disable-rss --rxq=4 --txq=4" + \ @@ -570,13 +576,14 @@ class TestVxlan(TestCase, IxiaPacketGenerator): print("CVL support default none VECTOR") src_vec_model = 'n' else: - out = self.dut.send_expect("cat config/common_base", "]# ", 10) - dst_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1] - if src_vec_model != dst_vec_model: - self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch - + "%s=%s/' config/common_base" % (self.compile_switch, src_vec_model), "# ", 30) - self.dut.skip_setup = False - self.dut.build_install_dpdk(self.target) + if self.dut.build_type != "meson": + out = self.dut.send_expect("cat config/common_base", "]# ", 10) + dst_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1] + if src_vec_model != dst_vec_model: + self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch + + "%s=%s/' config/common_base" % (self.compile_switch, src_vec_model), "# ", 30) + self.dut.skip_setup = False + self.dut.build_install_dpdk(self.target) def test_vxlan_ipv6_detect(self): """ @@ -586,13 +593,14 @@ class TestVxlan(TestCase, IxiaPacketGenerator): print("CVL support default none VECTOR") src_vec_model = 'n' else: - out = self.dut.send_expect("cat config/common_base", "]# ", 10) - src_vec_model = re.search("%s=." % self.compile_switch, out).group()[-1] - if src_vec_model == 'y': - self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch - + "%s=n/' config/common_base" % self.compile_switch, "# ", 30) - self.dut.skip_setup = False - self.dut.build_install_dpdk(self.target) + if self.dut.build_type != "meson": + out = self.dut.send_expect("cat config/common_base", "]# ", 10) + src_vec_model = re.search("%s=." % self.compile_switch, out).group()[-1] + if src_vec_model == 'y': + self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch + + "%s=n/' config/common_base" % self.compile_switch, "# ", 30) + self.dut.skip_setup = False + self.dut.build_install_dpdk(self.target) pmd_temp = "./%(TARGET)s -c %(COREMASK)s -n " + \ "%(CHANNEL)d -- -i --disable-rss --rxq=4 --txq=4" + \ @@ -632,13 +640,14 @@ class TestVxlan(TestCase, IxiaPacketGenerator): print("CVL support default none VECTOR") src_vec_model = 'n' else: - out = self.dut.send_expect("cat config/common_base", "]# ", 10) - dst_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1] - if src_vec_model != dst_vec_model: - self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch - + "%s=%s/' config/common_base" % (self.compile_switch, src_vec_model), "# ", 30) - self.dut.skip_setup = False - self.dut.build_install_dpdk(self.target) + if self.dut.build_type != "meson": + out = self.dut.send_expect("cat config/common_base", "]# ", 10) + dst_vec_model = re.findall("%s=." % self.compile_switch, out)[0][-1] + if src_vec_model != dst_vec_model: + self.dut.send_expect("sed -i -e 's/%s=.*$/" % self.compile_switch + + "%s=%s/' config/common_base" % (self.compile_switch, src_vec_model), "# ", 30) + self.dut.skip_setup = False + self.dut.build_install_dpdk(self.target) def test_vxlan_ipv4_checksum_offload(self): """