test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V2] tests/hotplug modify code to support 2M hugepages
@ 2022-11-10  1:42 Dukai Yuan
  2022-11-11  2:42 ` Chen, LingliX
  2022-11-18  8:18 ` lijuan.tu
  0 siblings, 2 replies; 3+ messages in thread
From: Dukai Yuan @ 2022-11-10  1:42 UTC (permalink / raw)
  To: dts; +Cc: Dukai Yuan

Add `--single-file-segments` parameter when start virtio-user side
to support running in 2M hugepage size testbed.

Signed-off-by: Dukai Yuan <dukaix.yuan@intel.com>
---
 tests/TestSuite_hotplug.py | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/tests/TestSuite_hotplug.py b/tests/TestSuite_hotplug.py
index 0f1e17fd..5cf0e933 100644
--- a/tests/TestSuite_hotplug.py
+++ b/tests/TestSuite_hotplug.py
@@ -36,6 +36,7 @@ class TestPortHotPlug(TestCase):
         else:
             self.driver_name = self.drivername
         self.path = self.dut.apps_name["test-pmd"]
+        self.session2 = self.dut.create_session(name="virtio_user")
 
     def set_up(self):
         """
@@ -122,6 +123,13 @@ class TestPortHotPlug(TestCase):
         )
         pkt.send_pkt(self.tester, tx_port=self.txItf)
 
+    @property
+    def check_2M_env(self):
+        out = self.session2.send_expect(
+            "cat /proc/meminfo |grep Hugepagesize|awk '{print($2)}'", "# "
+        )
+        return True if out == "2048" else False
+
     def test_before_attach(self):
         """
         first attach port after run testpmd
@@ -185,6 +193,8 @@ class TestPortHotPlug(TestCase):
         eal_param = self.dut.create_eal_parameters(
             no_pci=True, fixed_prefix="virtio1", cores=cores[5:9]
         )
+        if self.check_2M_env:
+            eal_param += "--single-file-segments"
         testpmd_cmd2 = "%s/%s " % (self.dut.base_dir, self.path) + eal_param + " -- -i"
         self.session2.send_expect(testpmd_cmd2, "testpmd>", timeout=60)
         self.session2.send_expect(
@@ -207,11 +217,11 @@ class TestPortHotPlug(TestCase):
         self.verify(
             rx_pkts != 0 and tx_pkts != 0, "not received packets or transport packets"
         )
-        self.session2.send_expect("show port stats 0", "testpmd", timeout=2)
-        self.session2.send_expect("stop", "testpmd", timeout=2)
-        self.session2.send_expect("quit", "#", timeout=2)
-        self.dut.send_expect("stop", "testpmd", timeout=2)
-        self.dut.send_expect("quit", "#", timeout=2)
+        self.session2.send_expect("show port stats 0", "testpmd")
+        self.session2.send_expect("stop", "testpmd")
+        self.session2.send_expect("quit", "#")
+        self.dut.send_expect("stop", "testpmd")
+        self.dut.send_expect("quit", "#")
         self.session2.close()
 
     def tear_down(self):
-- 
2.17.1


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

* RE: [dts][PATCH V2] tests/hotplug modify code to support 2M hugepages
  2022-11-10  1:42 [dts][PATCH V2] tests/hotplug modify code to support 2M hugepages Dukai Yuan
@ 2022-11-11  2:42 ` Chen, LingliX
  2022-11-18  8:18 ` lijuan.tu
  1 sibling, 0 replies; 3+ messages in thread
From: Chen, LingliX @ 2022-11-11  2:42 UTC (permalink / raw)
  To: dts


> -----Original Message-----
> From: Dukai Yuan <dukaix.yuan@intel.com>
> Sent: Thursday, November 10, 2022 9:43 AM
> To: dts@dpdk.org
> Cc: Yuan, DukaiX <dukaix.yuan@intel.com>
> Subject: [dts][PATCH V2] tests/hotplug modify code to support 2M hugepages
> 
> Add `--single-file-segments` parameter when start virtio-user side to support
> running in 2M hugepage size testbed.
> 
> Signed-off-by: Dukai Yuan <dukaix.yuan@intel.com>
> ---

Tested-by: Lingli Chen <linglix.chen@intel.com>

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

* [dts][PATCH V2] tests/hotplug modify code to support 2M hugepages
  2022-11-10  1:42 [dts][PATCH V2] tests/hotplug modify code to support 2M hugepages Dukai Yuan
  2022-11-11  2:42 ` Chen, LingliX
@ 2022-11-18  8:18 ` lijuan.tu
  1 sibling, 0 replies; 3+ messages in thread
From: lijuan.tu @ 2022-11-18  8:18 UTC (permalink / raw)
  To: dts, Dukai Yuan; +Cc: Dukai Yuan

On Thu, 10 Nov 2022 09:42:34 +0800, Dukai Yuan <dukaix.yuan@intel.com> wrote:
> Add `--single-file-segments` parameter when start virtio-user side
> to support running in 2M hugepage size testbed.
> 
> Signed-off-by: Dukai Yuan <dukaix.yuan@intel.com>


Applied, thanks

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

end of thread, other threads:[~2022-11-18  8:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10  1:42 [dts][PATCH V2] tests/hotplug modify code to support 2M hugepages Dukai Yuan
2022-11-11  2:42 ` Chen, LingliX
2022-11-18  8:18 ` 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).