From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 163D6A00C5; Tue, 19 Jul 2022 03:42:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E19F440698; Tue, 19 Jul 2022 03:42:45 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id A7006400D4 for ; Tue, 19 Jul 2022 03:42:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658194964; x=1689730964; h=from:to:cc:subject:date:message-id; bh=2pN9qJCJoVW/pD5U454dIjah28HUMASRwfMLq5cDffU=; b=DLFbr/HCIBuZZPVr2DvkHrsD7lvmKXRLGLsdQlsbTHYnAkSl1WC8O2Fg jaV9v1U/pdNtGNmzK2wG1Dqb/Y2qq4bDH6lTK10PwI86wtQDSzPnSPBVi WZsc8rpgleRtiWENi/EQCjvsXvks//x8QH+7JwePLXs4VTaSbgMPWBLeo vcfJ/HffCU7QsjK2knFd+Fk7Nk2kIm7Vee49ObdICin92Crp/Ka6Rns1C ngz/8OPZv72015M1JvCplwhgcHh6smnvN8wC8F18mK7qzVe7PkVP1f+MU gnRG/rQS/jRYt30w817rdX4HcisU5zvoW8UocIQTfBzE9sarMHbEV/YXc w==; X-IronPort-AV: E=McAfee;i="6400,9594,10412"; a="273192093" X-IronPort-AV: E=Sophos;i="5.92,282,1650956400"; d="scan'208";a="273192093" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 18:42:43 -0700 X-IronPort-AV: E=Sophos;i="5.92,282,1650956400"; d="scan'208";a="924574279" Received: from unknown (HELO localhost.localdomain) ([10.239.252.94]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 18:42:42 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATCH V1] tests/ice_dcf_switch_filter: change state before launch app Date: Tue, 19 Jul 2022 10:03:49 +0000 Message-Id: <20220719100349.27583-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 status cannot be switched correctly when the app is started timeout, resulting in the failure to exit the app after the end of the case test, affecting the tests of other cases. Signed-off-by: Jiale Song --- tests/TestSuite_ice_dcf_switch_filter.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/TestSuite_ice_dcf_switch_filter.py b/tests/TestSuite_ice_dcf_switch_filter.py index 3c647be6..2c9e069c 100644 --- a/tests/TestSuite_ice_dcf_switch_filter.py +++ b/tests/TestSuite_ice_dcf_switch_filter.py @@ -1719,8 +1719,7 @@ class ICEDCFSwitchFilterTest(TestCase): time.sleep(5) def reload_ice(self): - self.dut.send_expect("rmmod ice", "# ", 15) - self.dut.send_expect("modprobe ice", "# ", 15) + self.dut.send_expect("rmmod ice && modprobe ice", "# ", 60) def set_up(self): """ @@ -1748,8 +1747,8 @@ class ICEDCFSwitchFilterTest(TestCase): launch testpmd with the command """ command = self.create_testpmd_command() - out = self.dut.send_expect(command, "testpmd> ", 15) self.testpmd_status = "running" + out = self.dut.send_expect(command, "testpmd> ", 15) 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) @@ -2265,8 +2264,8 @@ class ICEDCFSwitchFilterTest(TestCase): port_options={vf0_pci: "cap=dcf"}, ) command = self.path + all_eal_param + " -- -i" - out = self.dut.send_expect(command, "testpmd> ", 15) self.testpmd_status = "running" + out = self.dut.send_expect(command, "testpmd> ", 15) 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) @@ -2322,8 +2321,8 @@ class ICEDCFSwitchFilterTest(TestCase): port_options={vf0_pci: "cap=dcf"}, ) command = self.path + all_eal_param + " -- -i" - out = self.dut.send_expect(command, "testpmd> ", 15) self.testpmd_status = "running" + out = self.dut.send_expect(command, "testpmd> ", 15) 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) @@ -2370,8 +2369,8 @@ class ICEDCFSwitchFilterTest(TestCase): self.setup_1pf_vfs_env() # launch testpmd command = self.create_testpmd_command() - out = self.dut.send_expect(command, "testpmd> ", 15) self.testpmd_status = "running" + out = self.dut.send_expect(command, "testpmd> ", 15) 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) @@ -2406,8 +2405,8 @@ class ICEDCFSwitchFilterTest(TestCase): port_options={vf0_pci: "cap=dcf"}, ) command = self.path + all_eal_param + " -- -i" - out = self.dut.send_expect(command, "testpmd> ", 15) self.testpmd_status = "running" + out = self.dut.send_expect(command, "testpmd> ", 15) 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) @@ -2472,8 +2471,8 @@ class ICEDCFSwitchFilterTest(TestCase): cores="1S/4C/1T", ports=[vf0_pci], port_options={vf0_pci: "cap=dcf"} ) command = self.path + all_eal_param + " -- -i" - out = self.dut.send_expect(command, "testpmd> ", 15) self.testpmd_status = "running" + out = self.dut.send_expect(command, "testpmd> ", 15) # generate max_vf_number-1 rules to each vf and matched packets for i in range(1, max_vf_number): rte_flow_pattern = ( @@ -2624,8 +2623,8 @@ class ICEDCFSwitchFilterTest(TestCase): port_options={vf0_pci: "cap=dcf"}, ) command = self.path + all_eal_param + " -- -i" - out = self.dut.send_expect(command, "testpmd> ", 15) self.testpmd_status = "running" + out = self.dut.send_expect(command, "testpmd> ", 15) 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) @@ -2680,7 +2679,7 @@ class ICEDCFSwitchFilterTest(TestCase): # destroy vfs for port_id in self.dut_ports: self.dut.destroy_sriov_vfs_by_port(port_id) - self.testpmd_status = "close" + self.testpmd_status = "close" if getattr(self, "session_secondary", None): self.dut.close_session(self.session_secondary) -- 2.25.1