test suite reviews and discussions
 help / color / mirror / Atom feed
From: "xu,huilong" <huilongx.xu@intel.com>
To: dts@dpdk.org
Cc: "xu,huilong" <huilongx.xu@intel.com>
Subject: [dts] [PATCH V1] update dump mempool case
Date: Thu,  2 Jun 2016 09:24:31 +0800	[thread overview]
Message-ID: <1464830671-4116-1-git-send-email-huilongx.xu@intel.com> (raw)

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

             reply	other threads:[~2016-06-02  1:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02  1:24 xu,huilong [this message]
2016-06-12  1:16 ` Liu, Yong

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=1464830671-4116-1-git-send-email-huilongx.xu@intel.com \
    --to=huilongx.xu@intel.com \
    --cc=dts@dpdk.org \
    /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).