test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] Regular expressions don't match
@ 2017-08-11  6:03 lu,peipei
  2017-08-11  7:11 ` Liu, Yong
  0 siblings, 1 reply; 6+ messages in thread
From: lu,peipei @ 2017-08-11  6:03 UTC (permalink / raw)
  To: dts; +Cc: lu,peipei

Signed-off-by: lu,peipei <peipeix.lu@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)
         
         # 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

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

* Re: [dts] [PATCH V1] Regular expressions don't match
  2017-08-11  6:03 [dts] [PATCH V1] Regular expressions don't match lu,peipei
@ 2017-08-11  7:11 ` Liu, Yong
  0 siblings, 0 replies; 6+ messages in thread
From: Liu, Yong @ 2017-08-11  7:11 UTC (permalink / raw)
  To: Lu, PeipeiX, dts; +Cc: Lu, PeipeiX

Peipei, one comment below.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lu,peipei
> Sent: Friday, August 11, 2017 2:04 PM
> To: dts@dpdk.org
> Cc: Lu, PeipeiX <peipeix.lu@intel.com>
> Subject: [dts] [PATCH V1] Regular expressions don't match
> 
> Signed-off-by: lu,peipei <peipeix.lu@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

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

* [dts] [PATCH V1] Regular expressions don't match
@ 2017-08-15  5:13 lu,peipei
  0 siblings, 0 replies; 6+ messages in thread
From: lu,peipei @ 2017-08-15  5:13 UTC (permalink / raw)
  To: dts; +Cc: lu,peipei

update ring and mempool dump test case
    1, only check designate ring name in ring dump info list, not check dump ring name list first name is
       designate ring name, because some OSes, the dump info list maybe different
    2. change mempool info for check mempool dump info right.


Signed-off-by: lu,peipei <peipeix.lu@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)
         
         # 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

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

* Re: [dts] [PATCH V1] Regular expressions don't match
  2017-08-14  8:25 lu,peipei
@ 2017-08-14  8:53 ` Liu, Yong
  0 siblings, 0 replies; 6+ messages in thread
From: Liu, Yong @ 2017-08-14  8:53 UTC (permalink / raw)
  To: Lu, PeipeiX, dts; +Cc: Lu, PeipeiX

Peipei,
I think your commit log is not so accurate. The root cause is that "MP_mbuf_pool_socket_0" is no longer the first mempool.
So the check function will be failed. Please modify your commit log.

Thanks,
Marvin

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lu,peipei
> Sent: Monday, August 14, 2017 4:25 PM
> To: dts@dpdk.org
> Cc: Lu, PeipeiX <peipeix.lu@intel.com>
> Subject: [dts] [PATCH V1] Regular expressions don't match
> 
> Output format is:
>   ring <HT_fdir_0000:05:00.0>@0x7f03bff6e500
>   flags=0
>   ring <HT_l2_tn_0000:05:00.0>@0x7f03bfc6dc00
>   flags=0
>   ring <HT_fdir_0000:05:00.1>@0x7f03bfc22780
>   flags=0
>   ring <MP_mbuf_pool_socket_0>@0x7f03a724c580
>   flags=0
> Original regex format can not parse it for "MP_mbuf_pool_socket_0"
> New regex format is "ring <(.*?)>"
> 
> 
> 
> 
> Signed-off-by: lu,peipei <peipeix.lu@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)
> 
>          # 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

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

* [dts] [PATCH V1] Regular expressions don't match
@ 2017-08-14  8:25 lu,peipei
  2017-08-14  8:53 ` Liu, Yong
  0 siblings, 1 reply; 6+ messages in thread
From: lu,peipei @ 2017-08-14  8:25 UTC (permalink / raw)
  To: dts; +Cc: lu,peipei

Output format is:
  ring <HT_fdir_0000:05:00.0>@0x7f03bff6e500
  flags=0
  ring <HT_l2_tn_0000:05:00.0>@0x7f03bfc6dc00
  flags=0
  ring <HT_fdir_0000:05:00.1>@0x7f03bfc22780
  flags=0
  ring <MP_mbuf_pool_socket_0>@0x7f03a724c580
  flags=0
Original regex format can not parse it for "MP_mbuf_pool_socket_0"
New regex format is "ring <(.*?)>"




Signed-off-by: lu,peipei <peipeix.lu@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)
         
         # 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

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

* [dts] [PATCH V1] Regular expressions don't match
@ 2017-08-14  6:31 lu,peipei
  0 siblings, 0 replies; 6+ messages in thread
From: lu,peipei @ 2017-08-14  6:31 UTC (permalink / raw)
  To: dts; +Cc: lu,peipei

The expressions "ring <(.*?)>@0x(.*)\r\n" can't match to the correct result. So update "ring <(.*?)>"

Signed-off-by: lu,peipei <peipeix.lu@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)
         
         # 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

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

end of thread, other threads:[~2017-08-15  5:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-11  6:03 [dts] [PATCH V1] Regular expressions don't match lu,peipei
2017-08-11  7:11 ` Liu, Yong
2017-08-14  6:31 lu,peipei
2017-08-14  8:25 lu,peipei
2017-08-14  8:53 ` Liu, Yong
2017-08-15  5:13 lu,peipei

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