test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] update dump mempool case
@ 2016-06-02  1:24 xu,huilong
  2016-06-12  1:16 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: xu,huilong @ 2016-06-02  1:24 UTC (permalink / raw)
  To: dts; +Cc: xu,huilong

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-12  1:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-02  1:24 [dts] [PATCH V1] update dump mempool case xu,huilong
2016-06-12  1:16 ` Liu, Yong

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).