test suite reviews and discussions
 help / color / mirror / Atom feed
From: Zhou Jun <junx.w.zhou@intel.com>
To: dts@dpdk.org
Cc: Zhou Jun <junx.w.zhou@intel.com>
Subject: [dts] [dts 15/28] tests/TestSuite_multiprocess:Modify the hard coded app parameter to call the platform interface
Date: Tue,  8 Dec 2020 18:06:14 +0800	[thread overview]
Message-ID: <20201208100627.9792-16-junx.w.zhou@intel.com> (raw)
In-Reply-To: <20201208100627.9792-1-junx.w.zhou@intel.com>

Signed-off-by: Zhou Jun <junx.w.zhou@intel.com>
---
 tests/TestSuite_multiprocess.py | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/tests/TestSuite_multiprocess.py b/tests/TestSuite_multiprocess.py
index d38123ad..743ca1f3 100644
--- a/tests/TestSuite_multiprocess.py
+++ b/tests/TestSuite_multiprocess.py
@@ -87,6 +87,7 @@ class TestMultiprocess(TestCase):
         for i in self.dut_ports:
             self.eal_param += " -w %s" % self.dut.ports_info[i]['pci']
 
+        self.eal_para = self.dut.create_eal_parameters(cores='1S/2C/1T')
         # start new session to run secondary
         self.session_secondary = self.dut.new_session()
 
@@ -113,12 +114,12 @@ class TestMultiprocess(TestCase):
         # Send message from secondary to primary
         cores = self.dut.get_core_list('1S/2C/1T', socket=self.socket)
         coremask = utils.create_mask(cores)
-        self.dut.send_expect(self.app_simple_mp + " -n 1 -c %s --proc-type=primary" % (coremask),
+        self.dut.send_expect(self.app_simple_mp + " %s --proc-type=primary" % (self.eal_para),
                              "Finished Process Init", 100)
         time.sleep(20)
         coremask = hex(int(coremask, 16) * 0x10).rstrip("L")
         self.session_secondary.send_expect(
-            self.app_simple_mp + " -n 1 -c %s --proc-type=secondary" % (coremask), "Finished Process Init",
+            self.app_simple_mp + " %s --proc-type=secondary" % (self.eal_para), "Finished Process Init",
             100)
 
         self.session_secondary.send_expect("send hello_primary", ">")
@@ -130,10 +131,10 @@ class TestMultiprocess(TestCase):
         cores = self.dut.get_core_list('1S/2C/1T', socket=self.socket)
         coremask = utils.create_mask(cores)
         self.session_secondary.send_expect(
-            self.app_simple_mp + " -n 1 -c %s --proc-type=primary " % (coremask), "Finished Process Init", 100)
+            self.app_simple_mp + " %s --proc-type=primary " % (self.eal_para), "Finished Process Init", 100)
         time.sleep(20)
         coremask = hex(int(coremask, 16) * 0x10).rstrip("L")
-        self.dut.send_expect(self.app_simple_mp + " -n 1 -c %s --proc-type=secondary" % (coremask),
+        self.dut.send_expect(self.app_simple_mp + " %s --proc-type=secondary" % (self.eal_para),
                              "Finished Process Init", 100)
         self.session_secondary.send_expect("send hello_secondary", ">")
         out = self.dut.get_session_output()
@@ -150,11 +151,11 @@ class TestMultiprocess(TestCase):
 
         cores = self.dut.get_core_list('1S/2C/1T', socket=self.socket)
         coremask = utils.create_mask(cores)
-        self.session_secondary.send_expect(self.app_simple_mp + " -n 1 -c %s --proc-type=primary" % (coremask),
+        self.session_secondary.send_expect(self.app_simple_mp + " %s --proc-type=primary" % (self.eal_para),
                                            "Finished Process Init", 100)
         time.sleep(20)
         coremask = hex(int(coremask, 16) * 0x10).rstrip("L")
-        self.dut.send_expect(self.app_simple_mp + " -n 1 -c %s --proc-type=secondary" % (coremask),
+        self.dut.send_expect(self.app_simple_mp + " %s --proc-type=secondary" % (self.eal_para),
                              "Finished Process Init", 100)
         stringsSent = 0
         for line in open('/usr/share/dict/words', 'r').readlines():
@@ -176,13 +177,13 @@ class TestMultiprocess(TestCase):
         # Send message from secondary to primary (auto process type)
         cores = self.dut.get_core_list('1S/2C/1T', socket=self.socket)
         coremask = utils.create_mask(cores)
-        out = self.dut.send_expect(self.app_simple_mp + " -n 1 -c %s --proc-type=auto " % (coremask),
+        out = self.dut.send_expect(self.app_simple_mp + " %s --proc-type=auto " % (self.eal_para),
                                    "Finished Process Init", 100)
         self.verify("EAL: Auto-detected process type: PRIMARY" in out, "The type of process (PRIMARY) was not detected properly")
         time.sleep(20)
         coremask = hex(int(coremask, 16) * 0x10).rstrip("L")
         out = self.session_secondary.send_expect(
-            self.app_simple_mp + " -n 1 -c %s --proc-type=auto" % (coremask), "Finished Process Init", 100)
+            self.app_simple_mp + " %s --proc-type=auto" % (self.eal_para), "Finished Process Init", 100)
         self.verify("EAL: Auto-detected process type: SECONDARY" in out,
                     "The type of process (SECONDARY) was not detected properly")
 
@@ -196,11 +197,11 @@ class TestMultiprocess(TestCase):
         cores = self.dut.get_core_list('1S/2C/1T', socket=self.socket)
         coremask = utils.create_mask(cores)
         out = self.session_secondary.send_expect(
-            self.app_simple_mp + " -n 1 -c %s --proc-type=auto" % (coremask), "Finished Process Init", 100)
+            self.app_simple_mp + " %s --proc-type=auto" % (self.eal_para), "Finished Process Init", 100)
         self.verify("EAL: Auto-detected process type: PRIMARY" in out, "The type of process (PRIMARY) was not detected properly")
         time.sleep(20)
         coremask = hex(int(coremask, 16) * 0x10).rstrip("L")
-        out = self.dut.send_expect(self.app_simple_mp + " -n 1 -c %s --proc-type=auto" % (coremask),
+        out = self.dut.send_expect(self.app_simple_mp + " %s --proc-type=auto" % (self.eal_para),
                                    "Finished Process Init", 100)
         self.verify("EAL: Auto-detected process type: SECONDARY" in out, "The type of process (SECONDARY) was not detected properly")
         self.session_secondary.send_expect("send hello_secondary", ">", 100)
@@ -218,10 +219,10 @@ class TestMultiprocess(TestCase):
 
         cores = self.dut.get_core_list('1S/2C/1T', socket=self.socket)
         coremask = utils.create_mask(cores)
-        self.session_secondary.send_expect(self.app_simple_mp + " -n 1 -c %s -m 64" % (coremask),
+        self.session_secondary.send_expect(self.app_simple_mp + " %s -m 64" % (self.eal_para),
                                            "Finished Process Init", 100)
         coremask = hex(int(coremask, 16) * 0x10).rstrip("L")
-        out = self.dut.send_expect(self.app_simple_mp + " -n 1 -c %s" % (coremask), "# ", 100)
+        out = self.dut.send_expect(self.app_simple_mp + " %s" % (self.eal_para), "# ", 100)
 
         self.verify("Is another primary process running" in out,
                     "No other primary process detected")
-- 
2.17.1


  parent reply	other threads:[~2020-12-08 10:04 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 10:05 [dts] [PATCH V1 00/28] Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 01/28] tests/TestSuite_hello_world:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 02/28] tests/TestSuite_hotplug:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 03/28] tests/TestSuite_inline_ipsec:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 04/28] tests/TestSuite_interrupt_pmd:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 05/28] tests/TestSuite_ip_pipeline:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 06/28] tests/TestSuite_ipfrag:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 07/28] tests/TestSuite_ipv4_reassembly:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 08/28] tests/TestSuite_keep_alive:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 09/28] tests/TestSuite_kni:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 10/28] tests/TestSuite_l2fwd_jobstats:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 11/28] tests/TestSuite_l3fwdacl:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 12/28] tests/TestSuite_link_status_interrupt:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 13/28] tests/TestSuite_metering_and_policing:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 14/28] tests/TestSuite_multicast:Modify " Zhou Jun
2020-12-08 10:06 ` Zhou Jun [this message]
2020-12-08 10:06 ` [dts] [dts 16/28] tests/TestSuite_packet_ordering:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 17/28] tests/TestSuite_pmdpcap:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 18/28] tests/TestSuite_pmdrss_hash:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 19/28] tests/TestSuite_pmdrssreta:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 20/28] tests/TestSuite_ptpclient:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 21/28] tests/TestSuite_queue_start_stop:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 22/28] tests/TestSuite_rxtx_callbacks:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 23/28] tests/TestSuite_short_live:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 24/28] tests/TestSuite_skeleton:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 25/28] tests/TestSuite_softnic:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 26/28] tests/TestSuite_timer:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 27/28] tests/TestSuite_tso:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 28/28] tests/TestSuite_userspace_ethtool:Modify " Zhou Jun
2020-12-09  1:53 ` [dts] [PATCH V1 00/28] Modify " Zhao, HaiyangX
2020-12-10  8:43 ` 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=20201208100627.9792-16-junx.w.zhou@intel.com \
    --to=junx.w.zhou@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).