test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1] tests/port_control: optimize the test script to make run stably
@ 2022-08-01  5:27 Weiyuan Li
  2022-08-03  6:05 ` Jiale, SongX
  2022-09-07  4:15 ` Peng, Yuan
  0 siblings, 2 replies; 3+ messages in thread
From: Weiyuan Li @ 2022-08-01  5:27 UTC (permalink / raw)
  To: dts; +Cc: Weiyuan Li

The case of VF binds PF port to kernel driver, and the next test case
of PF needs to be bound to the dpdk driver, but it does not test failed.
So, add check whether the PF port is bound to the dpdk driver.

Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
 tests/TestSuite_port_control.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/TestSuite_port_control.py b/tests/TestSuite_port_control.py
index d571b01f..7d5b2b7b 100644
--- a/tests/TestSuite_port_control.py
+++ b/tests/TestSuite_port_control.py
@@ -37,6 +37,7 @@ class TestPortControl(TestCase):
         self.socket = self.dut.get_numa_id(self.dut_ports[0])
         port = self.dut.ports_info[0]["port"]
         self.pf_default_driver = port.get_nic_driver()
+        self.driver = self.get_suite_cfg()["vf_driver"]
 
     def set_up(self):
         """
@@ -191,6 +192,14 @@ class TestPortControl(TestCase):
         )
 
     def test_pf_start_stop_reset_close(self):
+        # check PF whether bind to vfio-pci
+        res = self.dut.send_expect("usertools/dpdk-devbind.py -s", "#")
+        pattern = f"({self.dut.nic.pci}).*drv=vfio-pci"
+        regex = re.compile(pattern)
+        mo = regex.search(res)
+        if mo is None:
+            self.bind_nic_driver(self.dut_ports[:1], driver=self.driver)
+
         self.start_testpmd(self.host_testpmd)
         # start port
         self.start_pmd_port(self.host_testpmd)
-- 
2.27.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [dts][PATCH V1] tests/port_control: optimize the test script to make run stably
  2022-08-01  5:27 [dts][PATCH V1] tests/port_control: optimize the test script to make run stably Weiyuan Li
@ 2022-08-03  6:05 ` Jiale, SongX
  2022-09-07  4:15 ` Peng, Yuan
  1 sibling, 0 replies; 3+ messages in thread
From: Jiale, SongX @ 2022-08-03  6:05 UTC (permalink / raw)
  To: Li, WeiyuanX, dts; +Cc: Li, WeiyuanX

[-- Attachment #1: Type: text/plain, Size: 604 bytes --]

> -----Original Message-----
> From: Weiyuan Li <weiyuanx.li@intel.com>
> Sent: Monday, August 1, 2022 1:28 PM
> To: dts@dpdk.org
> Cc: Li, WeiyuanX <weiyuanx.li@intel.com>
> Subject: [dts][PATCH V1] tests/port_control: optimize the test script to make run
> stably
> 
> The case of VF binds PF port to kernel driver, and the next test case of PF needs to
> be bound to the dpdk driver, but it does not test failed.
> So, add check whether the PF port is bound to the dpdk driver.
> 
> Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
> ---
Tested-by: Jiale Song < songx.jiale@intel.com>

[-- Attachment #2: TestPortControl.log --]
[-- Type: application/octet-stream, Size: 383009 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [dts][PATCH V1] tests/port_control: optimize the test script to make run stably
  2022-08-01  5:27 [dts][PATCH V1] tests/port_control: optimize the test script to make run stably Weiyuan Li
  2022-08-03  6:05 ` Jiale, SongX
@ 2022-09-07  4:15 ` Peng, Yuan
  1 sibling, 0 replies; 3+ messages in thread
From: Peng, Yuan @ 2022-09-07  4:15 UTC (permalink / raw)
  To: Li, WeiyuanX, dts; +Cc: Li, WeiyuanX

Acked-by: Peng, Yuan <yuan.peng@intel.com>

-----Original Message-----
From: Weiyuan Li <weiyuanx.li@intel.com> 
Sent: Monday, August 1, 2022 1:28 PM
To: dts@dpdk.org
Cc: Li, WeiyuanX <weiyuanx.li@intel.com>
Subject: [dts][PATCH V1] tests/port_control: optimize the test script to make run stably

The case of VF binds PF port to kernel driver, and the next test case of PF needs to be bound to the dpdk driver, but it does not test failed.
So, add check whether the PF port is bound to the dpdk driver.

Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-07  4:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-01  5:27 [dts][PATCH V1] tests/port_control: optimize the test script to make run stably Weiyuan Li
2022-08-03  6:05 ` Jiale, SongX
2022-09-07  4:15 ` Peng, Yuan

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).