From: JiangYuX <yux.jiang@intel.com>
To: dts@dpdk.org
Cc: JiangYu <yux.jiang@intel.com>
Subject: [dts] [PATCH V1] tests/TestSuite_vhost_1024_ethports: support meson build
Date: Thu, 17 Sep 2020 17:36:56 +0800 [thread overview]
Message-ID: <20200917093656.14417-1-yux.jiang@intel.com> (raw)
From: JiangYu <yux.jiang@intel.com>
1, adapt meson build: include app_name, killall app_name, build method
2, optimize checkpoints.
Signed-off-by: JiangYu <yux.jiang@intel.com>
---
tests/TestSuite_vhost_1024_ethports.py | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/tests/TestSuite_vhost_1024_ethports.py b/tests/TestSuite_vhost_1024_ethports.py
index b764936..afac0fa 100644
--- a/tests/TestSuite_vhost_1024_ethports.py
+++ b/tests/TestSuite_vhost_1024_ethports.py
@@ -52,24 +52,30 @@ class TestVhost1024Ethports(TestCase):
cores = self.dut.get_core_list("1S/2C/1T")
self.pci_info = self.dut.ports_info[0]['pci']
self.build_user_dpdk()
+ self.testpmd_path=self.dut.apps_name['test-pmd']
+ self.testpmd_name = self.testpmd_path.split("/")[-1]
def set_up(self):
"""
Run before each test case.
"""
self.dut.send_expect('rm -rf ./vhost-net*', '# ')
- self.dut.send_expect('killall -s INT testpmd', '# ')
+ self.dut.send_expect('killall -s INT %s' % self.testpmd_name, '# ')
self.vhost_user = self.dut.new_session(suite='vhost-user')
def build_user_dpdk(self):
- self.dut.send_expect(
- "sed -i 's/CONFIG_RTE_MAX_ETHPORTS=32$/CONFIG_RTE_MAX_ETHPORTS=1024/' config/common_base", '#', 30)
- self.dut.build_install_dpdk(self.target)
+ if self.dut.build_type == "meson":
+ self.dut.build_install_dpdk(self.target, extra_options="-Dmax_ethports=1024")
+ else:
+ self.dut.send_expect("sed -i 's/CONFIG_RTE_MAX_ETHPORTS=32$/CONFIG_RTE_MAX_ETHPORTS=1024/' config/common_base", '#', 30)
+ self.dut.build_install_dpdk(self.target)
def restore_dpdk(self):
- self.dut.send_expect(
- "sed -i 's/CONFIG_RTE_MAX_ETHPORTS=1024$/CONFIG_RTE_MAX_ETHPORTS=32/' config/common_base", '#', 30)
- self.dut.build_install_dpdk(self.target)
+ if self.dut.build_type == "meson":
+ self.dut.build_install_dpdk(self.target, extra_options="-Dmax_ethports=32")
+ else:
+ self.dut.send_expect("sed -i 's/CONFIG_RTE_MAX_ETHPORTS=1024$/CONFIG_RTE_MAX_ETHPORTS=32/' config/common_base", '#', 30)
+ self.dut.build_install_dpdk(self.target)
@property
def check_2M_env(self):
@@ -88,9 +94,10 @@ class TestVhost1024Ethports(TestCase):
for ethport in range(self.max_ethport):
command_line_vdev += '--vdev "eth_vhost%d,iface=vhost-net%d,queues=%d" ' %(ethport, ethport, self.queue)
eal_params = self.dut.create_eal_parameters(cores="1S/2C/1T", prefix='vhost', ports=[self.pci_info])
- command_line_client = self.dut.target + '/app/testpmd ' + eal_params + command_line_vdev + ' -- -i'
+ command_line_client = self.testpmd_path + eal_params + command_line_vdev + ' -- -i'
try:
out = self.vhost_user.send_expect(command_line_client, 'testpmd> ', 120)
+ self.verify("Failed to create eth_vhost" not in out, "Failed to create some vhost_ethports")
except Exception as e:
self.verify(0, 'start testpmd failed')
self.vhost_user.send_expect("quit", "#", 120)
--
2.7.4
next reply other threads:[~2020-09-17 9:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 9:36 JiangYuX [this message]
2020-09-17 9:45 ` Jiang, YuX
2020-09-22 8:03 ` Ma, LihongX
2020-09-23 8:34 ` Tu, Lijuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200917093656.14417-1-yux.jiang@intel.com \
--to=yux.jiang@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).