From: "lu,peipei" <peipeix.lu@intel.com>
To: dts@dpdk.org
Cc: "lu,peipei" <peipeix.lu@intel.com>
Subject: [dts] [PATCH V1] tests/unit_tests_lpm: Add the size of the judgment hugepage
Date: Wed, 6 Sep 2017 16:05:44 +0800 [thread overview]
Message-ID: <1504685144-5381-1-git-send-email-peipeix.lu@intel.com> (raw)
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
next reply other threads:[~2017-09-06 8:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-06 8:05 lu,peipei [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1504685144-5381-1-git-send-email-peipeix.lu@intel.com \
--to=peipeix.lu@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).