From patchwork Thu May 26 04:53:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 111883 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 8A4BCA0557; Thu, 26 May 2022 06:53:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8309A40150; Thu, 26 May 2022 06:53:35 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 73DD340146 for ; Thu, 26 May 2022 06:53:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653540813; x=1685076813; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=oQ84VJD8ErGhTy7HYKC27uc3Dp8713IzOnFf1T4+JGY=; b=nJcG1/2nMIoamvMVhkBUvMxAXAyo5lJBAgk/FkFfx3Hk7A65jls2G6Jv VrkaWPH08gPh7e54gQPQ98XCNFxbUvGiArKqQDH1G88raO12CePMjpQAF GF+M5u2DBDHsF5lmoh7S0oOnSwg/lVNWNxjA1en7xeYZm7eN70L9P8bT9 GDbVRqfJjSxe4p9q0QuSUF/Fbfr04mGBFM9CLug6lfj89delmcf0EbpNm w+PrjA94UoY5dAMdyMj85pfdQGjr3B7hG8YhFwOs7dyLfn+6BvDH9wqr2 ydSYifizhVghZXrvr9F8oYqA28BOXiMCY0NlNyIqsCbTgOwL32/C6/4Ce A==; X-IronPort-AV: E=McAfee;i="6400,9594,10358"; a="360422412" X-IronPort-AV: E=Sophos;i="5.91,252,1647327600"; d="scan'208";a="360422412" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 May 2022 21:53:31 -0700 X-IronPort-AV: E=Sophos;i="5.91,252,1647327600"; d="scan'208";a="549381216" Received: from unknown (HELO daily-regression-131.intel.com) ([10.239.251.131]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 May 2022 21:53:30 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATCH V1] tests/ice_dcf_flow_priority: fix script Date: Thu, 26 May 2022 12:53:22 +0800 Message-Id: <20220526045322.137139-1-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 there is a logic issue in the script. when the app starts for a timeout, the app that may start successfully will not be closed in teardown, affecting the testing of other cases. fix it and delete some useless code. Signed-off-by: Jiale Song --- tests/TestSuite_ice_dcf_flow_priority.py | 26 +++++++----------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/tests/TestSuite_ice_dcf_flow_priority.py b/tests/TestSuite_ice_dcf_flow_priority.py index 39b2dfcc..d26fbc18 100644 --- a/tests/TestSuite_ice_dcf_flow_priority.py +++ b/tests/TestSuite_ice_dcf_flow_priority.py @@ -1895,7 +1895,6 @@ class ICEDCFFlowPriorityTest(TestCase): localPort = self.tester.get_local_port(self.dut_ports[0]) 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 PF interface name @@ -1933,8 +1932,7 @@ class ICEDCFFlowPriorityTest(TestCase): Run before each test case. """ # Switch's recpri resource cannot be released,so need to reload ice driver to release it, this is a known issue of ND - self.dut.send_expect("rmmod ice", "#", 30) - self.dut.send_expect("modprobe ice", "#", 30) + self.dut.send_expect("rmmod ice && modprobe ice", "# ", 60) def create_testpmd_command(self): """ @@ -1958,9 +1956,7 @@ class ICEDCFFlowPriorityTest(TestCase): launch testpmd with the command """ 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) + out = self.dut.send_expect(command, "testpmd> ", 60) self.dut.send_expect("set fwd rxonly", "testpmd> ", 15) self.dut.send_expect("set verbose 1", "testpmd> ", 15) @@ -2608,19 +2604,11 @@ class ICEDCFFlowPriorityTest(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" - if getattr(self, "session_secondary", None): - self.dut.close_session(self.session_secondary) + self.dut.send_expect("quit", "# ") + self.dut.kill_all() + # destroy vfs + for port_id in self.dut_ports: + self.dut.destroy_sriov_vfs_by_port(port_id) def tear_down_all(self): """