From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 2DF44952 for ; Sun, 12 Jun 2016 03:16:05 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 11 Jun 2016 18:16:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,459,1459839600"; d="scan'208";a="1000121191" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga002.fm.intel.com with ESMTP; 11 Jun 2016 18:16:04 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sat, 11 Jun 2016 18:16:04 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sat, 11 Jun 2016 18:16:04 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.181]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.116]) with mapi id 14.03.0248.002; Sun, 12 Jun 2016 09:16:02 +0800 From: "Liu, Yong" To: "Xu, HuilongX" , "dts@dpdk.org" CC: "Xu, HuilongX" Thread-Topic: [dts] [PATCH V1] update dump mempool case Thread-Index: AQHRvG4+r7IQJPZv3kaNI4M86fHs25/lFw1w Date: Sun, 12 Jun 2016 01:16:01 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E2223839C@SHSMSX103.ccr.corp.intel.com> References: <1464830671-4116-1-git-send-email-huilongx.xu@intel.com> In-Reply-To: <1464830671-4116-1-git-send-email-huilongx.xu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWM5YmJlNDktNjk3My00YmNmLWJiNGItNGRlYmVkODIyN2M1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkxQZjRlVGpIeXBlalVJWmVJRFwvQnZsa1plMVRqMW1wWkRzRHE3THVFbUpvPSJ9 x-ctpclassification: CTP_IC 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 V1] update dump mempool case 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: Sun, 12 Jun 2016 01:16:05 -0000 Applied, thanks. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong > Sent: Thursday, June 02, 2016 9:25 AM > To: dts@dpdk.org > Cc: Xu, HuilongX > Subject: [dts] [PATCH V1] update dump mempool case >=20 > mempool struct changed already, so need update dump mempool case. >=20 > Signed-off-by: xu,huilong > --- > tests/TestSuite_unit_tests_dump.py | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) >=20 > diff --git a/tests/TestSuite_unit_tests_dump.py > b/tests/TestSuite_unit_tests_dump.py > index 8b094b5..381c2fe 100644 > --- a/tests/TestSuite_unit_tests_dump.py > +++ b/tests/TestSuite_unit_tests_dump.py > @@ -105,13 +105,16 @@ class TestUnitTestsDump(TestCase): > self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target= ), > "R.*T.*E.*>.*>", self.start_test_time) > out =3D self.dut.send_expect("dump_mempool", "RTE>>", > self.run_cmd_time * 2) > self.dut.send_expect("quit", "# ") > - elements =3D ['mempool', 'address', 'flags', 'ring', 'phys_addr'= , > 'size', 'header_size', 'elt_size', > - 'trailer_size', 'total_obj_size', 'private_data_size= ', > 'pg_num', 'pg_shift', 'pg_mask', > - 'elt_va_start', 'elt_va_end', 'elt_pa\[0\]', 'avg > bytes/object' > - ] > + elements =3D ['mempool', 'flags', 'ring', 'phys_addr', > 'nb_mem_chunks', 'size', 'populated_size', 'header_size', 'elt_size', > + 'trailer_size', 'total_obj_size', 'private_data_size= ', > 'avg bytes/object', 'cache infos','cache_size', 'common_pool_count'] > match_regex =3D "mempool <(.*?)>@0x(.*?)\r\n" > - for element in elements[2:]: > - match_regex +=3D " %s=3D(.*?)\r\n" % element > + for element in elements[1:]: > + if element =3D=3D 'cache_size': > + match_regex +=3D " %s=3D(.*?)\r\n" % element > + elif element =3D=3D 'cache infos': > + match_regex +=3D " %s:\r\n" % element > + else: > + match_regex +=3D " %s=3D(.*?)\r\n" % element > m =3D re.compile(r"%s" % match_regex, re.S) > result =3D m.search(out) > mempool_info =3D dict(zip(elements, result.groups())) > -- > 1.9.3