From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 90B042C37 for ; Wed, 11 Oct 2017 09:23:27 +0200 (CEST) Received: by mail-wm0-f51.google.com with SMTP id i124so2548514wmf.3 for ; Wed, 11 Oct 2017 00:23:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XQIMi1x/Gwxs+QUj+8VuwNdC2crkQWhpIgeA7qwKC5A=; b=SNJHovCfUCwYQKDEgzCQ+syJ0XA/OriWqzq3uh6FTWYTnwuOUHyIePxWrwX3x/DjMH sI59huMqDJr0RflNdDgxa5rDbAw12wdyj6V75wjKEjCvjKi8oxiLORRC1+koDaK0FPly Lq/rK/kUdRFa3OjgU7P4lejN9Qk0yFTLZlBVA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XQIMi1x/Gwxs+QUj+8VuwNdC2crkQWhpIgeA7qwKC5A=; b=ITuw0woRh8LB0+3RQRHDy4rrFpIT+Fcd6ntCHrkRsJna9wPNNzSuHKiCJcJwnjX5E0 lyyBDnrFY1jTgO3P53xKV/g5+vvxwnvB0AubLBBFZ4V2izW2/Shr3fcxTN6EGd1mpwKh pqAVYPN4vgU7ZnV2Jz3MdtqG/PfmWm0XJ9wvZNoYJBty8xTEtxCtoFujloUN71ONacuF PYhwo8p3S2hThGNhZZO59wy7BbEvR9csyEPmirAoQs7VMAqeSGY9iSUSXAGXuj0CL3xl rkiz88OaDMVVfCQvY8wzc0QNMlwjaxPypsb3tItq9v6vkYf+0p6F7AuUROhwSAHu6u13 YEPg== X-Gm-Message-State: AMCzsaUw+HzumpObgBB9SJO0nD7ADf/yKWu3IplppTFUVbHZE3uVNTOu rSYEq2cQfrWdsBF2VAkZMF+lbja4Zye4RRqc9GdeDfjg X-Google-Smtp-Source: AOwi7QB0odoRwdQLv0rpA07tK6xmbyRPYruLvcBOoTMKnT+Vo/YgMSw9MebJUCLXjqY/dB9FWfeoKoSNet96UCuzZUk= X-Received: by 10.80.183.148 with SMTP id h20mr20796468ede.178.1507706607208; Wed, 11 Oct 2017 00:23:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.159.238 with HTTP; Wed, 11 Oct 2017 00:23:26 -0700 (PDT) In-Reply-To: <1504685144-5381-1-git-send-email-peipeix.lu@intel.com> References: <1504685144-5381-1-git-send-email-peipeix.lu@intel.com> From: Jianbo Liu Date: Wed, 11 Oct 2017 15:23:26 +0800 Message-ID: To: "lu,peipei" Cc: dts@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [dts] [PATCH V1] tests/unit_tests_lpm: Add the size of the judgment hugepage X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Oct 2017 07:23:27 -0000 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 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 > --- > 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 >