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 9342A68DD for ; Thu, 2 Jun 2016 03:28:55 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 01 Jun 2016 18:28:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,404,1459839600"; d="scan'208";a="979115518" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.238.55.12]) by fmsmga001.fm.intel.com with ESMTP; 01 Jun 2016 18:28:55 -0700 From: "xu,huilong" To: dts@dpdk.org Cc: "xu,huilong" Date: Thu, 2 Jun 2016 09:24:31 +0800 Message-Id: <1464830671-4116-1-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [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: Thu, 02 Jun 2016 01:28:56 -0000 mempool struct changed already, so need update dump mempool case. Signed-off-by: xu,huilong --- tests/TestSuite_unit_tests_dump.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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 = self.dut.send_expect("dump_mempool", "RTE>>", self.run_cmd_time * 2) self.dut.send_expect("quit", "# ") - elements = ['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 = ['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 = "mempool <(.*?)>@0x(.*?)\r\n" - for element in elements[2:]: - match_regex += " %s=(.*?)\r\n" % element + for element in elements[1:]: + if element == 'cache_size': + match_regex += " %s=(.*?)\r\n" % element + elif element == 'cache infos': + match_regex += " %s:\r\n" % element + else: + match_regex += " %s=(.*?)\r\n" % element m = re.compile(r"%s" % match_regex, re.S) result = m.search(out) mempool_info = dict(zip(elements, result.groups())) -- 1.9.3