test suite reviews and discussions
 help / color / mirror / Atom feed
From: Jun Dong <junx.dong@intel.com>
To: dts@dpdk.org
Cc: lijuan.tu@intel.com, qingx.sun@intel.com, junx.dong@intel.com
Subject: [dts] [V1] framework/dut: Modify the format of eal parameter API output
Date: Mon, 14 Mar 2022 14:12:23 +0800	[thread overview]
Message-ID: <20220314061223.1003-1-junx.dong@intel.com> (raw)

- Remove blank from cores list
- Change validate rule of port to compatible with FreeBSD
- Modify file prefix generate rule to compatible with FreeBSD

Signed-off-by: Jun Dong <junx.dong@intel.com>
---
 framework/dut.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/framework/dut.py b/framework/dut.py
index 7b3535c7..4b5c34ec 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -1386,7 +1386,7 @@ class _EalParameter(object):
                 or all(map(lambda _port: type(_port) == str, ports))
                 and all(
             map(
-                lambda _port: re.match(r"^([\d\w]+:){2}[\d\w]+\.[\d\w]+$", _port),
+                lambda _port: re.match(r"^([\d\w]+:){1,2}[\d\w]+\.[\d\w]+$", _port),
                 ports,
             )
         )
@@ -1446,7 +1446,7 @@ class _EalParameter(object):
                 )
             return _formated_core_list
 
-        return f'-l {", ".join(_get_consecutive_cores_range(core_list))}'
+        return f'-l {",".join(_get_consecutive_cores_range(core_list))}'
 
     def _make_memory_channels(self) -> str:
         param_template = "-n {}"
@@ -1499,7 +1499,6 @@ class _EalParameter(object):
             if not self.fixed_prefix:
                 fixed_file_prefix = fixed_file_prefix + "_" + self.dut.prefix_subfix
         fixed_file_prefix = self._do_os_handle_with_prefix_param(fixed_file_prefix)
-        fixed_file_prefix = "--file-prefix=" + fixed_file_prefix
         return fixed_file_prefix
 
     def _make_vdevs_param(self) -> str:
@@ -1570,6 +1569,7 @@ class _EalParameter(object):
             file_prefix = ""
         else:
             self.dut.prefix_list.append(file_prefix)
+            file_prefix = "--file-prefix=" + file_prefix
         return file_prefix
 
     def make_eal_param(self) -> str:
-- 
2.33.1.windows.1


                 reply	other threads:[~2022-03-14  6:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220314061223.1003-1-junx.dong@intel.com \
    --to=junx.dong@intel.com \
    --cc=dts@dpdk.org \
    --cc=lijuan.tu@intel.com \
    --cc=qingx.sun@intel.com \
    /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).