From patchwork Wed Jul 20 10:04:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 114061 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C09E3A0032; Wed, 20 Jul 2022 03:43:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 992CD40A7A; Wed, 20 Jul 2022 03:43:59 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id B1D1540697 for ; Wed, 20 Jul 2022 03:43:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658281438; x=1689817438; h=from:to:cc:subject:date:message-id; bh=a34jM3OptngGjlIlAXndzstnyiFP7ys5jknKbBFSYpo=; b=hkZ4we8PgE12G0WiRf4PZHKyRKG3S6mgCj8gaQdThQFhTkKFECEdOC6Y 034QVnw9eEklqXh9YYY58yjN6PFlalUsrm1ShNxh+q6hJEgvhDd0M3S+/ DwTAn5BGkqpoLueyu4PdGi+MzBu2nh+MDPUotgrT1p2xU7tgBasTwxeek HJTkF/Z5vmyko6YU4lFJ+bpgReUfGeY/HH5JChIWNVD3Tb+FjSrEtu8p2 4/zLc6msP2QResYwBtU3gUbjs7pn31WpgfksbeDY2Nw05ViF/00vex17P MkTmdOMx/LdaZGvUuI8GyUPv8Ltg86yF/K/YZrniSQSuJZIEMt0BHOTw0 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10413"; a="267053439" X-IronPort-AV: E=Sophos;i="5.92,285,1650956400"; d="scan'208";a="267053439" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2022 18:43:57 -0700 X-IronPort-AV: E=Sophos;i="5.92,285,1650956400"; d="scan'208";a="625447410" Received: from unknown (HELO localhost.localdomain) ([10.239.252.94]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2022 18:43:53 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATCH V2] tests/ice_dcf_switch_filter: delete testpmd_status Date: Wed, 20 Jul 2022 10:04:52 +0000 Message-Id: <20220720100452.31601-1-songx.jiale@intel.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 the "testpmd_status" is the wrong status when launch app timeout, it will affect other cases test.remove this method. Signed-off-by: Jiale Song --- tests/TestSuite_ice_dcf_switch_filter.py | 27 ++++++------------------ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/tests/TestSuite_ice_dcf_switch_filter.py b/tests/TestSuite_ice_dcf_switch_filter.py index 3c647be6..7a15ae41 100644 --- a/tests/TestSuite_ice_dcf_switch_filter.py +++ b/tests/TestSuite_ice_dcf_switch_filter.py @@ -1686,7 +1686,6 @@ class ICEDCFSwitchFilterTest(TestCase): self.pf0_intf = self.dut.ports_info[self.used_dut_port_0]["intf"] self.__tx_iface = self.tester.get_interface(localPort) self.pkt = Packet() - self.testpmd_status = "close" # bind pf to kernel self.bind_nics_driver(self.dut_ports, driver="ice") # get priv-flags default stats @@ -1749,7 +1748,6 @@ class ICEDCFSwitchFilterTest(TestCase): """ command = self.create_testpmd_command() out = self.dut.send_expect(command, "testpmd> ", 15) - self.testpmd_status = "running" self.dut.send_expect("set portlist 1", "testpmd> ", 15) self.dut.send_expect("set fwd rxonly", "testpmd> ", 15) self.dut.send_expect("set verbose 1", "testpmd> ", 15) @@ -2247,7 +2245,6 @@ class ICEDCFSwitchFilterTest(TestCase): self.dut.send_expect("flow flush 0", "testpmd> ", 300) self.dut.send_expect("quit", "#") - self.testpmd_status = "close" # destroy vfs for port_id in self.dut_ports: self.dut.destroy_sriov_vfs_by_port(port_id) @@ -2266,7 +2263,6 @@ class ICEDCFSwitchFilterTest(TestCase): ) command = self.path + all_eal_param + " -- -i" out = self.dut.send_expect(command, "testpmd> ", 15) - self.testpmd_status = "running" self.dut.send_expect("set portlist 1,2", "testpmd> ", 15) self.dut.send_expect("set fwd rxonly", "testpmd> ", 15) self.dut.send_expect("set verbose 1", "testpmd> ", 15) @@ -2323,7 +2319,6 @@ class ICEDCFSwitchFilterTest(TestCase): ) command = self.path + all_eal_param + " -- -i" out = self.dut.send_expect(command, "testpmd> ", 15) - self.testpmd_status = "running" self.dut.send_expect("set portlist 1,2", "testpmd> ", 15) self.dut.send_expect("set fwd rxonly", "testpmd> ", 15) self.dut.send_expect("set verbose 1", "testpmd> ", 15) @@ -2371,7 +2366,6 @@ class ICEDCFSwitchFilterTest(TestCase): # launch testpmd command = self.create_testpmd_command() out = self.dut.send_expect(command, "testpmd> ", 15) - self.testpmd_status = "running" self.dut.send_expect("set portlist 1", "testpmd> ", 15) self.dut.send_expect("set fwd mac", "testpmd> ", 15) self.dut.send_expect("set verbose 1", "testpmd> ", 15) @@ -2407,7 +2401,6 @@ class ICEDCFSwitchFilterTest(TestCase): ) command = self.path + all_eal_param + " -- -i" out = self.dut.send_expect(command, "testpmd> ", 15) - self.testpmd_status = "running" self.dut.send_expect("set portlist 1,2", "testpmd> ", 15) self.dut.send_expect("set fwd mac", "testpmd> ", 15) self.dut.send_expect("set verbose 1", "testpmd> ", 15) @@ -2473,7 +2466,6 @@ class ICEDCFSwitchFilterTest(TestCase): ) command = self.path + all_eal_param + " -- -i" out = self.dut.send_expect(command, "testpmd> ", 15) - self.testpmd_status = "running" # generate max_vf_number-1 rules to each vf and matched packets for i in range(1, max_vf_number): rte_flow_pattern = ( @@ -2625,7 +2617,6 @@ class ICEDCFSwitchFilterTest(TestCase): ) command = self.path + all_eal_param + " -- -i" out = self.dut.send_expect(command, "testpmd> ", 15) - self.testpmd_status = "running" self.dut.send_expect("set portlist 1,2", "testpmd> ", 15) self.dut.send_expect("set fwd rxonly", "testpmd> ", 15) self.dut.send_expect("set verbose 1", "testpmd> ", 15) @@ -2670,17 +2661,13 @@ class ICEDCFSwitchFilterTest(TestCase): """ Run after each test case. """ - if self.testpmd_status != "close": - # destroy all flow rules on DCF - self.dut.send_expect("flow flush 0", "testpmd> ", 15) - self.dut.send_expect("clear port stats all", "testpmd> ", 15) - self.dut.send_expect("quit", "#", 15) - # kill all DPDK application - self.dut.kill_all() - # destroy vfs - for port_id in self.dut_ports: - self.dut.destroy_sriov_vfs_by_port(port_id) - self.testpmd_status = "close" + # destroy all flow rules on DCF + self.dut.send_expect("quit", "# ") + # kill all DPDK application + self.dut.kill_all() + # destroy vfs + for port_id in self.dut_ports: + self.dut.destroy_sriov_vfs_by_port(port_id) if getattr(self, "session_secondary", None): self.dut.close_session(self.session_secondary)