test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/TestSuite_mutiprocess.py add -w option when tester and dut in same server
@ 2020-08-03 17:50 lingwei
  0 siblings, 0 replies; only message in thread
From: lingwei @ 2020-08-03 17:50 UTC (permalink / raw)
  To: dts; +Cc: lingwei

add -w option when tester and dut in same server and specified mp_server
and mp_client run with different cores

Signed-off-by: lingwei <weix.ling@intel.com>
---
 tests/TestSuite_multiprocess.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_multiprocess.py b/tests/TestSuite_multiprocess.py
index 5a99ee3..218e008 100644
--- a/tests/TestSuite_multiprocess.py
+++ b/tests/TestSuite_multiprocess.py
@@ -312,16 +312,19 @@ class TestMultiprocess(TestCase):
         for execution in validExecutions:
             coreList = self.dut.get_core_list(execution['cores'], socket=self.socket)
 
-            coreMask = utils.create_mask(self.dut.get_core_list('1S/1C/1T'))
+            # get core with socket parameter to specified which core dut used when tester and dut in same server
+            coreMask = utils.create_mask(self.dut.get_core_list('1S/1C/1T', socket=self.socket))
             portMask = utils.create_mask(self.dut_ports)
-            self.dut.send_expect(self.app_mp_server + " -n %d -c %s -- -p %s -n %d" % (
-                self.dut.get_memory_channels(), "0xA0", portMask, execution['nprocs']), "Finished Process Init", 20)
+            # specified mp_server core and add -w option when tester and dut in same server
+            self.dut.send_expect(self.app_mp_server + " -n %d -c %s %s -- -p %s -n %d" % (
+                self.dut.get_memory_channels(), coreMask, self.eal_param, portMask, execution['nprocs']), "Finished Process Init", 20)
             self.dut.send_expect("^Z", "\r\n")
             self.dut.send_expect("bg", "# ")
 
             for n in range(execution['nprocs']):
                 time.sleep(5)
-                coreMask = utils.create_mask([coreList[n]])
+                # use next core as mp_client core, different from mp_server
+                coreMask = utils.create_mask([str(int(coreList[n]) + 1)])
                 self.dut.send_expect(self.app_mp_client + " -n %d -c %s --proc-type=secondary -- -n %d" % (
                     self.dut.get_memory_channels(), coreMask, n), "Finished Process Init")
                 self.dut.send_expect("^Z", "\r\n")
-- 
2.17.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-03 10:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03 17:50 [dts] [PATCH V1] tests/TestSuite_mutiprocess.py add -w option when tester and dut in same server lingwei

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).