From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 9FF5B3772 for ; Wed, 14 Oct 2015 10:24:40 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 14 Oct 2015 01:24:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,681,1437462000"; d="scan'208";a="664019666" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 14 Oct 2015 01:24:41 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 14 Oct 2015 01:24:39 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 14 Oct 2015 01:24:38 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.96]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.204]) with mapi id 14.03.0248.002; Wed, 14 Oct 2015 16:24:30 +0800 From: "Qiu, Michael" To: "Gu, YongjieX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH] add testsuite coremask Thread-Index: AQHRBiX7Ej2n5UbSt0CZiyE3Q31s/A== Date: Wed, 14 Oct 2015 08:24:30 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E6028621B49026@SHSMSX101.ccr.corp.intel.com> References: <1444788543-70429-1-git-send-email-yongjiex.gu@intel.com> <1444788543-70429-2-git-send-email-yongjiex.gu@intel.com> Accept-Language: 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 Subject: Re: [dts] [PATCH] add testsuite coremask 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, 14 Oct 2015 08:24:41 -0000 First I would like to know what's the purpose this case, if you could=0A= describe it in the commit log, it would help others to understand.=0A= =0A= On 2015/10/14 10:13, yongjie wrote:=0A= > From: GuYongjie =0A= >=0A= > Signed-off-by: GuYongjie =0A= > ---=0A= > tests/TestSuite_coremask.py | 189 ++++++++++++++++++++++++++++++++++++++= ++++++=0A= > 1 file changed, 189 insertions(+)=0A= > create mode 100644 tests/TestSuite_coremask.py=0A= >=0A= > diff --git a/tests/TestSuite_coremask.py b/tests/TestSuite_coremask.py=0A= > new file mode 100644=0A= > index 0000000..3520a9c=0A= > --- /dev/null=0A= > +++ b/tests/TestSuite_coremask.py=0A= > @@ -0,0 +1,189 @@=0A= > +# =0A= > +=0A= > +"""=0A= > +DPDK Test suite.=0A= > +=0A= > +Test coremask parsing in DPDK.=0A= > +=0A= =0A= [.../...]=0A= =0A= > + def test_wrong_coremask(self):=0A= > + """=0A= > + Check coremask parsing for wrong coremasks.=0A= > + """=0A= > +=0A= > + wrong_coremasks =3D ["GARBAGE", "0xJF", "0xFJF", "0xFFJ",=0A= > + "0xJ11", "0x1J1", "0x11J",=0A= > + "JF", "FJF", "FFJ",=0A= > + "J11", "1J1", "11J",=0A= > + "jf", "fjf", "ffj",=0A= > + "FF0x", "ff0x", "", "0x", "0"]=0A= > +=0A= =0A= Here I think, the value contains "J" or other none [a~f] should be only=0A= one entry, other wrong value could be the mask which greater the cpu=0A= number,=0A= =0A= Thanks,=0A= Michael=0A= > + for coremask in wrong_coremasks:=0A= > +=0A= > + command =3D command_line % (self.target, coremask, self.mem_= channel)=0A= > + try:=0A= > + out =3D self.dut.send_expect(command, "# ", 5)=0A= > + self.verify("EAL: invalid coremask" in out,=0A= > + "Wrong core mask (%s) accepted" % coremask)= =0A= > + except:=0A= > + self.dut.send_expect("quit", "# ", 5)=0A= > + raise VerifyFailure("Wrong core mask (%s) accepted" % co= remask)=0A= > +=0A= > + def tear_down(self):=0A= > + """=0A= > + Run after each test case.=0A= > + """=0A= > + self.dut.kill_all()=0A= > +=0A= > + def tear_down_all(self):=0A= > + """=0A= > + Run after each test suite.=0A= > + """=0A= > + pass=0A= =0A=