From: "Liu, Yong" <yong.liu@intel.com>
To: "Xu, HuilongX" <huilongx.xu@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Xu, HuilongX" <huilongx.xu@intel.com>
Subject: Re: [dts] [PATCH V1] update dump mempool case
Date: Sun, 12 Jun 2016 01:16:01 +0000 [thread overview]
Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E2223839C@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1464830671-4116-1-git-send-email-huilongx.xu@intel.com>
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
>
> mempool struct changed already, so need update dump mempool case.
>
> Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> ---
> 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
prev parent reply other threads:[~2016-06-12 1:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 1:24 xu,huilong
2016-06-12 1:16 ` Liu, Yong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86228AFD5BCD8E4EBFD2B90117B5E81E2223839C@SHSMSX103.ccr.corp.intel.com \
--to=yong.liu@intel.com \
--cc=dts@dpdk.org \
--cc=huilongx.xu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).