From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 0AFFBE72 for ; Wed, 8 Jul 2015 11:23:20 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 08 Jul 2015 02:23:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,430,1432623600"; d="scan'208";a="520710964" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by FMSMGA003.fm.intel.com with ESMTP; 08 Jul 2015 02:23:21 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 8 Jul 2015 17:23:17 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.46]) by shsmsx102.ccr.corp.intel.com ([169.254.2.165]) with mapi id 14.03.0224.002; Wed, 8 Jul 2015 17:23:16 +0800 From: "Liu, Yong" To: "Tang, HaifengX" , "dts@dpdk.org" Thread-Topic: [dts] [DTS][PATCH V2] fix multi_process bugs Thread-Index: AQHQuV65qQWy6d6jWUOV8jFdOhAfQZ3RTJ7g Date: Wed, 8 Jul 2015 09:23:16 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10E5B56B@SHSMSX103.ccr.corp.intel.com> References: <1436346937-8498-1-git-send-email-haifengx.tang@intel.com> In-Reply-To: <1436346937-8498-1-git-send-email-haifengx.tang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "Fu, JingguoX" Subject: Re: [dts] [DTS][PATCH V2] fix multi_process bugs 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: Wed, 08 Jul 2015 09:23:21 -0000 Thanks, applied in 1.1 branch. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Haifeng Tang > Sent: Wednesday, July 08, 2015 5:16 PM > To: dts@dpdk.org > Cc: Fu, JingguoX > Subject: [dts] [DTS][PATCH V2] fix multi_process bugs >=20 > From: TangHaifeng >=20 >=20 > Signed-off-by: TangHaifeng > --- > tests/TestSuite_multiprocess.py | 39 +++++++++++++++------------------= - > ----- > 1 files changed, 15 insertions(+), 24 deletions(-) >=20 > diff --git a/tests/TestSuite_multiprocess.py > b/tests/TestSuite_multiprocess.py > index 4ef5313..a19967c 100644 > --- a/tests/TestSuite_multiprocess.py > +++ b/tests/TestSuite_multiprocess.py > @@ -37,7 +37,6 @@ Multi-process Test. > import dts > import time > from etgen import IxiaPacketGenerator > - > executions =3D [] > from test_case import TestCase >=20 > @@ -68,6 +67,7 @@ class TestMultiprocess(TestCase, IxiaPacketGenerator): > executions.append({'nprocs': 4, 'cores': '1S/2C/2T', 'pps': 0}) > executions.append({'nprocs': 4, 'cores': '1S/4C/1T', 'pps': 0}) > executions.append({'nprocs': 8, 'cores': '1S/4C/2T', 'pps': 0}) > + self.dut.alt_session.send_expect("cd dpdk","# ",5) >=20 > def set_up(self): > """ > @@ -79,28 +79,22 @@ class TestMultiprocess(TestCase, IxiaPacketGenerator)= : > """ > Basic operation. > """ > - > # Send message from secondary to primary > - > self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/sim= p > le_mp -n 1 -c 3 --proc-type=3Dprimary > out &" % self.target, "# ", 10) > + > self.dut.alt_session.send_expect("./examples/multi_process/simple_mp/simp= l > e_mp/%s/simple_mp -n 1 -c 3 --proc-type=3Dprimary |tee out " % self.targ= et, > "Finished Process Init", 100) > time.sleep(20) > - > self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/sim= p > le_mp -n 1 -c C --proc-type=3Dsecondary" % self.target, "Finished Process > Init", 10) > + > self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/sim= p > le_mp -n 1 -c C --proc-type=3Dsecondary" % self.target, "Finished Process > Init", 100) >=20 > self.dut.send_expect("send hello_primary", ">") > self.dut.send_expect("quit", "# ") > - self.dut.send_expect("fg", "simple_mp") > - self.dut.send_expect("quit", "# ") > - out =3D self.dut.send_expect("cat out", "# ") > - > + self.dut.alt_session.send_expect("quit","# ") > + out =3D self.dut.alt_session.send_expect("cat out","# ") > self.verify("Received 'hello_primary'" in out, "Message not > received on primary process") > - > # Send message from primary to secondary > - > self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/sim= p > le_mp -n 1 -c 3 --proc-type=3Dprimary &" % self.target, "# ", 10) > + > self.dut.alt_session.send_expect("./examples/multi_process/simple_mp/simp= l > e_mp/%s/simple_mp -n 1 -c 3 --proc-type=3Dprimary " % self.target, "Finis= hed > Process Init", 10) > time.sleep(20) > - > self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/sim= p > le_mp -n 1 -c C --proc-type=3Dsecondary > out &" % self.target, "Finished > Process Init", 10) > - self.dut.send_expect("fg 1", "simple_mp") > - self.dut.send_expect("send hello_secondary", ">") > - self.dut.send_expect("quit", "# ") > - self.dut.send_expect("fg 2", "simple_mp") > + > self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/sim= p > le_mp -n 1 -c C --proc-type=3Dsecondary | tee out " % self.target, > "Finished Process Init", 10) > + self.dut.alt_session.send_expect("send hello_secondary", ">") > + self.dut.alt_session.send_expect("quit", "# ") > self.dut.send_expect("quit", "# ") > out =3D self.dut.send_expect("cat out", "# ") >=20 > @@ -138,7 +132,7 @@ class TestMultiprocess(TestCase, IxiaPacketGenerator)= : > self.dut.kill_all() >=20 > # Send message from secondary to primary (auto process type) > - > self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/sim= p > le_mp -n 1 -c 3 --proc-type=3Dauto > out &" % self.target, "# ", 30) > + > self.dut.alt_session.send_expect("./examples/multi_process/simple_mp/simp= l > e_mp/%s/simple_mp -n 1 -c 3 --proc-type=3Dauto |tee out " % self.target, > "Finished Process Init", 30) > time.sleep(20) > out =3D > self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/sim= p > le_mp -n 1 -c C --proc-type=3Dauto" % self.target, "Finished Process Init= ", > 30) > self.verify("EAL: Auto-detected process type: SECONDARY" in out, > @@ -146,21 +140,18 @@ class TestMultiprocess(TestCase, > IxiaPacketGenerator): >=20 > self.dut.send_expect("send hello_primary", ">") > self.dut.send_expect("quit", "# ") > - self.dut.send_expect("fg", "simple_mp") > - self.dut.send_expect("quit", "# ") > + self.dut.alt_session.send_expect("quit", "# ") > out =3D self.dut.send_expect("cat out", "# ") >=20 > self.verify("EAL: Auto-detected process type: PRIMARY" in out, > "The type of process (PRIMARY) was not detected properly") > self.verify("Received 'hello_primary'" in out, "Message not > received on primary process") >=20 > # Send message from primary to secondary (auto process type) > - out =3D > self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/sim= p > le_mp -n 1 -c 3 --proc-type=3Dauto > out_primary &" % self.target, "# ", = 30) > + out =3D > self.dut.alt_session.send_expect("./examples/multi_process/simple_mp/simp= l > e_mp/%s/simple_mp -n 1 -c 3 --proc-type=3Dauto |tee out_primary " % > self.target, "Finished Process Init", 30) > time.sleep(20) > - > self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/sim= p > le_mp -n 1 -c C --proc-type=3Dauto > out_secondary &" % self.target, "#",= 30) > - self.dut.send_expect("fg 1", "simple_mp") > - self.dut.send_expect("send hello_secondary", ">") > - self.dut.send_expect("quit", "# ") > - self.dut.send_expect("fg 2", "simple_mp") > + > self.dut.send_expect("./examples/multi_process/simple_mp/simple_mp/%s/sim= p > le_mp -n 1 -c C --proc-type=3Dauto |tee out_secondary " % self.target, > "Finished Process Init", 30) > + self.dut.alt_session.send_expect("send hello_secondary", ">",100= ) > + self.dut.alt_session.send_expect("quit", "# ") > self.dut.send_expect("quit", "# ") > out =3D self.dut.send_expect("cat out_primary", "# ") > self.verify("EAL: Auto-detected process type: PRIMARY" in out, > "The type of process (PRIMARY) was not detected properly") > -- > 1.7.4.4