* [dts] [PATCH V1] tests/ice_dcf_flow_priority: fix script
@ 2022-05-26 4:53 Jiale Song
2022-05-28 9:04 ` lijuan.tu
2022-05-28 9:13 ` lijuan.tu
0 siblings, 2 replies; 3+ messages in thread
From: Jiale Song @ 2022-05-26 4:53 UTC (permalink / raw)
To: dts; +Cc: Jiale Song
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 <songx.jiale@intel.com>
---
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):
"""
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dts] [PATCH V1] tests/ice_dcf_flow_priority: fix script
2022-05-26 4:53 [dts] [PATCH V1] tests/ice_dcf_flow_priority: fix script Jiale Song
@ 2022-05-28 9:04 ` lijuan.tu
2022-05-28 9:13 ` lijuan.tu
1 sibling, 0 replies; 3+ messages in thread
From: lijuan.tu @ 2022-05-28 9:04 UTC (permalink / raw)
To: dts, Jiale Song; +Cc: Jiale Song
On Thu, 26 May 2022 12:53:22 +0800, Jiale Song <songx.jiale@intel.com> wrote:
> 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 <songx.jiale@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dts] [PATCH V1] tests/ice_dcf_flow_priority: fix script
2022-05-26 4:53 [dts] [PATCH V1] tests/ice_dcf_flow_priority: fix script Jiale Song
2022-05-28 9:04 ` lijuan.tu
@ 2022-05-28 9:13 ` lijuan.tu
1 sibling, 0 replies; 3+ messages in thread
From: lijuan.tu @ 2022-05-28 9:13 UTC (permalink / raw)
To: dts, Jiale Song; +Cc: Jiale Song
On Thu, 26 May 2022 12:53:22 +0800, Jiale Song <songx.jiale@intel.com> wrote:
> 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 <songx.jiale@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-28 9:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-26 4:53 [dts] [PATCH V1] tests/ice_dcf_flow_priority: fix script Jiale Song
2022-05-28 9:04 ` lijuan.tu
2022-05-28 9:13 ` lijuan.tu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).