[dts] [PATCH V1] tests/unit_tests_lpm: fix lpm set hugepage failed

Liu, Yong yong.liu at intel.com
Fri Sep 1 03:47:06 CEST 2017


Peipei,
We can assume that every host have the same setting as yours. 
There're two options here, one is like original version, just allocate enough hugepage for this case.
The second option is that check the number of hugepages, raise one error if not enough. 


Thanks,
Marvin

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of lu,peipei
> Sent: Thursday, August 31, 2017 5:47 PM
> To: dts at dpdk.org
> Cc: Lu, PeipeiX <peipeix.lu at intel.com>
> Subject: [dts] [PATCH V1] tests/unit_tests_lpm: fix lpm set hugepage
> failed
> 
> Now all servers hugepage size were set 1G by default,the source codes were
> not must.
> 
> Signed-off-by: lu,peipei <peipeix.lu at intel.com>
> ---
>  tests/TestSuite_unit_tests_lpm.py | 12 ------------
>  1 file changed, 12 deletions(-)
> 
> diff --git a/tests/TestSuite_unit_tests_lpm.py
> b/tests/TestSuite_unit_tests_lpm.py
> index e8149ff..792be40 100644
> --- a/tests/TestSuite_unit_tests_lpm.py
> +++ b/tests/TestSuite_unit_tests_lpm.py
> @@ -81,21 +81,9 @@ class TestUnitTestsLpmIpv6(TestCase):
>          """
>          [arch, machine, env, toolchain] = self.target.split('-')
>          self.verify(arch in ["x86_64", "arm64"], "lpm6 request huge
> memory")
> -        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")
> -
>          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



More information about the dts mailing list