test suite reviews and discussions
 help / color / mirror / Atom feed
From: Haiyang Zhao <haiyangx.zhao@intel.com>
To: dts@dpdk.org
Cc: zhaoyan.chen@intel.com, Haiyang Zhao <haiyangx.zhao@intel.com>
Subject: [dts] [PATCH V1 3/5] framework/dut:add -d parameters in create_eal_parameters when use shared mode
Date: Wed, 15 Jan 2020 17:12:25 +0800	[thread overview]
Message-ID: <1579079547-52758-3-git-send-email-haiyangx.zhao@intel.com> (raw)
In-Reply-To: <1579079547-52758-1-git-send-email-haiyangx.zhao@intel.com>

*.add -d parameters in create_eal_parameters. 
*.fix pep8 issues. 
*.when out returned by self.tester.send_ping is None,
  the judgement statement will cause an exception, fixed it.

Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
 framework/dut.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/framework/dut.py b/framework/dut.py
index 5409b93..60745e6 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -190,7 +190,7 @@ class Dut(Crb):
                           + blank + b_ports_str \
                           + blank + no_pci \
                           + blank + vdev
-		self.prefix_list = []
+                self.prefix_list = []
             else:
                 eal_str = '-l ' + ','.join(map(str, core_list)) \
                           + blank + '-n %d' % self.get_memory_channels() \
@@ -215,12 +215,16 @@ class Dut(Crb):
                 eal_str = '-l ' + ','.join(map(str, core_list)) \
                           + blank + '-n %d' % self.get_memory_channels() \
                           + blank + pci_str
-		self.prefix_list = []
+                self.prefix_list = []
             else:
                 eal_str = '-l ' + ','.join(map(str, core_list)) \
                           + blank + '-n %d' % self.get_memory_channels() \
                           + blank + pci_str \
                           + blank + '--file-prefix=' + file_prefix
+        use_shared_lib = settings.load_global_setting(settings.HOST_SHARED_LIB_SETTING)
+        shared_lib_path = settings.load_global_setting(settings.HOST_SHARED_LIB_PATH)
+        if use_shared_lib == 'true' and shared_lib_path and 'Virt' not in str(self):
+            eal_str = eal_str + ' -d {}'.format(shared_lib_path)
 
         return eal_str
 
@@ -1185,7 +1189,7 @@ class Dut(Crb):
                         out = self.tester.send_ping6(
                             remotePort, ipv6, self.get_mac_address(dutPort))
 
-                    if ('64 bytes from' in out):
+                    if out and '64 bytes from' in out:
                         self.logger.info("PORT MAP: [dut %d: tester %d]" % (dutPort, remotePort))
                         self.ports_map[dutPort] = remotePort
                         hits[remotePort] = True
-- 
1.8.3.1


  parent reply	other threads:[~2020-01-15  9:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15  9:12 [dts] [PATCH V1 1/5] framework/settings:add two global variable for shared library Haiyang Zhao
2020-01-15  9:12 ` [dts] [PATCH V1 2/5] framework/dts:add parameters parse " Haiyang Zhao
2020-01-15  9:12 ` Haiyang Zhao [this message]
2020-01-15  9:12 ` [dts] [PATCH V1 4/5] framework/project_dpdk:set shared lib in config/common_base when use shared mode Haiyang Zhao
2020-01-15  9:12 ` [dts] [PATCH V1 5/5] framework/virt_dut:optimize code Haiyang Zhao
2020-01-16  6:02 ` [dts] [PATCH V1 1/5] framework/settings:add two global variable for shared library 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=1579079547-52758-3-git-send-email-haiyangx.zhao@intel.com \
    --to=haiyangx.zhao@intel.com \
    --cc=dts@dpdk.org \
    --cc=zhaoyan.chen@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).