* [dts] [PATCH V1] modify unit_tests_dump keyword matching
@ 2018-05-21 2:37 xu,gang
0 siblings, 0 replies; 3+ messages in thread
From: xu,gang @ 2018-05-21 2:37 UTC (permalink / raw)
To: dts; +Cc: xu,gang
in dpdk-18.05-rc4, the dpdk prompt information change,
the patch modify corresponding keywords
Signed-off-by: xu,gang <gangx.xu@intel.com>
---
tests/TestSuite_unit_tests_dump.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/TestSuite_unit_tests_dump.py b/tests/TestSuite_unit_tests_dump.py
index f7985f2..a22afe9 100644
--- a/tests/TestSuite_unit_tests_dump.py
+++ b/tests/TestSuite_unit_tests_dump.py
@@ -127,7 +127,7 @@ class TestUnitTestsDump(TestCase):
out = self.dut.send_expect("dump_physmem", "RTE>>", self.run_cmd_time * 2)
self.dut.send_expect("quit", "# ")
elements = ['Segment', 'IOVA', 'len', 'virt', 'socket_id', 'hugepage_sz', 'nchannel', 'nrank']
- match_regex = "Segment (\d)+:"
+ match_regex = "Segment (.*?):"
for element in elements[1:-1]:
match_regex += " %s:(.*?)," % element
match_regex += " %s:(.*?)" % elements[-1]
@@ -152,14 +152,13 @@ class TestUnitTestsDump(TestCase):
out = self.dut.send_expect("dump_memzone", "testpmd>", self.run_cmd_time * 2)
self.dut.send_expect("quit", "# ")
- elements = ['Zone', 'name', 'IO', 'len', 'virt', 'socket_id', 'flags']
+ elements = ['Zone', 'name', 'len', 'virt', 'socket_id', 'flags']
match_regex = "Zone (\d):"
for element in elements[1:-1]:
match_regex += " %s:(.*?)," % element
match_regex += " %s:(.*?)\n" % elements[-1]
m = re.compile(r"%s" % match_regex, re.DOTALL)
results = m.findall(out)
-
memzone_info = []
for result in results:
memzone_info.append(dict(zip(elements, result)))
@@ -180,6 +179,7 @@ class TestUnitTestsDump(TestCase):
match_regex += "sizeof\(%s\) = (\d+)\r\n" % element
match_regex += "sizeof\(%s\) = (\d+)" % elements[-1]
m = re.compile(r"%s" % match_regex, re.S)
+
result = m.search(out)
struct_info = dict(zip(elements, result.groups()))
--
1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH V1] modify unit_tests_dump keyword matching
2018-06-05 9:58 ` [dts] [PATCH V1] modify unit_tests_dump keyword matching xu,gang
@ 2018-06-11 13:44 ` Liu, Yong
0 siblings, 0 replies; 3+ messages in thread
From: Liu, Yong @ 2018-06-11 13:44 UTC (permalink / raw)
To: xu,gang, dts
Thanks, Gang. Applied.
On 06/05/2018 05:58 PM, xu,gang wrote:
> in dpdk-18.05-rc4, the dpdk prompt information change,
> the patch modify corresponding keywords
>
> Signed-off-by: xu,gang<gangx.xu@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dts] [PATCH V1] modify unit_tests_dump keyword matching
2018-06-05 9:58 [dts] [PATCH V1] fix vlan filter off in invalid xu,gang
@ 2018-06-05 9:58 ` xu,gang
2018-06-11 13:44 ` Liu, Yong
0 siblings, 1 reply; 3+ messages in thread
From: xu,gang @ 2018-06-05 9:58 UTC (permalink / raw)
To: dts; +Cc: xu,gang
in dpdk-18.05-rc4, the dpdk prompt information change,
the patch modify corresponding keywords
Signed-off-by: xu,gang <gangx.xu@intel.com>
---
tests/TestSuite_unit_tests_dump.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/TestSuite_unit_tests_dump.py b/tests/TestSuite_unit_tests_dump.py
index f7985f2..a22afe9 100644
--- a/tests/TestSuite_unit_tests_dump.py
+++ b/tests/TestSuite_unit_tests_dump.py
@@ -127,7 +127,7 @@ class TestUnitTestsDump(TestCase):
out = self.dut.send_expect("dump_physmem", "RTE>>", self.run_cmd_time * 2)
self.dut.send_expect("quit", "# ")
elements = ['Segment', 'IOVA', 'len', 'virt', 'socket_id', 'hugepage_sz', 'nchannel', 'nrank']
- match_regex = "Segment (\d)+:"
+ match_regex = "Segment (.*?):"
for element in elements[1:-1]:
match_regex += " %s:(.*?)," % element
match_regex += " %s:(.*?)" % elements[-1]
@@ -152,14 +152,13 @@ class TestUnitTestsDump(TestCase):
out = self.dut.send_expect("dump_memzone", "testpmd>", self.run_cmd_time * 2)
self.dut.send_expect("quit", "# ")
- elements = ['Zone', 'name', 'IO', 'len', 'virt', 'socket_id', 'flags']
+ elements = ['Zone', 'name', 'len', 'virt', 'socket_id', 'flags']
match_regex = "Zone (\d):"
for element in elements[1:-1]:
match_regex += " %s:(.*?)," % element
match_regex += " %s:(.*?)\n" % elements[-1]
m = re.compile(r"%s" % match_regex, re.DOTALL)
results = m.findall(out)
-
memzone_info = []
for result in results:
memzone_info.append(dict(zip(elements, result)))
@@ -180,6 +179,7 @@ class TestUnitTestsDump(TestCase):
match_regex += "sizeof\(%s\) = (\d+)\r\n" % element
match_regex += "sizeof\(%s\) = (\d+)" % elements[-1]
m = re.compile(r"%s" % match_regex, re.S)
+
result = m.search(out)
struct_info = dict(zip(elements, result.groups()))
--
1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-11 5:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-21 2:37 [dts] [PATCH V1] modify unit_tests_dump keyword matching xu,gang
2018-06-05 9:58 [dts] [PATCH V1] fix vlan filter off in invalid xu,gang
2018-06-05 9:58 ` [dts] [PATCH V1] modify unit_tests_dump keyword matching xu,gang
2018-06-11 13:44 ` 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).