[dts] [PATCH V1] test:align directory changes in dpdk

Zhu, ShuaiX shuaix.zhu at intel.com
Fri Mar 1 06:45:20 CET 2019


Tested-by:Zhu, ShuaiX <shuaix.zhu at intel.com>

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of yaobing
> Sent: Friday, March 1, 2019 9:58 AM
> To: dts at dpdk.org
> Cc: Yao, BingX Y <bingx.y.yao at intel.com>
> Subject: [dts] [PATCH V1] test:align directory changes in dpdk
> 
> 1 move test/test/ to app/test/
> 2 move test/test-acl/ to app/test-acl/
> 3 move test/test-pipeline/ to app/test-pipeline/
> 4 move test/test-cmdline/ to app/test-cmdline/
> 
> Signed-off-by: yaobing <bingx.y.yao at intel.com>
> ---
>  tests/TestSuite_distributor.py         |  6 +++---
>  tests/TestSuite_efd.py                 |  6 +++---
>  tests/TestSuite_unit_tests_loopback.py | 22 +++++++++++-----------
> tests/TestSuite_unit_tests_pmd_perf.py | 12 ++++++------
>  4 files changed, 23 insertions(+), 23 deletions(-)
> 
> diff --git a/tests/TestSuite_distributor.py b/tests/TestSuite_distributor.py index
> a900f5e..badbaf6 100644
> --- a/tests/TestSuite_distributor.py
> +++ b/tests/TestSuite_distributor.py
> @@ -45,7 +45,7 @@ class TestDistributor(TestCase, IxiaPacketGenerator):
>          """
>          self.tester.extend_external_packet_generator(TestDistributor,
> self)
> 
> -        out = self.dut.send_expect("make -C test -j", "#")
> +        out = self.dut.send_expect("make -C app/test -j", "#")
>          self.verify("Error" not in out, "Compilation error")
>          self.verify("No such" not in out, "Compilation error")
> 
> @@ -68,7 +68,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("./app/test/test -n 1 -c f", "RTE>>", 60)
>          out = self.dut.send_expect("distributor_autotest", "RTE>>", 30)
>          self.dut.send_expect("quit", "# ")
>          self.verify("Test OK" in out, "Test failed") @@ -77,7 +77,7 @@
> class 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("./app/test/test -n 1 -c f", "RTE>>", 60)
>          out = self.dut.send_expect("distributor_perf_autotest", "RTE>>",
> 120)
>          cycles_single = self.strip_cycles(out, "single")
>          cycles_burst = self.strip_cycles(out, "burst") diff --git
> a/tests/TestSuite_efd.py b/tests/TestSuite_efd.py index 2c80464..1020f30
> 100644
> --- a/tests/TestSuite_efd.py
> +++ b/tests/TestSuite_efd.py
> @@ -45,7 +45,7 @@ class TestEFD(TestCase, IxiaPacketGenerator):
>          """
>          self.tester.extend_external_packet_generator(TestEFD, self)
> 
> -        out = self.dut.send_expect("make -C test -j", "#")
> +        out = self.dut.send_expect("make -C app/test -j", "#")
>          self.verify("Error" not in out, "Compilation error")
>          self.verify("No such" not in out, "Compilation error")
> 
> @@ -67,7 +67,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("./app/test/test -n 1 -c f", "RTE>>", 60)
>          out = self.dut.send_expect("efd_autotest", "RTE>>", 120)
>          self.dut.send_expect("quit", "# ")
>          self.verify("Test OK" in out, "Test failed") @@ -76,7 +76,7 @@
> class 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("./app/test/test -n 1 -c f", "RTE>>", 60)
>          out = self.dut.send_expect("efd_perf_autotest", "RTE>>", 120)
>          self.logger.info(out)
>          self.dut.send_expect("quit", "# ") diff --git
> a/tests/TestSuite_unit_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] = self.target.split('-')
>          self.verify(self.arch in ["x86_64", "arm64"], "pmd perf request
> running in x86_64 or arm64")
>          self.max_traffic_burst = 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_perf.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_perf.c" % self.max_traffic_burst, "# ", 30)
> 
>      def set_up(self):
>          """
> @@ -79,7 +79,7 @@ class TestUnitTestsLoopback(TestCase):
>          pass
> 
>      def get_max_traffic_burst(self):
> -        pmd_file = self.dut.send_expect("cat test/test/test_pmd_perf.c", "#
> ", 30)
> +        pmd_file = self.dut.send_expect("cat app/test/test_pmd_perf.c",
> + "# ", 30)
>          result_scanner = r"#define MAX_TRAFFIC_BURST\s+([0-9]+)"
>          scanner = re.compile(result_scanner, re.DOTALL)
>          m = 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 = 0/lpbk_mode = 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 = 0/lpbk_mode = 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", "# ")
> 
>          self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
>          self.tester.send_expect("tcpdump -i %s
> -w ./getPackageByTcpdump.cap 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" %
> + self.coremask, "R.*T.*E.*>.*>", 60)
>          out = self.dut.send_expect("pmd_perf_autotest", "RTE>>", 120)
>          print out
>          self.dut.send_expect("quit", "# ") @@ -111,14 +111,14 @@ class
> TestUnitTestsLoopback(TestCase):
>          """
>          Run pmd stream control mode burst test case.
>          """
> -        self.dut.send_expect("sed -i -e 's/lpbk_mode = 1/lpbk_mode = 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 = 1/lpbk_mode = 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", "# ")
> 
>          self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
>          self.tester.send_expect("tcpdump -i %s
> -w ./getPackageByTcpdump.cap 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" %
> + 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 = 0/lpbk_mode = 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_perf.c" % self.max_traffic_burst, "# ", 30)
> -        self.dut.send_expect("cd test/test", "# ")
> +        self.dut.send_expect("sed -i -e 's/lpbk_mode = 0/lpbk_mode = 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_perf.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] = self.target.split('-')
>          self.dut.send_expect("sed -i -e
> 's/CONFIG_RTE_IXGBE_INC_VECTOR=y/CONFIG_RTE_IXGBE_INC_VECTOR=n/
> ' config/common_%s" % env, "# ", 30)
>          self.dut.build_install_dpdk(self.target)
> -        out = self.dut.build_dpdk_apps('./test/test/')
> +        out = 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_scalar",
> "# ")
> +        self.dut.send_expect("mv -f ./app/test/test
> + ./app/test/test_scalar", "# ")
>          self.dut.send_expect("sed -i -e
> 's/CONFIG_RTE_IXGBE_INC_VECTOR=n/CONFIG_RTE_IXGBE_INC_VECTOR=y/
> ' config/common_%s" % env, "# ", 30)
>          self.dut.build_install_dpdk(self.target)
> -        out = self.dut.build_dpdk_apps('./test/test/')
> +        out = self.dut.build_dpdk_apps('./app/test/')
>          self.verify('make: Leaving directory' in out, "Compilation failed")
> 
>      def set_up(self):
> @@ -105,7 +105,7 @@ class TestUnitTestsPmdPerf(TestCase):
>          """
> 
>          self.core = self.get_core_from_socket()
> -        self.dut.send_expect("./test/test/test -n 1 --lcores='%d-%d'" %
> (self.core, self.core + 1), "R.*T.*E.*>.*>", 60)
> +        self.dut.send_expect("./app/test/test -n 1 --lcores='%d-%d'" %
> + (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 = self.dut.send_expect("pmd_perf_autotest", "RTE>>",
> 120) @@ -129,9 +129,9 @@ class TestUnitTestsPmdPerf(TestCase):
> 
>          for mode in self.rxtx_modes:
>              if mode is "scalar":
> -                self.dut.send_expect("./test/test/test_scalar -n 1
> --lcores='%d-%d'" % (self.core, self.core + 1), "R.*T.*E.*>.*>", 60)
> +                self.dut.send_expect("./app/test/test_scalar -n 1
> + --lcores='%d-%d'" % (self.core, self.core + 1), "R.*T.*E.*>.*>", 60)
>              else:
> -                self.dut.send_expect("./test/test/test -n 1
> --lcores='%d-%d'" % (self.core, self.core + 1), "R.*T.*E.*>.*>", 60)
> +                self.dut.send_expect("./app/test/test -n 1
> + --lcores='%d-%d'" % (self.core, self.core + 1), "R.*T.*E.*>.*>", 60)
> 
>              table_row = [mode]
>              self.dut.send_expect("set_rxtx_sc continuous", "RTE>>", 10)
> --
> 2.17.2



More information about the dts mailing list