* [dts] [PATCH] tests multiprocess: select lower-numbered cores for secondary process
@ 2017-01-16 5:29 Jianbo Liu
2017-01-18 8:13 ` Liu, Yong
0 siblings, 1 reply; 2+ messages in thread
From: Jianbo Liu @ 2017-01-16 5:29 UTC (permalink / raw)
To: dts; +Cc: Jianbo Liu
It's to run this test successfully on system with fewer cores.
Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
---
tests/TestSuite_multiprocess.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/TestSuite_multiprocess.py b/tests/TestSuite_multiprocess.py
index b305437..ec06b1d 100644
--- a/tests/TestSuite_multiprocess.py
+++ b/tests/TestSuite_multiprocess.py
@@ -87,7 +87,7 @@ class TestMultiprocess(TestCase, IxiaPacketGenerator):
coremask = utils.create_mask(cores)
self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/simple_mp -n 1 -c %s --proc-type=primary" % (self.target, coremask), "Finished Process Init", 100)
time.sleep(20)
- coremask = hex(int(coremask, 16) * 0x10000).rstrip("L")
+ coremask = hex(int(coremask, 16) * 0x100).rstrip("L")
self.session_secondary.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/simple_mp -n 1 -c %s --proc-type=secondary" % (self.target, coremask), "Finished Process Init", 100)
self.session_secondary.send_expect("send hello_primary", ">")
@@ -100,7 +100,7 @@ class TestMultiprocess(TestCase, IxiaPacketGenerator):
coremask = utils.create_mask(cores)
self.session_secondary.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/simple_mp -n 1 -c %s --proc-type=primary " % (self.target, coremask), "Finished Process Init", 100)
time.sleep(20)
- coremask = hex(int(coremask, 16) * 0x10000).rstrip("L")
+ coremask = hex(int(coremask, 16) * 0x100).rstrip("L")
self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/simple_mp -n 1 -c %s --proc-type=secondary" % (self.target, coremask), "Finished Process Init", 100)
self.session_secondary.send_expect("send hello_secondary", ">")
out = self.dut.get_session_output()
@@ -119,7 +119,7 @@ class TestMultiprocess(TestCase, IxiaPacketGenerator):
coremask = utils.create_mask(cores)
self.session_secondary.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/simple_mp -n 1 -c %s --proc-type=primary" % (self.target, coremask), "Finished Process Init", 100)
time.sleep(20)
- coremask = hex(int(coremask, 16) * 0x10000).rstrip("L")
+ coremask = hex(int(coremask, 16) * 0x100).rstrip("L")
self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/simple_mp -n 1 -c %s --proc-type=secondary" % (self.target, coremask), "Finished Process Init", 100)
stringsSent = 0
for line in open('/usr/share/dict/words', 'r').readlines():
@@ -144,7 +144,7 @@ class TestMultiprocess(TestCase, IxiaPacketGenerator):
out = self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/simple_mp -n 1 -c %s --proc-type=auto " % (self.target, coremask), "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) * 0x10000).rstrip("L")
+ coremask = hex(int(coremask, 16) * 0x100).rstrip("L")
out = self.session_secondary.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/simple_mp -n 1 -c %s --proc-type=auto" % (self.target, coremask), "Finished Process Init", 100)
self.verify("EAL: Auto-detected process type: SECONDARY" in out,
"The type of process (SECONDARY) was not detected properly")
@@ -161,7 +161,7 @@ class TestMultiprocess(TestCase, IxiaPacketGenerator):
out = self.session_secondary.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/simple_mp -n 1 -c %s --proc-type=auto" % (self.target, coremask), "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) * 0x10000).rstrip("L")
+ coremask = hex(int(coremask, 16) * 0x100).rstrip("L")
out = self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/simple_mp -n 1 -c %s --proc-type=auto" % (self.target, coremask), "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)
@@ -180,7 +180,7 @@ class TestMultiprocess(TestCase, IxiaPacketGenerator):
cores = self.dut.get_core_list('1S/2C/1T')
coremask = utils.create_mask(cores)
self.session_secondary.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/simple_mp -n 1 -c %s -m 64" % (self.target, coremask), "Finished Process Init", 100)
- coremask = hex(int(coremask, 16) * 0x10000).rstrip("L")
+ coremask = hex(int(coremask, 16) * 0x100).rstrip("L")
out = self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/simple_mp -n 1 -c %s" % (self.target, coremask), "# ", 100)
self.verify("Is another primary process running" in out,
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] [PATCH] tests multiprocess: select lower-numbered cores for secondary process
2017-01-16 5:29 [dts] [PATCH] tests multiprocess: select lower-numbered cores for secondary process Jianbo Liu
@ 2017-01-18 8:13 ` Liu, Yong
0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2017-01-18 8:13 UTC (permalink / raw)
To: Jianbo Liu, dts
Thanks Jianbo, applied into master branch.
On 01/16/2017 01:29 PM, Jianbo Liu wrote:
> It's to run this test successfully on system with fewer cores.
>
> Signed-off-by: Jianbo Liu<jianbo.liu@linaro.org>
> ---
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-18 8:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-16 5:29 [dts] [PATCH] tests multiprocess: select lower-numbered cores for secondary process Jianbo Liu
2017-01-18 8:13 ` Liu, Yong
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).