From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id A60C4A05D3 for ; Mon, 25 Mar 2019 10:05:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 801633195; Mon, 25 Mar 2019 10:05:35 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id BF49E2BF7 for ; Mon, 25 Mar 2019 10:05:33 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Mar 2019 02:05:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,256,1549958400"; d="scan'208";a="155520447" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga004.fm.intel.com with ESMTP; 25 Mar 2019 02:05:32 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 25 Mar 2019 02:05:32 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 25 Mar 2019 02:05:31 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.163]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.26]) with mapi id 14.03.0415.000; Mon, 25 Mar 2019 17:05:29 +0800 From: "Zhu, WenhuiX" To: "Yao, BingX Y" , "dts@dpdk.org" CC: "Yao, BingX Y" Thread-Topic: [dts] [PATCH V3] tests:align directory changes in dpdk Thread-Index: AQHU4srj9cVdq3f+XE2XzTqv85sANqYcDhFg Date: Mon, 25 Mar 2019 09:05:29 +0000 Message-ID: References: <1553491630-82461-1-git-send-email-bingx.y.yao@intel.com> In-Reply-To: <1553491630-82461-1-git-send-email-bingx.y.yao@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V3] tests:align directory changes in dpdk 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Tested-by: Zhu, WenhuiX -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yaobing Sent: Monday, March 25, 2019 1:27 PM To: dts@dpdk.org Cc: Yao, BingX Y Subject: [dts] [PATCH V3] tests:align directory changes in dpdk V1: move test/test/ to app/test/ V2: According to dpdk commit: a9de470,DPDK moved dpdk/test to dpdk/app/test, it= is unnecessary to build dpdk/test anymore V3: no need to rebuild unit test app Signed-off-by: yaobing --- tests/TestSuite_distributor.py | 8 ++------ tests/TestSuite_efd.py | 8 ++------ tests/TestSuite_unit_tests_loopback.py | 22 +++++++++++----------- tests/= TestSuite_unit_tests_pmd_perf.py | 12 ++++++------ 4 files changed, 21 insertions(+), 29 deletions(-) diff --git a/tests/TestSuite_distributor.py b/tests/TestSuite_distributor.p= y index a900f5e..985fbce 100644 --- a/tests/TestSuite_distributor.py +++ b/tests/TestSuite_distributor.py @@ -45,10 +45,6 @@ class TestDistributor(TestCase, IxiaPacketGenerator): """ self.tester.extend_external_packet_generator(TestDistributor, self= ) =20 - out =3D self.dut.send_expect("make -C test -j", "#") - self.verify("Error" not in out, "Compilation error") - self.verify("No such" not in out, "Compilation error") - # reduce tx queues for enable many workers self.dut.send_expect("sed -i -e 's/.*txRings =3D .*/\\tconst uint1= 6_t rxRings =3D 1, txRings =3D 1;/' ./examples/distributor/main.c", "#") out =3D self.dut.build_dpdk_apps("./examples/distributor") @@ -68,7 +64,7 @@ class TestDistributor(TestCase, IxiaPacketGenerator): """ Run distributor unit test """ - self.dut.send_expect("./test/test/test -n 1 -c f", "RTE>>", 60) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target,=20 + "RTE>>", 60) out =3D self.dut.send_expect("distributor_autotest", "RTE>>", 30) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") @@ -77,7 +73,7 @@ cla= ss TestDistributor(TestCase, IxiaPacketGenerator): """ Run distributor unit perf test """ - self.dut.send_expect("./test/test/test -n 1 -c f", "RTE>>", 60) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target,=20 + "RTE>>", 60) out =3D self.dut.send_expect("distributor_perf_autotest", "RTE>>",= 120) cycles_single =3D self.strip_cycles(out, "single") cycles_burst =3D self.strip_cycles(out, "burst") diff --git a/test= s/TestSuite_efd.py b/tests/TestSuite_efd.py index 2c80464..16eb3b7 100644 --- a/tests/TestSuite_efd.py +++ b/tests/TestSuite_efd.py @@ -45,10 +45,6 @@ class TestEFD(TestCase, IxiaPacketGenerator): """ self.tester.extend_external_packet_generator(TestEFD, self) =20 - out =3D self.dut.send_expect("make -C test -j", "#") - self.verify("Error" not in out, "Compilation error") - self.verify("No such" not in out, "Compilation error") - out =3D self.dut.build_dpdk_apps("./examples/server_node_efd") self.verify("Error" not in out, "Compilation error") self.verify("No such" not in out, "Compilation error") @@ -67,7 +6= 3,7 @@ class TestEFD(TestCase, IxiaPacketGenerator): """ Run EFD unit test """ - self.dut.send_expect("./test/test/test -n 1 -c f", "RTE>>", 60) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target,=20 + "RTE>>", 60) out =3D self.dut.send_expect("efd_autotest", "RTE>>", 120) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") @@ -76,7 +72,7 @@ cla= ss TestEFD(TestCase, IxiaPacketGenerator): """ Run EFD unit perf test """ - self.dut.send_expect("./test/test/test -n 1 -c f", "RTE>>", 60) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target,=20 + "RTE>>", 60) out =3D self.dut.send_expect("efd_perf_autotest", "RTE>>", 120) self.logger.info(out) self.dut.send_expect("quit", "# ") diff --git a/tests/TestSuite_un= it_tests_loopback.py b/tests/TestSuite_unit_tests_loopback.py index 469865f..e56c085 100644 --- a/tests/TestSuite_unit_tests_loopback.py +++ b/tests/TestSuite_unit_tests_loopback.py @@ -70,7 +70,7 @@ class TestUnitTestsLoopback(TestCase): [self.arch, machine, env, toolchain] =3D self.target.split('-') self.verify(self.arch in ["x86_64", "arm64"], "pmd perf request ru= nning in x86_64 or arm64") self.max_traffic_burst =3D self.get_max_traffic_burst() - self.dut.send_expect("sed -i -e 's/#define MAX_TRAFFIC_BURST = %s/#define MAX_TRAFFIC_BURST 32/' test/test/test_pmd_p= erf.c" % self.max_traffic_burst, "# ", 30) + self.dut.send_expect("sed -i -e 's/#define MAX_TRAFFIC_BURST = %s/#define MAX_TRAFFIC_BURST 32/' app/test/test_pmd_pe= rf.c" % self.max_traffic_burst, "# ", 30) =20 def set_up(self): """ @@ -79,7 +79,7 @@ class TestUnitTestsLoopback(TestCase): pass =20 def get_max_traffic_burst(self): - pmd_file =3D self.dut.send_expect("cat test/test/test_pmd_perf.c",= "# ", 30) + pmd_file =3D self.dut.send_expect("cat app/test/test_pmd_perf.c",= =20 + "# ", 30) result_scanner =3D r"#define MAX_TRAFFIC_BURST\s+([0-9]+)" scanner =3D re.compile(result_scanner, re.DOTALL) m =3D scanner.search(pmd_file) @@ -90,14 +90,14 @@ class TestUnitTestsLoopback(TestCase): """ Run pmd stream control mode burst test case. """ - self.dut.send_expect("sed -i -e 's/lpbk_mode =3D 0/lpbk_mode =3D 1= /' test/test/test_pmd_perf.c", "# ", 30) - self.dut.send_expect("cd test/test", "# ") + self.dut.send_expect("sed -i -e 's/lpbk_mode =3D 0/lpbk_mode =3D 1= /' app/test/test_pmd_perf.c", "# ", 30) + self.dut.send_expect("cd app/test", "# ") self.dut.send_expect("make", "# ", 120) self.dut.send_expect("cd /root/dpdk", "# ") =20 self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#") self.tester.send_expect("tcpdump -i %s -w ./getPackageByTcpdump.ca= p 2> /dev/null& " % self.tester_itf, "#") - self.dut.send_expect("./test/test/test -n 1 -c %s" % self.coremask= , "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./app/test/test -n 1 -c %s" %=20 + self.coremask, "R.*T.*E.*>.*>", 60) out =3D self.dut.send_expect("pmd_perf_autotest", "RTE>>", 120) print out self.dut.send_expect("quit", "# ") @@ -111,14 +111,14 @@ class Tes= tUnitTestsLoopback(TestCase): """ Run pmd stream control mode burst test case. """ - self.dut.send_expect("sed -i -e 's/lpbk_mode =3D 1/lpbk_mode =3D 0= /' test/test/test_pmd_perf.c", "# ", 30) - self.dut.send_expect("cd test/test", "# ") + self.dut.send_expect("sed -i -e 's/lpbk_mode =3D 1/lpbk_mode =3D 0= /' app/test/test_pmd_perf.c", "# ", 30) + self.dut.send_expect("cd app/test", "# ") self.dut.send_expect("make", "# ", 120) self.dut.send_expect("cd /root/dpdk", "# ") =20 self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#") self.tester.send_expect("tcpdump -i %s -w ./getPackageByTcpdump.ca= p 2> /dev/null& " % self.tester_itf, "#") - self.dut.send_expect("./test/test/test -n 1 -c %s" % self.coremask= , "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./app/test/test -n 1 -c %s" %=20 + self.coremask, "R.*T.*E.*>.*>", 60) self.dut.send_command("pmd_perf_autotest", 30) # There is no packet loopback, so the test is hung. # It needs to kill the process manually. @@ -137,9 +137,9 @@ class TestUnitTestsLoopback(TestCase): """ Run after each test suite. """ - self.dut.send_expect("sed -i -e 's/lpbk_mode =3D 0/lpbk_mode =3D 1= /' test/test/test_pmd_perf.c", "# ", 30) - self.dut.send_expect("sed -i -e 's/#define MAX_TRAFFIC_BURST = 32/#define MAX_TRAFFIC_BURST %s/' test/test/test_pmd_p= erf.c" % self.max_traffic_burst, "# ", 30) - self.dut.send_expect("cd test/test", "# ") + self.dut.send_expect("sed -i -e 's/lpbk_mode =3D 0/lpbk_mode =3D 1= /' app/test/test_pmd_perf.c", "# ", 30) + self.dut.send_expect("sed -i -e 's/#define MAX_TRAFFIC_BURST = 32/#define MAX_TRAFFIC_BURST %s/' app/test/test_pmd_pe= rf.c" % self.max_traffic_burst, "# ", 30) + self.dut.send_expect("cd app/test", "# ") self.dut.send_expect("make", "# ", 30) self.dut.send_expect("cd /root/dpdk", "# ") self.dut.kill_all() diff --git a/tests/TestSuite_unit_tests_pmd_perf.py b/tests/TestSuite_unit_= tests_pmd_perf.py index 75c2a5f..6938839 100644 --- a/tests/TestSuite_unit_tests_pmd_perf.py +++ b/tests/TestSuite_unit_tests_pmd_perf.py @@ -71,12 +71,12 @@ class TestUnitTestsPmdPerf(TestCase): [arch, machine, env, toolchain] =3D self.target.split('-') self.dut.send_expect("sed -i -e 's/CONFIG_RTE_IXGBE_INC_VECTOR=3Dy= /CONFIG_RTE_IXGBE_INC_VECTOR=3Dn/' config/common_%s" % env, "# ", 30) self.dut.build_install_dpdk(self.target) - out =3D self.dut.build_dpdk_apps('./test/test/') + out =3D self.dut.build_dpdk_apps('./app/test/') self.verify('make: Leaving directory' in out, "Compilation failed"= ) - self.dut.send_expect("mv -f ./test/test/test ./test/test/test_scal= ar", "# ") + self.dut.send_expect("mv -f ./app/test/test=20 + ./app/test/test_scalar", "# ") self.dut.send_expect("sed -i -e 's/CONFIG_RTE_IXGBE_INC_VECTOR=3Dn= /CONFIG_RTE_IXGBE_INC_VECTOR=3Dy/' config/common_%s" % env, "# ", 30) self.dut.build_install_dpdk(self.target) - out =3D self.dut.build_dpdk_apps('./test/test/') + out =3D self.dut.build_dpdk_apps('./app/test/') self.verify('make: Leaving directory' in out, "Compilation failed"= ) =20 def set_up(self): @@ -105,7 +105,7 @@ class TestUnitTestsPmdPerf(TestCase): """ =20 self.core =3D self.get_core_from_socket() - self.dut.send_expect("./test/test/test -n 1 --lcores=3D'%d-%d'" % = (self.core, self.core + 1), "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./app/test/test -n 1 --lcores=3D'%d-%d'" %=20 + (self.core, self.core + 1), "R.*T.*E.*>.*>", 60) for mode in self.burst_ctlmodes: self.dut.send_expect("set_rxtx_sc %s" % mode, "RTE>>", 10) out =3D self.dut.send_expect("pmd_perf_autotest", "RTE>>", 120= ) @@ -129,9 +129,9 @@ class TestUnitTestsPmdPerf(TestCase): =20 for mode in self.rxtx_modes: if mode is "scalar": - self.dut.send_expect("./test/test/test_scalar -n 1 --lcore= s=3D'%d-%d'" % (self.core, self.core + 1), "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./app/test/test_scalar -n 1=20 + --lcores=3D'%d-%d'" % (self.core, self.core + 1), "R.*T.*E.*>.*>", 60) else: - self.dut.send_expect("./test/test/test -n 1 --lcores=3D'%d= -%d'" % (self.core, self.core + 1), "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./app/test/test -n 1=20 + --lcores=3D'%d-%d'" % (self.core, self.core + 1), "R.*T.*E.*>.*>", 60) =20 table_row =3D [mode] self.dut.send_expect("set_rxtx_sc continuous", "RTE>>", 10) -- 2.17.2