test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/unit_tests_lpm: Add the size of the judgment hugepage
@ 2017-09-06  8:05 lu,peipei
  2017-09-07 11:05 ` Liu, Yong
  2017-10-11  7:23 ` Jianbo Liu
  0 siblings, 2 replies; 6+ messages in thread
From: lu,peipei @ 2017-09-06  8:05 UTC (permalink / raw)
  To: dts; +Cc: lu,peipei

Check whether host hugepage fulfill the requirement.If host setup can't run this case, just raise one warning 

Signed-off-by: lu,peipei <peipeix.lu@intel.com>
---
 tests/TestSuite_unit_tests_lpm.py | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/tests/TestSuite_unit_tests_lpm.py b/tests/TestSuite_unit_tests_lpm.py
index e8149ff..f9a2bf7 100644
--- a/tests/TestSuite_unit_tests_lpm.py
+++ b/tests/TestSuite_unit_tests_lpm.py
@@ -81,21 +81,18 @@ class TestUnitTestsLpmIpv6(TestCase):
         """
         [arch, machine, env, toolchain] = self.target.split('-')
         self.verify(arch in ["x86_64", "arm64"], "lpm6 request huge memory")
-        if env == 'bsdapp':
+        hugepages_size = int(self.dut.send_expect("awk '/Hugepagesize/ {print $2}' /proc/meminfo", "# "))
+	hugepage_ori = self.dut.get_total_huge_pages()
+	if env == 'bsdapp':
             pass
         else:
-            hugepage_ori = self.dut.get_total_huge_pages()
-            self.dut.set_huge_pages(4096)
-            hugepage_num = self.dut.get_total_huge_pages()
-            self.verify(hugepage_num >= 4096, "failed to request huge memory")
+	    hugepage_8G = 8 * 1024 * 1024
+            total_hugepage = hugepages_size * hugepage_ori
+            self.verify(total_hugepage >= hugepage_8G,"have no enough hugepage")
 
         self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("lpm6_autotest", "RTE>>", 3600)
         self.dut.send_expect("quit", "# ")
-        if env == 'bsdapp':
-            pass
-        else:
-            self.dut.set_huge_pages(hugepage_ori)
         self.verify("Test OK" in out, "Test failed")
 
     def tear_down(self):
-- 
1.9.3

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

* Re: [dts] [PATCH V1] tests/unit_tests_lpm: Add the size of the judgment hugepage
  2017-09-06  8:05 [dts] [PATCH V1] tests/unit_tests_lpm: Add the size of the judgment hugepage lu,peipei
@ 2017-09-07 11:05 ` Liu, Yong
  2017-10-11  7:23 ` Jianbo Liu
  1 sibling, 0 replies; 6+ messages in thread
From: Liu, Yong @ 2017-09-07 11:05 UTC (permalink / raw)
  To: lu,peipei, dts

Thanks, applied.

On 09/06/2017 04:05 PM, lu,peipei wrote:
> Check whether host hugepage fulfill the requirement.If host setup can't run this case, just raise one warning
>
> Signed-off-by: lu,peipei<peipeix.lu@intel.com>

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

* Re: [dts] [PATCH V1] tests/unit_tests_lpm: Add the size of the judgment hugepage
  2017-09-06  8:05 [dts] [PATCH V1] tests/unit_tests_lpm: Add the size of the judgment hugepage lu,peipei
  2017-09-07 11:05 ` Liu, Yong
@ 2017-10-11  7:23 ` Jianbo Liu
  2017-10-16  7:53   ` Liu, Yong
  1 sibling, 1 reply; 6+ messages in thread
From: Jianbo Liu @ 2017-10-11  7:23 UTC (permalink / raw)
  To: lu,peipei; +Cc: dts

Hi Peipei,

Is there any requirement that the total hugepages should be larger than 8G?
Besides, self.verify will exit this test, not raise one warning as you
declared. Could it be wrong?

Thanks!
Jianbo

On 6 September 2017 at 16:05, lu,peipei <peipeix.lu@intel.com> wrote:
> Check whether host hugepage fulfill the requirement.If host setup can't run this case, just raise one warning
>
> Signed-off-by: lu,peipei <peipeix.lu@intel.com>
> ---
>  tests/TestSuite_unit_tests_lpm.py | 15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/tests/TestSuite_unit_tests_lpm.py b/tests/TestSuite_unit_tests_lpm.py
> index e8149ff..f9a2bf7 100644
> --- a/tests/TestSuite_unit_tests_lpm.py
> +++ b/tests/TestSuite_unit_tests_lpm.py
> @@ -81,21 +81,18 @@ class TestUnitTestsLpmIpv6(TestCase):
>          """
>          [arch, machine, env, toolchain] = self.target.split('-')
>          self.verify(arch in ["x86_64", "arm64"], "lpm6 request huge memory")
> -        if env == 'bsdapp':
> +        hugepages_size = int(self.dut.send_expect("awk '/Hugepagesize/ {print $2}' /proc/meminfo", "# "))
> +       hugepage_ori = self.dut.get_total_huge_pages()
> +       if env == 'bsdapp':
>              pass
>          else:
> -            hugepage_ori = self.dut.get_total_huge_pages()
> -            self.dut.set_huge_pages(4096)
> -            hugepage_num = self.dut.get_total_huge_pages()
> -            self.verify(hugepage_num >= 4096, "failed to request huge memory")
> +           hugepage_8G = 8 * 1024 * 1024
> +            total_hugepage = hugepages_size * hugepage_ori
> +            self.verify(total_hugepage >= hugepage_8G,"have no enough hugepage")
>
>          self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "R.*T.*E.*>.*>", 60)
>          out = self.dut.send_expect("lpm6_autotest", "RTE>>", 3600)
>          self.dut.send_expect("quit", "# ")
> -        if env == 'bsdapp':
> -            pass
> -        else:
> -            self.dut.set_huge_pages(hugepage_ori)
>          self.verify("Test OK" in out, "Test failed")
>
>      def tear_down(self):
> --
> 1.9.3
>

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

* Re: [dts] [PATCH V1] tests/unit_tests_lpm: Add the size of the judgment hugepage
  2017-10-11  7:23 ` Jianbo Liu
@ 2017-10-16  7:53   ` Liu, Yong
  2017-10-17  6:26     ` Jianbo Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Liu, Yong @ 2017-10-16  7:53 UTC (permalink / raw)
  To: Jianbo Liu, Lu, PeipeiX; +Cc: dts

Jianbo,
Only lpm unit test required for so much memory. If there's not enough resource for some cases, this kind of cases should be taken as failed. The error reason has been included in the message, so user can choose either enlarge DUT resource and rerun or just ignore it

Thanks,
Marvin

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jianbo Liu
> Sent: Wednesday, October 11, 2017 3:23 PM
> To: Lu, PeipeiX <peipeix.lu@intel.com>
> Cc: dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] tests/unit_tests_lpm: Add the size of the
> judgment hugepage
> 
> Hi Peipei,
> 
> Is there any requirement that the total hugepages should be larger than 8G?
> Besides, self.verify will exit this test, not raise one warning as you
> declared. Could it be wrong?
> 
> Thanks!
> Jianbo
> 
> On 6 September 2017 at 16:05, lu,peipei <peipeix.lu@intel.com> wrote:
> > Check whether host hugepage fulfill the requirement.If host setup can't
> run this case, just raise one warning
> >
> > Signed-off-by: lu,peipei <peipeix.lu@intel.com>
> > ---
> >  tests/TestSuite_unit_tests_lpm.py | 15 ++++++---------
> >  1 file changed, 6 insertions(+), 9 deletions(-)
> >
> > diff --git a/tests/TestSuite_unit_tests_lpm.py
> b/tests/TestSuite_unit_tests_lpm.py
> > index e8149ff..f9a2bf7 100644
> > --- a/tests/TestSuite_unit_tests_lpm.py
> > +++ b/tests/TestSuite_unit_tests_lpm.py
> > @@ -81,21 +81,18 @@ class TestUnitTestsLpmIpv6(TestCase):
> >          """
> >          [arch, machine, env, toolchain] = self.target.split('-')
> >          self.verify(arch in ["x86_64", "arm64"], "lpm6 request huge
> memory")
> > -        if env == 'bsdapp':
> > +        hugepages_size = int(self.dut.send_expect("awk '/Hugepagesize/
> {print $2}' /proc/meminfo", "# "))
> > +       hugepage_ori = self.dut.get_total_huge_pages()
> > +       if env == 'bsdapp':
> >              pass
> >          else:
> > -            hugepage_ori = self.dut.get_total_huge_pages()
> > -            self.dut.set_huge_pages(4096)
> > -            hugepage_num = self.dut.get_total_huge_pages()
> > -            self.verify(hugepage_num >= 4096, "failed to request huge
> memory")
> > +           hugepage_8G = 8 * 1024 * 1024
> > +            total_hugepage = hugepages_size * hugepage_ori
> > +            self.verify(total_hugepage >= hugepage_8G,"have no enough
> hugepage")
> >
> >          self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target,
> "R.*T.*E.*>.*>", 60)
> >          out = self.dut.send_expect("lpm6_autotest", "RTE>>", 3600)
> >          self.dut.send_expect("quit", "# ")
> > -        if env == 'bsdapp':
> > -            pass
> > -        else:
> > -            self.dut.set_huge_pages(hugepage_ori)
> >          self.verify("Test OK" in out, "Test failed")
> >
> >      def tear_down(self):
> > --
> > 1.9.3
> >

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

* Re: [dts] [PATCH V1] tests/unit_tests_lpm: Add the size of the judgment hugepage
  2017-10-16  7:53   ` Liu, Yong
@ 2017-10-17  6:26     ` Jianbo Liu
  2017-10-17 14:16       ` Liu, Yong
  0 siblings, 1 reply; 6+ messages in thread
From: Jianbo Liu @ 2017-10-17  6:26 UTC (permalink / raw)
  To: Liu, Yong; +Cc: Lu, PeipeiX, dts

Hi Yong,

Can you tell me what the failed cases are? I don't think it need 8G memory.

Thanks!
Jianbo

On 16 October 2017 at 15:53, Liu, Yong <yong.liu@intel.com> wrote:
> Jianbo,
> Only lpm unit test required for so much memory. If there's not enough resource for some cases, this kind of cases should be taken as failed. The error reason has been included in the message, so user can choose either enlarge DUT resource and rerun or just ignore it
>
> Thanks,
> Marvin
>
>> -----Original Message-----
>> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jianbo Liu
>> Sent: Wednesday, October 11, 2017 3:23 PM
>> To: Lu, PeipeiX <peipeix.lu@intel.com>
>> Cc: dts@dpdk.org
>> Subject: Re: [dts] [PATCH V1] tests/unit_tests_lpm: Add the size of the
>> judgment hugepage
>>
>> Hi Peipei,
>>
>> Is there any requirement that the total hugepages should be larger than 8G?
>> Besides, self.verify will exit this test, not raise one warning as you
>> declared. Could it be wrong?
>>
>> Thanks!
>> Jianbo
>>
>> On 6 September 2017 at 16:05, lu,peipei <peipeix.lu@intel.com> wrote:
>> > Check whether host hugepage fulfill the requirement.If host setup can't
>> run this case, just raise one warning
>> >
>> > Signed-off-by: lu,peipei <peipeix.lu@intel.com>
>> > ---
>> >  tests/TestSuite_unit_tests_lpm.py | 15 ++++++---------
>> >  1 file changed, 6 insertions(+), 9 deletions(-)
>> >
>> > diff --git a/tests/TestSuite_unit_tests_lpm.py
>> b/tests/TestSuite_unit_tests_lpm.py
>> > index e8149ff..f9a2bf7 100644
>> > --- a/tests/TestSuite_unit_tests_lpm.py
>> > +++ b/tests/TestSuite_unit_tests_lpm.py
>> > @@ -81,21 +81,18 @@ class TestUnitTestsLpmIpv6(TestCase):
>> >          """
>> >          [arch, machine, env, toolchain] = self.target.split('-')
>> >          self.verify(arch in ["x86_64", "arm64"], "lpm6 request huge
>> memory")
>> > -        if env == 'bsdapp':
>> > +        hugepages_size = int(self.dut.send_expect("awk '/Hugepagesize/
>> {print $2}' /proc/meminfo", "# "))
>> > +       hugepage_ori = self.dut.get_total_huge_pages()
>> > +       if env == 'bsdapp':
>> >              pass
>> >          else:
>> > -            hugepage_ori = self.dut.get_total_huge_pages()
>> > -            self.dut.set_huge_pages(4096)
>> > -            hugepage_num = self.dut.get_total_huge_pages()
>> > -            self.verify(hugepage_num >= 4096, "failed to request huge
>> memory")
>> > +           hugepage_8G = 8 * 1024 * 1024
>> > +            total_hugepage = hugepages_size * hugepage_ori
>> > +            self.verify(total_hugepage >= hugepage_8G,"have no enough
>> hugepage")
>> >
>> >          self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target,
>> "R.*T.*E.*>.*>", 60)
>> >          out = self.dut.send_expect("lpm6_autotest", "RTE>>", 3600)
>> >          self.dut.send_expect("quit", "# ")
>> > -        if env == 'bsdapp':
>> > -            pass
>> > -        else:
>> > -            self.dut.set_huge_pages(hugepage_ori)
>> >          self.verify("Test OK" in out, "Test failed")
>> >
>> >      def tear_down(self):
>> > --
>> > 1.9.3
>> >

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

* Re: [dts] [PATCH V1] tests/unit_tests_lpm: Add the size of the judgment hugepage
  2017-10-17  6:26     ` Jianbo Liu
@ 2017-10-17 14:16       ` Liu, Yong
  0 siblings, 0 replies; 6+ messages in thread
From: Liu, Yong @ 2017-10-17 14:16 UTC (permalink / raw)
  To: Jianbo Liu; +Cc: Lu, PeipeiX, dts

Jianbo,
Look like this patch only impacted lpm6_autotest. 
I remembered that lpm_perf_autotest required for huge memories for millions of entries.
Just checked with latest version, there's no such requirement now. Will remove the limitation in unit_test_lpm suite.
Thanks for reminder.

Thanks,
Marvin 

> -----Original Message-----
> From: Jianbo Liu [mailto:jianbo.liu@linaro.org]
> Sent: Tuesday, October 17, 2017 2:27 PM
> To: Liu, Yong <yong.liu@intel.com>
> Cc: Lu, PeipeiX <peipeix.lu@intel.com>; dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] tests/unit_tests_lpm: Add the size of the
> judgment hugepage
> 
> Hi Yong,
> 
> Can you tell me what the failed cases are? I don't think it need 8G memory.
> 
> Thanks!
> Jianbo
> 
> On 16 October 2017 at 15:53, Liu, Yong <yong.liu@intel.com> wrote:
> > Jianbo,
> > Only lpm unit test required for so much memory. If there's not enough
> resource for some cases, this kind of cases should be taken as failed. The
> error reason has been included in the message, so user can choose either
> enlarge DUT resource and rerun or just ignore it
> >
> > Thanks,
> > Marvin
> >
> >> -----Original Message-----
> >> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jianbo Liu
> >> Sent: Wednesday, October 11, 2017 3:23 PM
> >> To: Lu, PeipeiX <peipeix.lu@intel.com>
> >> Cc: dts@dpdk.org
> >> Subject: Re: [dts] [PATCH V1] tests/unit_tests_lpm: Add the size of the
> >> judgment hugepage
> >>
> >> Hi Peipei,
> >>
> >> Is there any requirement that the total hugepages should be larger than
> 8G?
> >> Besides, self.verify will exit this test, not raise one warning as you
> >> declared. Could it be wrong?
> >>
> >> Thanks!
> >> Jianbo
> >>
> >> On 6 September 2017 at 16:05, lu,peipei <peipeix.lu@intel.com> wrote:
> >> > Check whether host hugepage fulfill the requirement.If host setup
> can't
> >> run this case, just raise one warning
> >> >
> >> > Signed-off-by: lu,peipei <peipeix.lu@intel.com>
> >> > ---
> >> >  tests/TestSuite_unit_tests_lpm.py | 15 ++++++---------
> >> >  1 file changed, 6 insertions(+), 9 deletions(-)
> >> >
> >> > diff --git a/tests/TestSuite_unit_tests_lpm.py
> >> b/tests/TestSuite_unit_tests_lpm.py
> >> > index e8149ff..f9a2bf7 100644
> >> > --- a/tests/TestSuite_unit_tests_lpm.py
> >> > +++ b/tests/TestSuite_unit_tests_lpm.py
> >> > @@ -81,21 +81,18 @@ class TestUnitTestsLpmIpv6(TestCase):
> >> >          """
> >> >          [arch, machine, env, toolchain] = self.target.split('-')
> >> >          self.verify(arch in ["x86_64", "arm64"], "lpm6 request huge
> >> memory")
> >> > -        if env == 'bsdapp':
> >> > +        hugepages_size = int(self.dut.send_expect("awk
> '/Hugepagesize/
> >> {print $2}' /proc/meminfo", "# "))
> >> > +       hugepage_ori = self.dut.get_total_huge_pages()
> >> > +       if env == 'bsdapp':
> >> >              pass
> >> >          else:
> >> > -            hugepage_ori = self.dut.get_total_huge_pages()
> >> > -            self.dut.set_huge_pages(4096)
> >> > -            hugepage_num = self.dut.get_total_huge_pages()
> >> > -            self.verify(hugepage_num >= 4096, "failed to request
> huge
> >> memory")
> >> > +           hugepage_8G = 8 * 1024 * 1024
> >> > +            total_hugepage = hugepages_size * hugepage_ori
> >> > +            self.verify(total_hugepage >= hugepage_8G,"have no
> enough
> >> hugepage")
> >> >
> >> >          self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target,
> >> "R.*T.*E.*>.*>", 60)
> >> >          out = self.dut.send_expect("lpm6_autotest", "RTE>>", 3600)
> >> >          self.dut.send_expect("quit", "# ")
> >> > -        if env == 'bsdapp':
> >> > -            pass
> >> > -        else:
> >> > -            self.dut.set_huge_pages(hugepage_ori)
> >> >          self.verify("Test OK" in out, "Test failed")
> >> >
> >> >      def tear_down(self):
> >> > --
> >> > 1.9.3
> >> >

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

end of thread, other threads:[~2017-10-17 14:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-06  8:05 [dts] [PATCH V1] tests/unit_tests_lpm: Add the size of the judgment hugepage lu,peipei
2017-09-07 11:05 ` Liu, Yong
2017-10-11  7:23 ` Jianbo Liu
2017-10-16  7:53   ` Liu, Yong
2017-10-17  6:26     ` Jianbo Liu
2017-10-17 14: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).