From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id DFC5BFA5C for ; Mon, 16 Jan 2017 06:29:25 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 068B3707; Sun, 15 Jan 2017 21:29:25 -0800 (PST) Received: from localhost.localdomain.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 91B8C3F318; Sun, 15 Jan 2017 21:29:24 -0800 (PST) From: Jianbo Liu To: dts@dpdk.org Cc: Jianbo Liu Date: Mon, 16 Jan 2017 13:29:16 +0800 Message-Id: <1484544556-5473-1-git-send-email-jianbo.liu@linaro.org> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH] tests multiprocess: select lower-numbered cores for secondary process X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2017 05:29:26 -0000 It's to run this test successfully on system with fewer cores. Signed-off-by: Jianbo Liu --- 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