From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 86F2BA04AA; Tue, 8 Sep 2020 09:29:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7AC4E1BEB1; Tue, 8 Sep 2020 09:29:30 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 743451C0D2 for ; Tue, 8 Sep 2020 09:29:29 +0200 (CEST) IronPort-SDR: OiNLr7OLY7ZSdFUdfz8XCjXbNzJb2+eJDYV7Yxk7a+Zoa0Qq/xw3+xOlH/0RIl4PAwfjuLsRPa OlPQRcQrKlxQ== X-IronPort-AV: E=McAfee;i="6000,8403,9737"; a="219646552" X-IronPort-AV: E=Sophos;i="5.76,404,1592895600"; d="scan'208";a="219646552" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2020 00:29:29 -0700 IronPort-SDR: LnfKPp6lk4j+MCPTIQ8AdORT9A9TOG7VhkxW5VSx6LaHP/Jh6I4d+/0bmXmitby6sSMiimkTUT VkgVw/Z1VZUw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,404,1592895600"; d="scan'208";a="377432633" Received: from unknown (HELO localhost.localdomain) ([10.240.183.52]) by orsmga001.jf.intel.com with ESMTP; 08 Sep 2020 00:29:27 -0700 From: "Zhou, Jun" To: dts@dpdk.org Cc: Zhou jun Date: Tue, 8 Sep 2020 07:17:54 +0000 Message-Id: <20200908071825.118583-8-junx.w.zhou@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200908071825.118583-1-junx.w.zhou@intel.com> References: <20200908071825.118583-1-junx.w.zhou@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dts] [dts 07/38] tests/TestSuite_flow_classify_softnic.py: adapt to support both meson and makefile build 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" From: Zhou jun Signed-off-by: Zhou jun --- tests/TestSuite_flow_classify_softnic.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_flow_classify_softnic.py b/tests/TestSuite_flow_classify_softnic.py index f2320be..db7a81d 100644 --- a/tests/TestSuite_flow_classify_softnic.py +++ b/tests/TestSuite_flow_classify_softnic.py @@ -82,7 +82,7 @@ class TestFlowClassifySoftnic(TestCase): """ self.cores = self.dut.get_core_list("all") self.set_ports(filename, port_num) - TESTPMD = "./%s/app/testpmd" % self.target + TESTPMD = self.dut.apps_name['test-pmd'] cmd="cat /sys/bus/pci/devices/%s/numa_node"%self.dut_p0_pci numa_node = int(self.dut.send_expect(cmd, "# ", 60)) cpu_id = numa_node if numa_node > 0 else 0 @@ -115,7 +115,6 @@ class TestFlowClassifySoftnic(TestCase): self.dut.send_expect(cmd, "# ", 20) self.dut.send_expect("sed -i 's/^thread 4 pipeline/thread %d pipeline/g' ./drivers/net/softnic/flow_classify_softnic/%s" % (self.port_num, filename), "# ", 20) - def set_table(self, cmd, filename): """ Set pipeline table. @@ -222,10 +221,10 @@ class TestFlowClassifySoftnic(TestCase): Check if the rule works. """ self.write_pcap_file(pcap_file, pkt) + checklist = [] if ltype in ["udp", "tcp", "sctp"]: filters = "%s %s port %d" % (ltype, src_dst, addr_port) sniff_pkts = self.send_and_sniff_pkts(from_port, to_port, pcap_file, filters) - checklist = [] for packet in sniff_pkts: if src_dst == "src": checklist.append(packet.getlayer(2).sport) @@ -234,7 +233,7 @@ class TestFlowClassifySoftnic(TestCase): elif ltype in ["ipv4", "ipv6"]: filters = "%s host %s" % (src_dst, addr_port) sniff_pkts = self.send_and_sniff_pkts(from_port, to_port, pcap_file, filters) - checklist = [] + for packet in sniff_pkts: if src_dst == "src": checklist.append(packet.getlayer(1).src) -- 1.8.3.1