[dts] [PATCH V1] Regular expressions don't match

Liu, Yong yong.liu at intel.com
Fri Aug 11 09:11:54 CEST 2017


Peipei, one comment below.

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of lu,peipei
> Sent: Friday, August 11, 2017 2:04 PM
> To: dts at dpdk.org
> Cc: Lu, PeipeiX <peipeix.lu at intel.com>
> Subject: [dts] [PATCH V1] Regular expressions don't match
> 
> Signed-off-by: lu,peipei <peipeix.lu at 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 03c9554..90588cb 100644
> --- a/tests/TestSuite_unit_tests_dump.py
> +++ b/tests/TestSuite_unit_tests_dump.py
> @@ -88,13 +88,13 @@ class TestUnitTestsDump(TestCase):
>          self.dut.send_expect("./%s/app/testpmd -n 1 -c f -- -i" %
> (self.target), "testpmd>", self.start_test_time)
>          out = self.dut.send_expect("dump_ring", "testpmd>",
> self.run_cmd_time)
>          self.dut.send_expect("quit", "# ")
> -        match_regex = "ring <(.*?)>@0x(.*)\r\n"
> +        match_regex = "ring <(.*?)>"
>          m = re.compile(r"%s" % match_regex, re.S)
>          result = m.findall(out)

Ring dump information will be started with below format.
ring <MP_mbuf_pool_socket_0>@0x7fb9a7736280

Look like original code should be also workable. Could you give more information about why here need the change?


> 
>          # Nic driver will create multiple rings.
>          # Only check the last one to make sure ring_dump function work.
> -        self.verify( 'MP_mbuf_pool_socket_0' in result[0], "dump ring
> name failed")
> +        self.verify( 'MP_mbuf_pool_socket_0' in result, "dump ring name
> failed")
> 
>      def test_mempool_dump(self):
>          """
> @@ -107,7 +107,7 @@ class TestUnitTestsDump(TestCase):
>          m = re.compile(r"%s" % match_regex, re.S)
>          result = m.findall(out)
> 
> -        self.verify(result[0][0] == 'MP_mbuf_pool_socket_0', "dump
> mempool name failed")
> +        self.verify(result[0][0] == 'mbuf_pool_socket_0', "dump mempool
> name failed")
> 
>      def test_physmem_dump(self):
>          """
> --
> 1.9.3



More information about the dts mailing list