From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-f174.google.com (mail-yw0-f174.google.com [209.85.161.174]) by dpdk.org (Postfix) with ESMTP id 72EF5558B for ; Thu, 17 Nov 2016 06:20:32 +0100 (CET) Received: by mail-yw0-f174.google.com with SMTP id i145so147849073ywg.2 for ; Wed, 16 Nov 2016 21:20:32 -0800 (PST) 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=NaXa6OTmXlE9Pv1XKY7c2KV26ERulEmgokBDQEJIwNU=; b=I8+0sT536ColPoFbxPFHnq8F53/soKRynKnOlnynOAWq1nZSV2rH7sQDSGhd9WcldP 7atwm0Y2CqM+FkDs0a/OCzaFutqZ0EtlWLA7IOBbiY6sX3Lh6Dx+SdZNTPZYK2uL/g34 5xfju2bTMGNzYQiDMxPQR1slrtIWs3dLEZfcA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=NaXa6OTmXlE9Pv1XKY7c2KV26ERulEmgokBDQEJIwNU=; b=J4LImGsyR8Rfu92L5TYGrb4znWuZfhzei7y8iuQGpUtrtOsl9wXAtrIN5sezTmd7YH Sv0HnnNPJqwZUv0RsahJR9vGs0wtm7TEvkFjcx26+Oxs+K+fAfvAqMzs3m0Ztwejtp3E caTPgKfLKzR6k169Xi6TW4EssrwaSd4r98EJc/x2q6tsEO33L1WpbVm2FG5Wn/SRmBa3 vVBK71Exd+EG65cuPG+OVlPP6+S+gCeYCBqyMGtSxGpFTEectL/VPOlkk2MiqCmdaz5x ByecYqxeMnfo1V+M5rTeQRteUW1yTqGOF8OO9cGFqjSee5L6KGbDe/Cp6oA1Hh/pRNOt C9Ag== X-Gm-Message-State: AKaTC02KhKt6B351hzYLF2NKl+5UBFKoT5dXuzS75wlbAFqZG0f/K5Pk00b6w9JUkZ9MNFvNEl9nUbAgRtIvjC3x X-Received: by 10.129.138.70 with SMTP id a67mr1105143ywg.290.1479360031641; Wed, 16 Nov 2016 21:20:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.170.104 with HTTP; Wed, 16 Nov 2016 21:20:31 -0800 (PST) In-Reply-To: <1479193255-23326-1-git-send-email-huilongx.xu@intel.com> References: <1479193255-23326-1-git-send-email-huilongx.xu@intel.com> From: Jianbo Liu Date: Thu, 17 Nov 2016 13:20:31 +0800 Message-ID: To: "xu,huilong" Cc: dts@dpdk.org Content-Type: text/plain; charset=UTF-8 Subject: Re: [dts] [PATCH V1] disable ASLR for mutli process test 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: Thu, 17 Nov 2016 05:20:32 -0000 On 15 November 2016 at 15:00, xu,huilong wrote: > if not disable ASLR, mutli process test case maybe failed. > > Signed-off-by: xu,huilong > --- > tests/TestSuite_multiprocess.py | 7 ++++++- > tests/TestSuite_unit_tests_eal.py | 6 ++++++ > 2 files changed, 12 insertions(+), 1 deletion(-) > > diff --git a/tests/TestSuite_multiprocess.py b/tests/TestSuite_multiprocess.py > index b305437..f49ecb8 100644 > --- a/tests/TestSuite_multiprocess.py > +++ b/tests/TestSuite_multiprocess.py > @@ -57,7 +57,12 @@ class TestMultiprocess(TestCase, IxiaPacketGenerator): > > self.verify(len(self.dut.get_all_cores()) >= 4, "Not enough Cores") > self.tester.extend_external_packet_generator(TestMultiprocess, self) > - > + try: > + aslr_flage = int(self.dut.send_expect("cat /proc/sys/kernel/randomize_va_space", "# ")) > + if aslr_flage: > + self.dut.send_expect("echo 0 > /proc/sys/kernel/randomize_va_space", "# ") > + except: > + print "This machine not support disable ASLR, maybe multi process will failed" > out = self.dut.build_dpdk_apps("./examples/multi_process/") > self.verify('Error' not in out, "Compilation failed") > > diff --git a/tests/TestSuite_unit_tests_eal.py b/tests/TestSuite_unit_tests_eal.py > index 8fea148..a8419ce 100644 > --- a/tests/TestSuite_unit_tests_eal.py > +++ b/tests/TestSuite_unit_tests_eal.py > @@ -332,6 +332,12 @@ class TestUnitTestsEal(TestCase): > """ > Run multiprocess autotest. > """ > + try: > + aslr_flage = int(self.dut.send_expect("cat /proc/sys/kernel/randomize_va_space", "# ")) > + if aslr_flage: > + self.dut.send_expect("echo 0 > /proc/sys/kernel/randomize_va_space", "# ") > + except: > + print "This machine not support disable ASLR, maybe multi process will failed" > > self.dut.send_expect(self.test_app_cmdline + ' -m 64', "R.*T.*E.*>.*>", self.start_test_time) > out = self.dut.send_expect("multiprocess_autotest", "RTE>>", self.run_cmd_time) > -- > 1.9.3 > It is better to set the original value back after multiprocess test and unit test.