test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests: delete cmd about cd to absolute path
@ 2019-11-19 22:07 lihong
  2019-11-20  8:23 ` Mo, YufengX
  0 siblings, 1 reply; 7+ messages in thread
From: lihong @ 2019-11-19 22:07 UTC (permalink / raw)
  To: dts; +Cc: lihong

Signed-off-by: lihong <lihongx.ma@intel.com>
---
 tests/TestSuite_multiprocess.py              |  1 -
 tests/TestSuite_packet_capture.py            |  4 +---
 tests/TestSuite_power_empty_poll.py          |  5 ++---
 tests/TestSuite_telemetry.py                 |  5 ++---
 tests/TestSuite_unit_tests_loopback.py       | 18 +++++++++---------
 tests/TestSuite_vhost_user_live_migration.py |  1 -
 6 files changed, 14 insertions(+), 20 deletions(-)

diff --git a/tests/TestSuite_multiprocess.py b/tests/TestSuite_multiprocess.py
index 384872c..aa8bfde 100644
--- a/tests/TestSuite_multiprocess.py
+++ b/tests/TestSuite_multiprocess.py
@@ -69,7 +69,6 @@ class TestMultiprocess(TestCase):
         executions.append({'nprocs': 4, 'cores': '1S/2C/2T', 'pps': 0})
         executions.append({'nprocs': 4, 'cores': '1S/4C/1T', 'pps': 0})
         executions.append({'nprocs': 8, 'cores': '1S/4C/2T', 'pps': 0})
-        self.dut.alt_session.send_expect("cd dpdk", "# ", 5)
 
         # start new session to run secondary
         self.session_secondary = self.dut.new_session()
diff --git a/tests/TestSuite_packet_capture.py b/tests/TestSuite_packet_capture.py
index fdaa0d0..b1fbff4 100644
--- a/tests/TestSuite_packet_capture.py
+++ b/tests/TestSuite_packet_capture.py
@@ -500,9 +500,7 @@ class TestPacketCapture(TestCase):
         if not self.is_dut_on_tester:
             self.tester.alt_session.send_expect(
                 "rm -fr {0}/*".format(self.pdump_log), "# ", 20)
-        cmd = ';'.join([
-            "cd %s" % self.target_dir,
-            self.dpdk_pdump + " '%s' >/dev/null 2>&1 &" % (option[0])])
+        cmd = self.dpdk_pdump + " '%s' >/dev/null 2>&1 &" % (option[0])
         self.session_ex.send_expect(cmd, "# ", 15)
         time.sleep(6)
 
diff --git a/tests/TestSuite_power_empty_poll.py b/tests/TestSuite_power_empty_poll.py
index 3556e74..c11ea33 100644
--- a/tests/TestSuite_power_empty_poll.py
+++ b/tests/TestSuite_power_empty_poll.py
@@ -192,15 +192,14 @@ class TestPowerEmptPoll(TestCase):
                 cat /sys/devices/system/cpu/cpu$1/cpufreq/scaling_max_freq >> {1}
             done
         """).format(self.query_min_freq, self.query_max_freq)
-        fileName = 'vm_power_core.sh'
+        fileName = self.target_dir + os.sep + 'vm_power_core.sh'
         query_script = os.path.join(self.output_path, fileName)
         with open(query_script, 'wb') as fp:
             fp.write('#! /bin/sh' + os.linesep + script_content)
         self.dut.session.copy_file_to(query_script, self.target_dir)
         self.query_tool = ';'.join([
-            'cd {}'.format(self.target_dir),
             'chmod 777 {}'.format(fileName),
-            './' + fileName])
+            fileName])
 
     def start_query(self, core):
         cmd = self.query_tool + ' {0} > /dev/null 2>&1 &'.format(core)
diff --git a/tests/TestSuite_telemetry.py b/tests/TestSuite_telemetry.py
index c6e7e08..9962b58 100644
--- a/tests/TestSuite_telemetry.py
+++ b/tests/TestSuite_telemetry.py
@@ -120,15 +120,14 @@ class TestTelemetry(TestCase):
                 client.unregistered = 1
                 print("Get metrics done")
         """)
-        fileName = 'query_tool.py'
+        fileName = self.target_dir + os.sep + 'query_tool.py'
         query_script = os.path.join(self.output_path, fileName)
         with open(query_script, 'wb') as fp:
             fp.write('#! /usr/bin/env python' + os.linesep + script_content)
         self.dut.session.copy_file_to(query_script, self.target_dir)
         self.query_tool = ';'.join([
-            'cd {}'.format(self.target_dir),
             'chmod 777 {}'.format(fileName),
-            './' + fileName])
+            fileName])
 
     def rename_dpdk_telemetry_tool(self):
         '''
diff --git a/tests/TestSuite_unit_tests_loopback.py b/tests/TestSuite_unit_tests_loopback.py
index 50533a6..b52b1c2 100644
--- a/tests/TestSuite_unit_tests_loopback.py
+++ b/tests/TestSuite_unit_tests_loopback.py
@@ -91,9 +91,9 @@ 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/' app/test/test_pmd_perf.c", "# ", 30)
-        self.dut.send_expect("cd app/test", "# ")
-        self.dut.send_expect("make -j", "# ", 120)
-        self.dut.send_expect("cd /root/dpdk", "# ")
+        out = self.dut.build_dpdk_apps('app/test')
+        self.verify("Error" not in out, "Compilation error")
+        self.verify("No such" not in out, "Compilation error")
 
         self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
         self.tester.send_expect("tcpdump -i %s -w ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#")
@@ -112,9 +112,9 @@ 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/' app/test/test_pmd_perf.c", "# ", 30)
-        self.dut.send_expect("cd app/test", "# ")
-        self.dut.send_expect("make -j", "# ", 120)
-        self.dut.send_expect("cd /root/dpdk", "# ")
+        out = self.dut.build_dpdk_apps('app/test')
+        self.verify("Error" not in out, "Compilation error")
+        self.verify("No such" not in out, "Compilation error")
 
         self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
         self.tester.send_expect("tcpdump -i %s -w ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#")
@@ -139,7 +139,7 @@ class TestUnitTestsLoopback(TestCase):
         """
         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 -j", "# ", 120)
-        self.dut.send_expect("cd /root/dpdk", "# ")
+        out = self.dut.build_dpdk_apps('app/test')
+        self.verify("Error" not in out, "Compilation error")
+        self.verify("No such" not in out, "Compilation error")
         self.dut.kill_all()
diff --git a/tests/TestSuite_vhost_user_live_migration.py b/tests/TestSuite_vhost_user_live_migration.py
index 0b1abcc..521f3f5 100644
--- a/tests/TestSuite_vhost_user_live_migration.py
+++ b/tests/TestSuite_vhost_user_live_migration.py
@@ -298,7 +298,6 @@ class TestVhostUserLiveMigration(TestCase):
         vm_dut.send_expect('screen -S %s' % self.screen_name, '# ', 120)
 
         vm_testpmd = self.target + '/app/testpmd -c 0x3 -n 4 -- -i'
-        vm_dut.send_expect('cd %s' % self.base_dir, "# ")
         vm_dut.send_expect(vm_testpmd, 'testpmd> ', 120)
         vm_dut.send_expect('set fwd rxonly', 'testpmd> ', 30)
         vm_dut.send_expect('set promisc all off', 'testpmd> ', 30)
-- 
2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dts] [PATCH V1] tests: delete cmd about cd to absolute path
  2019-11-19 22:07 [dts] [PATCH V1] tests: delete cmd about cd to absolute path lihong
@ 2019-11-20  8:23 ` Mo, YufengX
  2019-11-20  8:37   ` Ma, LihongX
  0 siblings, 1 reply; 7+ messages in thread
From: Mo, YufengX @ 2019-11-20  8:23 UTC (permalink / raw)
  To: Ma, LihongX, dts; +Cc: Ma, LihongX

Hi,ma lihong

Why you remove these `cd ` command?

When dts run suite sript source code,  dut session/dut alt_session should be under dpdk directory by default.

It seems that the framework source code or other suite script violate this rule.

BRs
Yufen, Mo
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
> Sent: Wednesday, November 20, 2019 6:07 AM
> To: dts@dpdk.org
> Cc: Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V1] tests: delete cmd about cd to absolute path
> 
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>  tests/TestSuite_multiprocess.py              |  1 -
>  tests/TestSuite_packet_capture.py            |  4 +---
>  tests/TestSuite_power_empty_poll.py          |  5 ++---
>  tests/TestSuite_telemetry.py                 |  5 ++---
>  tests/TestSuite_unit_tests_loopback.py       | 18 +++++++++---------
>  tests/TestSuite_vhost_user_live_migration.py |  1 -
>  6 files changed, 14 insertions(+), 20 deletions(-)
> 
> diff --git a/tests/TestSuite_multiprocess.py b/tests/TestSuite_multiprocess.py
> index 384872c..aa8bfde 100644
> --- a/tests/TestSuite_multiprocess.py
> +++ b/tests/TestSuite_multiprocess.py
> @@ -69,7 +69,6 @@ class TestMultiprocess(TestCase):
>          executions.append({'nprocs': 4, 'cores': '1S/2C/2T', 'pps': 0})
>          executions.append({'nprocs': 4, 'cores': '1S/4C/1T', 'pps': 0})
>          executions.append({'nprocs': 8, 'cores': '1S/4C/2T', 'pps': 0})
> -        self.dut.alt_session.send_expect("cd dpdk", "# ", 5)
> 
>          # start new session to run secondary
>          self.session_secondary = self.dut.new_session()
> diff --git a/tests/TestSuite_packet_capture.py b/tests/TestSuite_packet_capture.py
> index fdaa0d0..b1fbff4 100644
> --- a/tests/TestSuite_packet_capture.py
> +++ b/tests/TestSuite_packet_capture.py
> @@ -500,9 +500,7 @@ class TestPacketCapture(TestCase):
>          if not self.is_dut_on_tester:
>              self.tester.alt_session.send_expect(
>                  "rm -fr {0}/*".format(self.pdump_log), "# ", 20)
> -        cmd = ';'.join([
> -            "cd %s" % self.target_dir,
> -            self.dpdk_pdump + " '%s' >/dev/null 2>&1 &" % (option[0])])
> +        cmd = self.dpdk_pdump + " '%s' >/dev/null 2>&1 &" % (option[0])
>          self.session_ex.send_expect(cmd, "# ", 15)
>          time.sleep(6)
> 
> diff --git a/tests/TestSuite_power_empty_poll.py b/tests/TestSuite_power_empty_poll.py
> index 3556e74..c11ea33 100644
> --- a/tests/TestSuite_power_empty_poll.py
> +++ b/tests/TestSuite_power_empty_poll.py
> @@ -192,15 +192,14 @@ class TestPowerEmptPoll(TestCase):
>                  cat /sys/devices/system/cpu/cpu$1/cpufreq/scaling_max_freq >> {1}
>              done
>          """).format(self.query_min_freq, self.query_max_freq)
> -        fileName = 'vm_power_core.sh'
> +        fileName = self.target_dir + os.sep + 'vm_power_core.sh'
>          query_script = os.path.join(self.output_path, fileName)
>          with open(query_script, 'wb') as fp:
>              fp.write('#! /bin/sh' + os.linesep + script_content)
>          self.dut.session.copy_file_to(query_script, self.target_dir)
>          self.query_tool = ';'.join([
> -            'cd {}'.format(self.target_dir),
>              'chmod 777 {}'.format(fileName),
> -            './' + fileName])
> +            fileName])
> 
>      def start_query(self, core):
>          cmd = self.query_tool + ' {0} > /dev/null 2>&1 &'.format(core)
> diff --git a/tests/TestSuite_telemetry.py b/tests/TestSuite_telemetry.py
> index c6e7e08..9962b58 100644
> --- a/tests/TestSuite_telemetry.py
> +++ b/tests/TestSuite_telemetry.py
> @@ -120,15 +120,14 @@ class TestTelemetry(TestCase):
>                  client.unregistered = 1
>                  print("Get metrics done")
>          """)
> -        fileName = 'query_tool.py'
> +        fileName = self.target_dir + os.sep + 'query_tool.py'
>          query_script = os.path.join(self.output_path, fileName)
>          with open(query_script, 'wb') as fp:
>              fp.write('#! /usr/bin/env python' + os.linesep + script_content)
>          self.dut.session.copy_file_to(query_script, self.target_dir)
>          self.query_tool = ';'.join([
> -            'cd {}'.format(self.target_dir),
>              'chmod 777 {}'.format(fileName),
> -            './' + fileName])
> +            fileName])
> 
>      def rename_dpdk_telemetry_tool(self):
>          '''
> diff --git a/tests/TestSuite_unit_tests_loopback.py b/tests/TestSuite_unit_tests_loopback.py
> index 50533a6..b52b1c2 100644
> --- a/tests/TestSuite_unit_tests_loopback.py
> +++ b/tests/TestSuite_unit_tests_loopback.py
> @@ -91,9 +91,9 @@ 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/' app/test/test_pmd_perf.c", "# ", 30)
> -        self.dut.send_expect("cd app/test", "# ")
> -        self.dut.send_expect("make -j", "# ", 120)
> -        self.dut.send_expect("cd /root/dpdk", "# ")
> +        out = self.dut.build_dpdk_apps('app/test')
> +        self.verify("Error" not in out, "Compilation error")
> +        self.verify("No such" not in out, "Compilation error")
> 
>          self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
>          self.tester.send_expect("tcpdump -i %s -w ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#")
> @@ -112,9 +112,9 @@ 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/' app/test/test_pmd_perf.c", "# ", 30)
> -        self.dut.send_expect("cd app/test", "# ")
> -        self.dut.send_expect("make -j", "# ", 120)
> -        self.dut.send_expect("cd /root/dpdk", "# ")
> +        out = self.dut.build_dpdk_apps('app/test')
> +        self.verify("Error" not in out, "Compilation error")
> +        self.verify("No such" not in out, "Compilation error")
> 
>          self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
>          self.tester.send_expect("tcpdump -i %s -w ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#")
> @@ -139,7 +139,7 @@ class TestUnitTestsLoopback(TestCase):
>          """
>          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 -j", "# ", 120)
> -        self.dut.send_expect("cd /root/dpdk", "# ")
> +        out = self.dut.build_dpdk_apps('app/test')
> +        self.verify("Error" not in out, "Compilation error")
> +        self.verify("No such" not in out, "Compilation error")
>          self.dut.kill_all()
> diff --git a/tests/TestSuite_vhost_user_live_migration.py b/tests/TestSuite_vhost_user_live_migration.py
> index 0b1abcc..521f3f5 100644
> --- a/tests/TestSuite_vhost_user_live_migration.py
> +++ b/tests/TestSuite_vhost_user_live_migration.py
> @@ -298,7 +298,6 @@ class TestVhostUserLiveMigration(TestCase):
>          vm_dut.send_expect('screen -S %s' % self.screen_name, '# ', 120)
> 
>          vm_testpmd = self.target + '/app/testpmd -c 0x3 -n 4 -- -i'
> -        vm_dut.send_expect('cd %s' % self.base_dir, "# ")
>          vm_dut.send_expect(vm_testpmd, 'testpmd> ', 120)
>          vm_dut.send_expect('set fwd rxonly', 'testpmd> ', 30)
>          vm_dut.send_expect('set promisc all off', 'testpmd> ', 30)
> --
> 2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dts] [PATCH V1] tests: delete cmd about cd to absolute path
  2019-11-20  8:23 ` Mo, YufengX
@ 2019-11-20  8:37   ` Ma, LihongX
  2019-11-20  8:40     ` Mo, YufengX
  0 siblings, 1 reply; 7+ messages in thread
From: Ma, LihongX @ 2019-11-20  8:37 UTC (permalink / raw)
  To: Mo, YufengX, dts

Hi, yufeng
When we create a connect to dut,  cmd 'cd dpdk directory'  have been executed, so we do not need to execute this command in suite
To avoid cd to wrong directory in suite, I remove all the cd command in suite.

-----Original Message-----
From: Mo, YufengX 
Sent: Wednesday, November 20, 2019 4:24 PM
To: Ma, LihongX <lihongx.ma@intel.com>; dts@dpdk.org
Cc: Ma, LihongX <lihongx.ma@intel.com>
Subject: RE: [dts] [PATCH V1] tests: delete cmd about cd to absolute path

Hi,ma lihong

Why you remove these `cd ` command?

When dts run suite sript source code,  dut session/dut alt_session should be under dpdk directory by default.

It seems that the framework source code or other suite script violate this rule.

BRs
Yufen, Mo
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
> Sent: Wednesday, November 20, 2019 6:07 AM
> To: dts@dpdk.org
> Cc: Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V1] tests: delete cmd about cd to absolute path
> 
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>  tests/TestSuite_multiprocess.py              |  1 -
>  tests/TestSuite_packet_capture.py            |  4 +---
>  tests/TestSuite_power_empty_poll.py          |  5 ++---
>  tests/TestSuite_telemetry.py                 |  5 ++---
>  tests/TestSuite_unit_tests_loopback.py       | 18 +++++++++---------
>  tests/TestSuite_vhost_user_live_migration.py |  1 -
>  6 files changed, 14 insertions(+), 20 deletions(-)
> 
> diff --git a/tests/TestSuite_multiprocess.py 
> b/tests/TestSuite_multiprocess.py index 384872c..aa8bfde 100644
> --- a/tests/TestSuite_multiprocess.py
> +++ b/tests/TestSuite_multiprocess.py
> @@ -69,7 +69,6 @@ class TestMultiprocess(TestCase):
>          executions.append({'nprocs': 4, 'cores': '1S/2C/2T', 'pps': 0})
>          executions.append({'nprocs': 4, 'cores': '1S/4C/1T', 'pps': 0})
>          executions.append({'nprocs': 8, 'cores': '1S/4C/2T', 'pps': 0})
> -        self.dut.alt_session.send_expect("cd dpdk", "# ", 5)
> 
>          # start new session to run secondary
>          self.session_secondary = self.dut.new_session() diff --git 
> a/tests/TestSuite_packet_capture.py 
> b/tests/TestSuite_packet_capture.py
> index fdaa0d0..b1fbff4 100644
> --- a/tests/TestSuite_packet_capture.py
> +++ b/tests/TestSuite_packet_capture.py
> @@ -500,9 +500,7 @@ class TestPacketCapture(TestCase):
>          if not self.is_dut_on_tester:
>              self.tester.alt_session.send_expect(
>                  "rm -fr {0}/*".format(self.pdump_log), "# ", 20)
> -        cmd = ';'.join([
> -            "cd %s" % self.target_dir,
> -            self.dpdk_pdump + " '%s' >/dev/null 2>&1 &" % (option[0])])
> +        cmd = self.dpdk_pdump + " '%s' >/dev/null 2>&1 &" % 
> + (option[0])
>          self.session_ex.send_expect(cmd, "# ", 15)
>          time.sleep(6)
> 
> diff --git a/tests/TestSuite_power_empty_poll.py 
> b/tests/TestSuite_power_empty_poll.py
> index 3556e74..c11ea33 100644
> --- a/tests/TestSuite_power_empty_poll.py
> +++ b/tests/TestSuite_power_empty_poll.py
> @@ -192,15 +192,14 @@ class TestPowerEmptPoll(TestCase):
>                  cat /sys/devices/system/cpu/cpu$1/cpufreq/scaling_max_freq >> {1}
>              done
>          """).format(self.query_min_freq, self.query_max_freq)
> -        fileName = 'vm_power_core.sh'
> +        fileName = self.target_dir + os.sep + 'vm_power_core.sh'
>          query_script = os.path.join(self.output_path, fileName)
>          with open(query_script, 'wb') as fp:
>              fp.write('#! /bin/sh' + os.linesep + script_content)
>          self.dut.session.copy_file_to(query_script, self.target_dir)
>          self.query_tool = ';'.join([
> -            'cd {}'.format(self.target_dir),
>              'chmod 777 {}'.format(fileName),
> -            './' + fileName])
> +            fileName])
> 
>      def start_query(self, core):
>          cmd = self.query_tool + ' {0} > /dev/null 2>&1 
> &'.format(core) diff --git a/tests/TestSuite_telemetry.py 
> b/tests/TestSuite_telemetry.py index c6e7e08..9962b58 100644
> --- a/tests/TestSuite_telemetry.py
> +++ b/tests/TestSuite_telemetry.py
> @@ -120,15 +120,14 @@ class TestTelemetry(TestCase):
>                  client.unregistered = 1
>                  print("Get metrics done")
>          """)
> -        fileName = 'query_tool.py'
> +        fileName = self.target_dir + os.sep + 'query_tool.py'
>          query_script = os.path.join(self.output_path, fileName)
>          with open(query_script, 'wb') as fp:
>              fp.write('#! /usr/bin/env python' + os.linesep + script_content)
>          self.dut.session.copy_file_to(query_script, self.target_dir)
>          self.query_tool = ';'.join([
> -            'cd {}'.format(self.target_dir),
>              'chmod 777 {}'.format(fileName),
> -            './' + fileName])
> +            fileName])
> 
>      def rename_dpdk_telemetry_tool(self):
>          '''
> diff --git a/tests/TestSuite_unit_tests_loopback.py 
> b/tests/TestSuite_unit_tests_loopback.py
> index 50533a6..b52b1c2 100644
> --- a/tests/TestSuite_unit_tests_loopback.py
> +++ b/tests/TestSuite_unit_tests_loopback.py
> @@ -91,9 +91,9 @@ 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/' app/test/test_pmd_perf.c", "# ", 30)
> -        self.dut.send_expect("cd app/test", "# ")
> -        self.dut.send_expect("make -j", "# ", 120)
> -        self.dut.send_expect("cd /root/dpdk", "# ")
> +        out = self.dut.build_dpdk_apps('app/test')
> +        self.verify("Error" not in out, "Compilation error")
> +        self.verify("No such" not in out, "Compilation error")
> 
>          self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
>          self.tester.send_expect("tcpdump -i %s -w 
> ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#") @@ -112,9 +112,9 @@ 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/' app/test/test_pmd_perf.c", "# ", 30)
> -        self.dut.send_expect("cd app/test", "# ")
> -        self.dut.send_expect("make -j", "# ", 120)
> -        self.dut.send_expect("cd /root/dpdk", "# ")
> +        out = self.dut.build_dpdk_apps('app/test')
> +        self.verify("Error" not in out, "Compilation error")
> +        self.verify("No such" not in out, "Compilation error")
> 
>          self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
>          self.tester.send_expect("tcpdump -i %s -w 
> ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#") @@ -139,7 +139,7 @@ class TestUnitTestsLoopback(TestCase):
>          """
>          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 -j", "# ", 120)
> -        self.dut.send_expect("cd /root/dpdk", "# ")
> +        out = self.dut.build_dpdk_apps('app/test')
> +        self.verify("Error" not in out, "Compilation error")
> +        self.verify("No such" not in out, "Compilation error")
>          self.dut.kill_all()
> diff --git a/tests/TestSuite_vhost_user_live_migration.py 
> b/tests/TestSuite_vhost_user_live_migration.py
> index 0b1abcc..521f3f5 100644
> --- a/tests/TestSuite_vhost_user_live_migration.py
> +++ b/tests/TestSuite_vhost_user_live_migration.py
> @@ -298,7 +298,6 @@ class TestVhostUserLiveMigration(TestCase):
>          vm_dut.send_expect('screen -S %s' % self.screen_name, '# ', 
> 120)
> 
>          vm_testpmd = self.target + '/app/testpmd -c 0x3 -n 4 -- -i'
> -        vm_dut.send_expect('cd %s' % self.base_dir, "# ")
>          vm_dut.send_expect(vm_testpmd, 'testpmd> ', 120)
>          vm_dut.send_expect('set fwd rxonly', 'testpmd> ', 30)
>          vm_dut.send_expect('set promisc all off', 'testpmd> ', 30)
> --
> 2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dts] [PATCH V1] tests: delete cmd about cd to absolute path
  2019-11-20  8:37   ` Ma, LihongX
@ 2019-11-20  8:40     ` Mo, YufengX
  2019-11-20  8:49       ` Ma, LihongX
  0 siblings, 1 reply; 7+ messages in thread
From: Mo, YufengX @ 2019-11-20  8:40 UTC (permalink / raw)
  To: Ma, LihongX, dts

Hi, lihong

But TestSuite_power_empty_poll.py/ TestSuite_packet_capture.py/ TestSuite_telemetry.py use dpdk  absolute directory of  dts framework.
You changes confuse me.

BRs
Yufen, Mo


> -----Original Message-----
> From: Ma, LihongX
> Sent: Wednesday, November 20, 2019 4:38 PM
> To: Mo, YufengX <yufengx.mo@intel.com>; dts@dpdk.org
> Subject: RE: [dts] [PATCH V1] tests: delete cmd about cd to absolute path
> 
> Hi, yufeng
> When we create a connect to dut,  cmd 'cd dpdk directory'  have been executed, so we do not need to execute this command in suite
> To avoid cd to wrong directory in suite, I remove all the cd command in suite.
> 
> -----Original Message-----
> From: Mo, YufengX
> Sent: Wednesday, November 20, 2019 4:24 PM
> To: Ma, LihongX <lihongx.ma@intel.com>; dts@dpdk.org
> Cc: Ma, LihongX <lihongx.ma@intel.com>
> Subject: RE: [dts] [PATCH V1] tests: delete cmd about cd to absolute path
> 
> Hi,ma lihong
> 
> Why you remove these `cd ` command?
> 
> When dts run suite sript source code,  dut session/dut alt_session should be under dpdk directory by default.
> 
> It seems that the framework source code or other suite script violate this rule.
> 
> BRs
> Yufen, Mo
> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
> > Sent: Wednesday, November 20, 2019 6:07 AM
> > To: dts@dpdk.org
> > Cc: Ma, LihongX <lihongx.ma@intel.com>
> > Subject: [dts] [PATCH V1] tests: delete cmd about cd to absolute path
> >
> > Signed-off-by: lihong <lihongx.ma@intel.com>
> > ---
> >  tests/TestSuite_multiprocess.py              |  1 -
> >  tests/TestSuite_packet_capture.py            |  4 +---
> >  tests/TestSuite_power_empty_poll.py          |  5 ++---
> >  tests/TestSuite_telemetry.py                 |  5 ++---
> >  tests/TestSuite_unit_tests_loopback.py       | 18 +++++++++---------
> >  tests/TestSuite_vhost_user_live_migration.py |  1 -
> >  6 files changed, 14 insertions(+), 20 deletions(-)
> >
> > diff --git a/tests/TestSuite_multiprocess.py
> > b/tests/TestSuite_multiprocess.py index 384872c..aa8bfde 100644
> > --- a/tests/TestSuite_multiprocess.py
> > +++ b/tests/TestSuite_multiprocess.py
> > @@ -69,7 +69,6 @@ class TestMultiprocess(TestCase):
> >          executions.append({'nprocs': 4, 'cores': '1S/2C/2T', 'pps': 0})
> >          executions.append({'nprocs': 4, 'cores': '1S/4C/1T', 'pps': 0})
> >          executions.append({'nprocs': 8, 'cores': '1S/4C/2T', 'pps': 0})
> > -        self.dut.alt_session.send_expect("cd dpdk", "# ", 5)
> >
> >          # start new session to run secondary
> >          self.session_secondary = self.dut.new_session() diff --git
> > a/tests/TestSuite_packet_capture.py
> > b/tests/TestSuite_packet_capture.py
> > index fdaa0d0..b1fbff4 100644
> > --- a/tests/TestSuite_packet_capture.py
> > +++ b/tests/TestSuite_packet_capture.py
> > @@ -500,9 +500,7 @@ class TestPacketCapture(TestCase):
> >          if not self.is_dut_on_tester:
> >              self.tester.alt_session.send_expect(
> >                  "rm -fr {0}/*".format(self.pdump_log), "# ", 20)
> > -        cmd = ';'.join([
> > -            "cd %s" % self.target_dir,
> > -            self.dpdk_pdump + " '%s' >/dev/null 2>&1 &" % (option[0])])
> > +        cmd = self.dpdk_pdump + " '%s' >/dev/null 2>&1 &" %
> > + (option[0])
> >          self.session_ex.send_expect(cmd, "# ", 15)
> >          time.sleep(6)
> >
> > diff --git a/tests/TestSuite_power_empty_poll.py
> > b/tests/TestSuite_power_empty_poll.py
> > index 3556e74..c11ea33 100644
> > --- a/tests/TestSuite_power_empty_poll.py
> > +++ b/tests/TestSuite_power_empty_poll.py
> > @@ -192,15 +192,14 @@ class TestPowerEmptPoll(TestCase):
> >                  cat /sys/devices/system/cpu/cpu$1/cpufreq/scaling_max_freq >> {1}
> >              done
> >          """).format(self.query_min_freq, self.query_max_freq)
> > -        fileName = 'vm_power_core.sh'
> > +        fileName = self.target_dir + os.sep + 'vm_power_core.sh'
> >          query_script = os.path.join(self.output_path, fileName)
> >          with open(query_script, 'wb') as fp:
> >              fp.write('#! /bin/sh' + os.linesep + script_content)
> >          self.dut.session.copy_file_to(query_script, self.target_dir)
> >          self.query_tool = ';'.join([
> > -            'cd {}'.format(self.target_dir),
> >              'chmod 777 {}'.format(fileName),
> > -            './' + fileName])
> > +            fileName])
> >
> >      def start_query(self, core):
> >          cmd = self.query_tool + ' {0} > /dev/null 2>&1
> > &'.format(core) diff --git a/tests/TestSuite_telemetry.py
> > b/tests/TestSuite_telemetry.py index c6e7e08..9962b58 100644
> > --- a/tests/TestSuite_telemetry.py
> > +++ b/tests/TestSuite_telemetry.py
> > @@ -120,15 +120,14 @@ class TestTelemetry(TestCase):
> >                  client.unregistered = 1
> >                  print("Get metrics done")
> >          """)
> > -        fileName = 'query_tool.py'
> > +        fileName = self.target_dir + os.sep + 'query_tool.py'
> >          query_script = os.path.join(self.output_path, fileName)
> >          with open(query_script, 'wb') as fp:
> >              fp.write('#! /usr/bin/env python' + os.linesep + script_content)
> >          self.dut.session.copy_file_to(query_script, self.target_dir)
> >          self.query_tool = ';'.join([
> > -            'cd {}'.format(self.target_dir),
> >              'chmod 777 {}'.format(fileName),
> > -            './' + fileName])
> > +            fileName])
> >
> >      def rename_dpdk_telemetry_tool(self):
> >          '''
> > diff --git a/tests/TestSuite_unit_tests_loopback.py
> > b/tests/TestSuite_unit_tests_loopback.py
> > index 50533a6..b52b1c2 100644
> > --- a/tests/TestSuite_unit_tests_loopback.py
> > +++ b/tests/TestSuite_unit_tests_loopback.py
> > @@ -91,9 +91,9 @@ 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/' app/test/test_pmd_perf.c", "# ", 30)
> > -        self.dut.send_expect("cd app/test", "# ")
> > -        self.dut.send_expect("make -j", "# ", 120)
> > -        self.dut.send_expect("cd /root/dpdk", "# ")
> > +        out = self.dut.build_dpdk_apps('app/test')
> > +        self.verify("Error" not in out, "Compilation error")
> > +        self.verify("No such" not in out, "Compilation error")
> >
> >          self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
> >          self.tester.send_expect("tcpdump -i %s -w
> > ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#") @@ -112,9 +112,9 @@ 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/' app/test/test_pmd_perf.c", "# ", 30)
> > -        self.dut.send_expect("cd app/test", "# ")
> > -        self.dut.send_expect("make -j", "# ", 120)
> > -        self.dut.send_expect("cd /root/dpdk", "# ")
> > +        out = self.dut.build_dpdk_apps('app/test')
> > +        self.verify("Error" not in out, "Compilation error")
> > +        self.verify("No such" not in out, "Compilation error")
> >
> >          self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
> >          self.tester.send_expect("tcpdump -i %s -w
> > ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#") @@ -139,7 +139,7 @@ class TestUnitTestsLoopback(TestCase):
> >          """
> >          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 -j", "# ", 120)
> > -        self.dut.send_expect("cd /root/dpdk", "# ")
> > +        out = self.dut.build_dpdk_apps('app/test')
> > +        self.verify("Error" not in out, "Compilation error")
> > +        self.verify("No such" not in out, "Compilation error")
> >          self.dut.kill_all()
> > diff --git a/tests/TestSuite_vhost_user_live_migration.py
> > b/tests/TestSuite_vhost_user_live_migration.py
> > index 0b1abcc..521f3f5 100644
> > --- a/tests/TestSuite_vhost_user_live_migration.py
> > +++ b/tests/TestSuite_vhost_user_live_migration.py
> > @@ -298,7 +298,6 @@ class TestVhostUserLiveMigration(TestCase):
> >          vm_dut.send_expect('screen -S %s' % self.screen_name, '# ',
> > 120)
> >
> >          vm_testpmd = self.target + '/app/testpmd -c 0x3 -n 4 -- -i'
> > -        vm_dut.send_expect('cd %s' % self.base_dir, "# ")
> >          vm_dut.send_expect(vm_testpmd, 'testpmd> ', 120)
> >          vm_dut.send_expect('set fwd rxonly', 'testpmd> ', 30)
> >          vm_dut.send_expect('set promisc all off', 'testpmd> ', 30)
> > --
> > 2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dts] [PATCH V1] tests: delete cmd about cd to absolute path
  2019-11-20  8:40     ` Mo, YufengX
@ 2019-11-20  8:49       ` Ma, LihongX
  2019-11-20  8:51         ` Mo, YufengX
  0 siblings, 1 reply; 7+ messages in thread
From: Ma, LihongX @ 2019-11-20  8:49 UTC (permalink / raw)
  To: Mo, YufengX, dts

Hi, lihong
About TestSuite_packet_capture.py,
The self.dpdk_pdump already an absolute path, so the cmd cd is useless

About TestSuite_power_empty_poll.py and TestSuite_packet_capture.py
No problem with the original code,  only want to unify code like TestSuite_packet_capture.py, use  an absolute path to start app, so delete cd cmd.

-----Original Message-----
From: Mo, YufengX 
Sent: Wednesday, November 20, 2019 4:41 PM
To: Ma, LihongX <lihongx.ma@intel.com>; dts@dpdk.org
Subject: RE: [dts] [PATCH V1] tests: delete cmd about cd to absolute path

Hi, lihong

But TestSuite_power_empty_poll.py/ TestSuite_packet_capture.py/ TestSuite_telemetry.py use dpdk  absolute directory of  dts framework.
You changes confuse me.

BRs
Yufen, Mo


> -----Original Message-----
> From: Ma, LihongX
> Sent: Wednesday, November 20, 2019 4:38 PM
> To: Mo, YufengX <yufengx.mo@intel.com>; dts@dpdk.org
> Subject: RE: [dts] [PATCH V1] tests: delete cmd about cd to absolute 
> path
> 
> Hi, yufeng
> When we create a connect to dut,  cmd 'cd dpdk directory'  have been 
> executed, so we do not need to execute this command in suite To avoid cd to wrong directory in suite, I remove all the cd command in suite.
> 
> -----Original Message-----
> From: Mo, YufengX
> Sent: Wednesday, November 20, 2019 4:24 PM
> To: Ma, LihongX <lihongx.ma@intel.com>; dts@dpdk.org
> Cc: Ma, LihongX <lihongx.ma@intel.com>
> Subject: RE: [dts] [PATCH V1] tests: delete cmd about cd to absolute 
> path
> 
> Hi,ma lihong
> 
> Why you remove these `cd ` command?
> 
> When dts run suite sript source code,  dut session/dut alt_session should be under dpdk directory by default.
> 
> It seems that the framework source code or other suite script violate this rule.
> 
> BRs
> Yufen, Mo
> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
> > Sent: Wednesday, November 20, 2019 6:07 AM
> > To: dts@dpdk.org
> > Cc: Ma, LihongX <lihongx.ma@intel.com>
> > Subject: [dts] [PATCH V1] tests: delete cmd about cd to absolute 
> > path
> >
> > Signed-off-by: lihong <lihongx.ma@intel.com>
> > ---
> >  tests/TestSuite_multiprocess.py              |  1 -
> >  tests/TestSuite_packet_capture.py            |  4 +---
> >  tests/TestSuite_power_empty_poll.py          |  5 ++---
> >  tests/TestSuite_telemetry.py                 |  5 ++---
> >  tests/TestSuite_unit_tests_loopback.py       | 18 +++++++++---------
> >  tests/TestSuite_vhost_user_live_migration.py |  1 -
> >  6 files changed, 14 insertions(+), 20 deletions(-)
> >
> > diff --git a/tests/TestSuite_multiprocess.py 
> > b/tests/TestSuite_multiprocess.py index 384872c..aa8bfde 100644
> > --- a/tests/TestSuite_multiprocess.py
> > +++ b/tests/TestSuite_multiprocess.py
> > @@ -69,7 +69,6 @@ class TestMultiprocess(TestCase):
> >          executions.append({'nprocs': 4, 'cores': '1S/2C/2T', 'pps': 0})
> >          executions.append({'nprocs': 4, 'cores': '1S/4C/1T', 'pps': 0})
> >          executions.append({'nprocs': 8, 'cores': '1S/4C/2T', 'pps': 0})
> > -        self.dut.alt_session.send_expect("cd dpdk", "# ", 5)
> >
> >          # start new session to run secondary
> >          self.session_secondary = self.dut.new_session() diff --git 
> > a/tests/TestSuite_packet_capture.py
> > b/tests/TestSuite_packet_capture.py
> > index fdaa0d0..b1fbff4 100644
> > --- a/tests/TestSuite_packet_capture.py
> > +++ b/tests/TestSuite_packet_capture.py
> > @@ -500,9 +500,7 @@ class TestPacketCapture(TestCase):
> >          if not self.is_dut_on_tester:
> >              self.tester.alt_session.send_expect(
> >                  "rm -fr {0}/*".format(self.pdump_log), "# ", 20)
> > -        cmd = ';'.join([
> > -            "cd %s" % self.target_dir,
> > -            self.dpdk_pdump + " '%s' >/dev/null 2>&1 &" % (option[0])])
> > +        cmd = self.dpdk_pdump + " '%s' >/dev/null 2>&1 &" %
> > + (option[0])
> >          self.session_ex.send_expect(cmd, "# ", 15)
> >          time.sleep(6)
> >
> > diff --git a/tests/TestSuite_power_empty_poll.py
> > b/tests/TestSuite_power_empty_poll.py
> > index 3556e74..c11ea33 100644
> > --- a/tests/TestSuite_power_empty_poll.py
> > +++ b/tests/TestSuite_power_empty_poll.py
> > @@ -192,15 +192,14 @@ class TestPowerEmptPoll(TestCase):
> >                  cat /sys/devices/system/cpu/cpu$1/cpufreq/scaling_max_freq >> {1}
> >              done
> >          """).format(self.query_min_freq, self.query_max_freq)
> > -        fileName = 'vm_power_core.sh'
> > +        fileName = self.target_dir + os.sep + 'vm_power_core.sh'
> >          query_script = os.path.join(self.output_path, fileName)
> >          with open(query_script, 'wb') as fp:
> >              fp.write('#! /bin/sh' + os.linesep + script_content)
> >          self.dut.session.copy_file_to(query_script, self.target_dir)
> >          self.query_tool = ';'.join([
> > -            'cd {}'.format(self.target_dir),
> >              'chmod 777 {}'.format(fileName),
> > -            './' + fileName])
> > +            fileName])
> >
> >      def start_query(self, core):
> >          cmd = self.query_tool + ' {0} > /dev/null 2>&1
> > &'.format(core) diff --git a/tests/TestSuite_telemetry.py 
> > b/tests/TestSuite_telemetry.py index c6e7e08..9962b58 100644
> > --- a/tests/TestSuite_telemetry.py
> > +++ b/tests/TestSuite_telemetry.py
> > @@ -120,15 +120,14 @@ class TestTelemetry(TestCase):
> >                  client.unregistered = 1
> >                  print("Get metrics done")
> >          """)
> > -        fileName = 'query_tool.py'
> > +        fileName = self.target_dir + os.sep + 'query_tool.py'
> >          query_script = os.path.join(self.output_path, fileName)
> >          with open(query_script, 'wb') as fp:
> >              fp.write('#! /usr/bin/env python' + os.linesep + script_content)
> >          self.dut.session.copy_file_to(query_script, self.target_dir)
> >          self.query_tool = ';'.join([
> > -            'cd {}'.format(self.target_dir),
> >              'chmod 777 {}'.format(fileName),
> > -            './' + fileName])
> > +            fileName])
> >
> >      def rename_dpdk_telemetry_tool(self):
> >          '''
> > diff --git a/tests/TestSuite_unit_tests_loopback.py
> > b/tests/TestSuite_unit_tests_loopback.py
> > index 50533a6..b52b1c2 100644
> > --- a/tests/TestSuite_unit_tests_loopback.py
> > +++ b/tests/TestSuite_unit_tests_loopback.py
> > @@ -91,9 +91,9 @@ 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/' app/test/test_pmd_perf.c", "# ", 30)
> > -        self.dut.send_expect("cd app/test", "# ")
> > -        self.dut.send_expect("make -j", "# ", 120)
> > -        self.dut.send_expect("cd /root/dpdk", "# ")
> > +        out = self.dut.build_dpdk_apps('app/test')
> > +        self.verify("Error" not in out, "Compilation error")
> > +        self.verify("No such" not in out, "Compilation error")
> >
> >          self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
> >          self.tester.send_expect("tcpdump -i %s -w 
> > ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#") @@ -112,9 +112,9 @@ 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/' app/test/test_pmd_perf.c", "# ", 30)
> > -        self.dut.send_expect("cd app/test", "# ")
> > -        self.dut.send_expect("make -j", "# ", 120)
> > -        self.dut.send_expect("cd /root/dpdk", "# ")
> > +        out = self.dut.build_dpdk_apps('app/test')
> > +        self.verify("Error" not in out, "Compilation error")
> > +        self.verify("No such" not in out, "Compilation error")
> >
> >          self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
> >          self.tester.send_expect("tcpdump -i %s -w 
> > ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#") @@ -139,7 +139,7 @@ class TestUnitTestsLoopback(TestCase):
> >          """
> >          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 -j", "# ", 120)
> > -        self.dut.send_expect("cd /root/dpdk", "# ")
> > +        out = self.dut.build_dpdk_apps('app/test')
> > +        self.verify("Error" not in out, "Compilation error")
> > +        self.verify("No such" not in out, "Compilation error")
> >          self.dut.kill_all()
> > diff --git a/tests/TestSuite_vhost_user_live_migration.py
> > b/tests/TestSuite_vhost_user_live_migration.py
> > index 0b1abcc..521f3f5 100644
> > --- a/tests/TestSuite_vhost_user_live_migration.py
> > +++ b/tests/TestSuite_vhost_user_live_migration.py
> > @@ -298,7 +298,6 @@ class TestVhostUserLiveMigration(TestCase):
> >          vm_dut.send_expect('screen -S %s' % self.screen_name, '# ',
> > 120)
> >
> >          vm_testpmd = self.target + '/app/testpmd -c 0x3 -n 4 -- -i'
> > -        vm_dut.send_expect('cd %s' % self.base_dir, "# ")
> >          vm_dut.send_expect(vm_testpmd, 'testpmd> ', 120)
> >          vm_dut.send_expect('set fwd rxonly', 'testpmd> ', 30)
> >          vm_dut.send_expect('set promisc all off', 'testpmd> ', 30)
> > --
> > 2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dts] [PATCH V1] tests: delete cmd about cd to absolute path
  2019-11-20  8:49       ` Ma, LihongX
@ 2019-11-20  8:51         ` Mo, YufengX
  2019-11-20  8:56           ` Ma, LihongX
  0 siblings, 1 reply; 7+ messages in thread
From: Mo, YufengX @ 2019-11-20  8:51 UTC (permalink / raw)
  To: Ma, LihongX, dts

So, It is ridiculous reason. I object it.


> -----Original Message-----
> From: Ma, LihongX
> Sent: Wednesday, November 20, 2019 4:50 PM
> To: Mo, YufengX <yufengx.mo@intel.com>; dts@dpdk.org
> Subject: RE: [dts] [PATCH V1] tests: delete cmd about cd to absolute path
> 
> Hi, lihong
> About TestSuite_packet_capture.py,
> The self.dpdk_pdump already an absolute path, so the cmd cd is useless
> 
> About TestSuite_power_empty_poll.py and TestSuite_packet_capture.py
> No problem with the original code,  only want to unify code like TestSuite_packet_capture.py, use  an absolute path to start app, so delete
> cd cmd.
> 
> -----Original Message-----
> From: Mo, YufengX
> Sent: Wednesday, November 20, 2019 4:41 PM
> To: Ma, LihongX <lihongx.ma@intel.com>; dts@dpdk.org
> Subject: RE: [dts] [PATCH V1] tests: delete cmd about cd to absolute path
> 
> Hi, lihong
> 
> But TestSuite_power_empty_poll.py/ TestSuite_packet_capture.py/ TestSuite_telemetry.py use dpdk  absolute directory of  dts framework.
> You changes confuse me.
> 
> BRs
> Yufen, Mo
> 
> 
> > -----Original Message-----
> > From: Ma, LihongX
> > Sent: Wednesday, November 20, 2019 4:38 PM
> > To: Mo, YufengX <yufengx.mo@intel.com>; dts@dpdk.org
> > Subject: RE: [dts] [PATCH V1] tests: delete cmd about cd to absolute
> > path
> >
> > Hi, yufeng
> > When we create a connect to dut,  cmd 'cd dpdk directory'  have been
> > executed, so we do not need to execute this command in suite To avoid cd to wrong directory in suite, I remove all the cd command in
> suite.
> >
> > -----Original Message-----
> > From: Mo, YufengX
> > Sent: Wednesday, November 20, 2019 4:24 PM
> > To: Ma, LihongX <lihongx.ma@intel.com>; dts@dpdk.org
> > Cc: Ma, LihongX <lihongx.ma@intel.com>
> > Subject: RE: [dts] [PATCH V1] tests: delete cmd about cd to absolute
> > path
> >
> > Hi,ma lihong
> >
> > Why you remove these `cd ` command?
> >
> > When dts run suite sript source code,  dut session/dut alt_session should be under dpdk directory by default.
> >
> > It seems that the framework source code or other suite script violate this rule.
> >
> > BRs
> > Yufen, Mo
> > > -----Original Message-----
> > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
> > > Sent: Wednesday, November 20, 2019 6:07 AM
> > > To: dts@dpdk.org
> > > Cc: Ma, LihongX <lihongx.ma@intel.com>
> > > Subject: [dts] [PATCH V1] tests: delete cmd about cd to absolute
> > > path
> > >
> > > Signed-off-by: lihong <lihongx.ma@intel.com>
> > > ---
> > >  tests/TestSuite_multiprocess.py              |  1 -
> > >  tests/TestSuite_packet_capture.py            |  4 +---
> > >  tests/TestSuite_power_empty_poll.py          |  5 ++---
> > >  tests/TestSuite_telemetry.py                 |  5 ++---
> > >  tests/TestSuite_unit_tests_loopback.py       | 18 +++++++++---------
> > >  tests/TestSuite_vhost_user_live_migration.py |  1 -
> > >  6 files changed, 14 insertions(+), 20 deletions(-)
> > >
> > > diff --git a/tests/TestSuite_multiprocess.py
> > > b/tests/TestSuite_multiprocess.py index 384872c..aa8bfde 100644
> > > --- a/tests/TestSuite_multiprocess.py
> > > +++ b/tests/TestSuite_multiprocess.py
> > > @@ -69,7 +69,6 @@ class TestMultiprocess(TestCase):
> > >          executions.append({'nprocs': 4, 'cores': '1S/2C/2T', 'pps': 0})
> > >          executions.append({'nprocs': 4, 'cores': '1S/4C/1T', 'pps': 0})
> > >          executions.append({'nprocs': 8, 'cores': '1S/4C/2T', 'pps': 0})
> > > -        self.dut.alt_session.send_expect("cd dpdk", "# ", 5)
> > >
> > >          # start new session to run secondary
> > >          self.session_secondary = self.dut.new_session() diff --git
> > > a/tests/TestSuite_packet_capture.py
> > > b/tests/TestSuite_packet_capture.py
> > > index fdaa0d0..b1fbff4 100644
> > > --- a/tests/TestSuite_packet_capture.py
> > > +++ b/tests/TestSuite_packet_capture.py
> > > @@ -500,9 +500,7 @@ class TestPacketCapture(TestCase):
> > >          if not self.is_dut_on_tester:
> > >              self.tester.alt_session.send_expect(
> > >                  "rm -fr {0}/*".format(self.pdump_log), "# ", 20)
> > > -        cmd = ';'.join([
> > > -            "cd %s" % self.target_dir,
> > > -            self.dpdk_pdump + " '%s' >/dev/null 2>&1 &" % (option[0])])
> > > +        cmd = self.dpdk_pdump + " '%s' >/dev/null 2>&1 &" %
> > > + (option[0])
> > >          self.session_ex.send_expect(cmd, "# ", 15)
> > >          time.sleep(6)
> > >
> > > diff --git a/tests/TestSuite_power_empty_poll.py
> > > b/tests/TestSuite_power_empty_poll.py
> > > index 3556e74..c11ea33 100644
> > > --- a/tests/TestSuite_power_empty_poll.py
> > > +++ b/tests/TestSuite_power_empty_poll.py
> > > @@ -192,15 +192,14 @@ class TestPowerEmptPoll(TestCase):
> > >                  cat /sys/devices/system/cpu/cpu$1/cpufreq/scaling_max_freq >> {1}
> > >              done
> > >          """).format(self.query_min_freq, self.query_max_freq)
> > > -        fileName = 'vm_power_core.sh'
> > > +        fileName = self.target_dir + os.sep + 'vm_power_core.sh'
> > >          query_script = os.path.join(self.output_path, fileName)
> > >          with open(query_script, 'wb') as fp:
> > >              fp.write('#! /bin/sh' + os.linesep + script_content)
> > >          self.dut.session.copy_file_to(query_script, self.target_dir)
> > >          self.query_tool = ';'.join([
> > > -            'cd {}'.format(self.target_dir),
> > >              'chmod 777 {}'.format(fileName),
> > > -            './' + fileName])
> > > +            fileName])
> > >
> > >      def start_query(self, core):
> > >          cmd = self.query_tool + ' {0} > /dev/null 2>&1
> > > &'.format(core) diff --git a/tests/TestSuite_telemetry.py
> > > b/tests/TestSuite_telemetry.py index c6e7e08..9962b58 100644
> > > --- a/tests/TestSuite_telemetry.py
> > > +++ b/tests/TestSuite_telemetry.py
> > > @@ -120,15 +120,14 @@ class TestTelemetry(TestCase):
> > >                  client.unregistered = 1
> > >                  print("Get metrics done")
> > >          """)
> > > -        fileName = 'query_tool.py'
> > > +        fileName = self.target_dir + os.sep + 'query_tool.py'
> > >          query_script = os.path.join(self.output_path, fileName)
> > >          with open(query_script, 'wb') as fp:
> > >              fp.write('#! /usr/bin/env python' + os.linesep + script_content)
> > >          self.dut.session.copy_file_to(query_script, self.target_dir)
> > >          self.query_tool = ';'.join([
> > > -            'cd {}'.format(self.target_dir),
> > >              'chmod 777 {}'.format(fileName),
> > > -            './' + fileName])
> > > +            fileName])
> > >
> > >      def rename_dpdk_telemetry_tool(self):
> > >          '''
> > > diff --git a/tests/TestSuite_unit_tests_loopback.py
> > > b/tests/TestSuite_unit_tests_loopback.py
> > > index 50533a6..b52b1c2 100644
> > > --- a/tests/TestSuite_unit_tests_loopback.py
> > > +++ b/tests/TestSuite_unit_tests_loopback.py
> > > @@ -91,9 +91,9 @@ 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/' app/test/test_pmd_perf.c", "# ", 30)
> > > -        self.dut.send_expect("cd app/test", "# ")
> > > -        self.dut.send_expect("make -j", "# ", 120)
> > > -        self.dut.send_expect("cd /root/dpdk", "# ")
> > > +        out = self.dut.build_dpdk_apps('app/test')
> > > +        self.verify("Error" not in out, "Compilation error")
> > > +        self.verify("No such" not in out, "Compilation error")
> > >
> > >          self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
> > >          self.tester.send_expect("tcpdump -i %s -w
> > > ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#") @@ -112,9 +112,9 @@ 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/' app/test/test_pmd_perf.c", "# ", 30)
> > > -        self.dut.send_expect("cd app/test", "# ")
> > > -        self.dut.send_expect("make -j", "# ", 120)
> > > -        self.dut.send_expect("cd /root/dpdk", "# ")
> > > +        out = self.dut.build_dpdk_apps('app/test')
> > > +        self.verify("Error" not in out, "Compilation error")
> > > +        self.verify("No such" not in out, "Compilation error")
> > >
> > >          self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
> > >          self.tester.send_expect("tcpdump -i %s -w
> > > ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#") @@ -139,7 +139,7 @@ class TestUnitTestsLoopback(TestCase):
> > >          """
> > >          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 -j", "# ", 120)
> > > -        self.dut.send_expect("cd /root/dpdk", "# ")
> > > +        out = self.dut.build_dpdk_apps('app/test')
> > > +        self.verify("Error" not in out, "Compilation error")
> > > +        self.verify("No such" not in out, "Compilation error")
> > >          self.dut.kill_all()
> > > diff --git a/tests/TestSuite_vhost_user_live_migration.py
> > > b/tests/TestSuite_vhost_user_live_migration.py
> > > index 0b1abcc..521f3f5 100644
> > > --- a/tests/TestSuite_vhost_user_live_migration.py
> > > +++ b/tests/TestSuite_vhost_user_live_migration.py
> > > @@ -298,7 +298,6 @@ class TestVhostUserLiveMigration(TestCase):
> > >          vm_dut.send_expect('screen -S %s' % self.screen_name, '# ',
> > > 120)
> > >
> > >          vm_testpmd = self.target + '/app/testpmd -c 0x3 -n 4 -- -i'
> > > -        vm_dut.send_expect('cd %s' % self.base_dir, "# ")
> > >          vm_dut.send_expect(vm_testpmd, 'testpmd> ', 120)
> > >          vm_dut.send_expect('set fwd rxonly', 'testpmd> ', 30)
> > >          vm_dut.send_expect('set promisc all off', 'testpmd> ', 30)
> > > --
> > > 2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dts] [PATCH V1] tests: delete cmd about cd to absolute path
  2019-11-20  8:51         ` Mo, YufengX
@ 2019-11-20  8:56           ` Ma, LihongX
  0 siblings, 0 replies; 7+ messages in thread
From: Ma, LihongX @ 2019-11-20  8:56 UTC (permalink / raw)
  To: Mo, YufengX, dts


As you say, I will remove the TestSuite_power_empty_poll.py and TestSuite_packet_capture.py from the patch.

-----Original Message-----
From: Mo, YufengX 
Sent: Wednesday, November 20, 2019 4:51 PM
To: Ma, LihongX <lihongx.ma@intel.com>; dts@dpdk.org
Subject: RE: [dts] [PATCH V1] tests: delete cmd about cd to absolute path

So, It is ridiculous reason. I object it.


> -----Original Message-----
> From: Ma, LihongX
> Sent: Wednesday, November 20, 2019 4:50 PM
> To: Mo, YufengX <yufengx.mo@intel.com>; dts@dpdk.org
> Subject: RE: [dts] [PATCH V1] tests: delete cmd about cd to absolute 
> path
> 
> Hi, lihong
> About TestSuite_packet_capture.py,
> The self.dpdk_pdump already an absolute path, so the cmd cd is useless
> 
> About TestSuite_power_empty_poll.py and TestSuite_packet_capture.py No 
> problem with the original code,  only want to unify code like 
> TestSuite_packet_capture.py, use  an absolute path to start app, so delete cd cmd.
> 
> -----Original Message-----
> From: Mo, YufengX
> Sent: Wednesday, November 20, 2019 4:41 PM
> To: Ma, LihongX <lihongx.ma@intel.com>; dts@dpdk.org
> Subject: RE: [dts] [PATCH V1] tests: delete cmd about cd to absolute 
> path
> 
> Hi, lihong
> 
> But TestSuite_power_empty_poll.py/ TestSuite_packet_capture.py/ TestSuite_telemetry.py use dpdk  absolute directory of  dts framework.
> You changes confuse me.
> 
> BRs
> Yufen, Mo
> 
> 
> > -----Original Message-----
> > From: Ma, LihongX
> > Sent: Wednesday, November 20, 2019 4:38 PM
> > To: Mo, YufengX <yufengx.mo@intel.com>; dts@dpdk.org
> > Subject: RE: [dts] [PATCH V1] tests: delete cmd about cd to absolute 
> > path
> >
> > Hi, yufeng
> > When we create a connect to dut,  cmd 'cd dpdk directory'  have been 
> > executed, so we do not need to execute this command in suite To 
> > avoid cd to wrong directory in suite, I remove all the cd command in
> suite.
> >
> > -----Original Message-----
> > From: Mo, YufengX
> > Sent: Wednesday, November 20, 2019 4:24 PM
> > To: Ma, LihongX <lihongx.ma@intel.com>; dts@dpdk.org
> > Cc: Ma, LihongX <lihongx.ma@intel.com>
> > Subject: RE: [dts] [PATCH V1] tests: delete cmd about cd to absolute 
> > path
> >
> > Hi,ma lihong
> >
> > Why you remove these `cd ` command?
> >
> > When dts run suite sript source code,  dut session/dut alt_session should be under dpdk directory by default.
> >
> > It seems that the framework source code or other suite script violate this rule.
> >
> > BRs
> > Yufen, Mo
> > > -----Original Message-----
> > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
> > > Sent: Wednesday, November 20, 2019 6:07 AM
> > > To: dts@dpdk.org
> > > Cc: Ma, LihongX <lihongx.ma@intel.com>
> > > Subject: [dts] [PATCH V1] tests: delete cmd about cd to absolute 
> > > path
> > >
> > > Signed-off-by: lihong <lihongx.ma@intel.com>
> > > ---
> > >  tests/TestSuite_multiprocess.py              |  1 -
> > >  tests/TestSuite_packet_capture.py            |  4 +---
> > >  tests/TestSuite_power_empty_poll.py          |  5 ++---
> > >  tests/TestSuite_telemetry.py                 |  5 ++---
> > >  tests/TestSuite_unit_tests_loopback.py       | 18 +++++++++---------
> > >  tests/TestSuite_vhost_user_live_migration.py |  1 -
> > >  6 files changed, 14 insertions(+), 20 deletions(-)
> > >
> > > diff --git a/tests/TestSuite_multiprocess.py 
> > > b/tests/TestSuite_multiprocess.py index 384872c..aa8bfde 100644
> > > --- a/tests/TestSuite_multiprocess.py
> > > +++ b/tests/TestSuite_multiprocess.py
> > > @@ -69,7 +69,6 @@ class TestMultiprocess(TestCase):
> > >          executions.append({'nprocs': 4, 'cores': '1S/2C/2T', 'pps': 0})
> > >          executions.append({'nprocs': 4, 'cores': '1S/4C/1T', 'pps': 0})
> > >          executions.append({'nprocs': 8, 'cores': '1S/4C/2T', 'pps': 0})
> > > -        self.dut.alt_session.send_expect("cd dpdk", "# ", 5)
> > >
> > >          # start new session to run secondary
> > >          self.session_secondary = self.dut.new_session() diff 
> > > --git a/tests/TestSuite_packet_capture.py
> > > b/tests/TestSuite_packet_capture.py
> > > index fdaa0d0..b1fbff4 100644
> > > --- a/tests/TestSuite_packet_capture.py
> > > +++ b/tests/TestSuite_packet_capture.py
> > > @@ -500,9 +500,7 @@ class TestPacketCapture(TestCase):
> > >          if not self.is_dut_on_tester:
> > >              self.tester.alt_session.send_expect(
> > >                  "rm -fr {0}/*".format(self.pdump_log), "# ", 20)
> > > -        cmd = ';'.join([
> > > -            "cd %s" % self.target_dir,
> > > -            self.dpdk_pdump + " '%s' >/dev/null 2>&1 &" % (option[0])])
> > > +        cmd = self.dpdk_pdump + " '%s' >/dev/null 2>&1 &" %
> > > + (option[0])
> > >          self.session_ex.send_expect(cmd, "# ", 15)
> > >          time.sleep(6)
> > >
> > > diff --git a/tests/TestSuite_power_empty_poll.py
> > > b/tests/TestSuite_power_empty_poll.py
> > > index 3556e74..c11ea33 100644
> > > --- a/tests/TestSuite_power_empty_poll.py
> > > +++ b/tests/TestSuite_power_empty_poll.py
> > > @@ -192,15 +192,14 @@ class TestPowerEmptPoll(TestCase):
> > >                  cat /sys/devices/system/cpu/cpu$1/cpufreq/scaling_max_freq >> {1}
> > >              done
> > >          """).format(self.query_min_freq, self.query_max_freq)
> > > -        fileName = 'vm_power_core.sh'
> > > +        fileName = self.target_dir + os.sep + 'vm_power_core.sh'
> > >          query_script = os.path.join(self.output_path, fileName)
> > >          with open(query_script, 'wb') as fp:
> > >              fp.write('#! /bin/sh' + os.linesep + script_content)
> > >          self.dut.session.copy_file_to(query_script, self.target_dir)
> > >          self.query_tool = ';'.join([
> > > -            'cd {}'.format(self.target_dir),
> > >              'chmod 777 {}'.format(fileName),
> > > -            './' + fileName])
> > > +            fileName])
> > >
> > >      def start_query(self, core):
> > >          cmd = self.query_tool + ' {0} > /dev/null 2>&1
> > > &'.format(core) diff --git a/tests/TestSuite_telemetry.py 
> > > b/tests/TestSuite_telemetry.py index c6e7e08..9962b58 100644
> > > --- a/tests/TestSuite_telemetry.py
> > > +++ b/tests/TestSuite_telemetry.py
> > > @@ -120,15 +120,14 @@ class TestTelemetry(TestCase):
> > >                  client.unregistered = 1
> > >                  print("Get metrics done")
> > >          """)
> > > -        fileName = 'query_tool.py'
> > > +        fileName = self.target_dir + os.sep + 'query_tool.py'
> > >          query_script = os.path.join(self.output_path, fileName)
> > >          with open(query_script, 'wb') as fp:
> > >              fp.write('#! /usr/bin/env python' + os.linesep + script_content)
> > >          self.dut.session.copy_file_to(query_script, self.target_dir)
> > >          self.query_tool = ';'.join([
> > > -            'cd {}'.format(self.target_dir),
> > >              'chmod 777 {}'.format(fileName),
> > > -            './' + fileName])
> > > +            fileName])
> > >
> > >      def rename_dpdk_telemetry_tool(self):
> > >          '''
> > > diff --git a/tests/TestSuite_unit_tests_loopback.py
> > > b/tests/TestSuite_unit_tests_loopback.py
> > > index 50533a6..b52b1c2 100644
> > > --- a/tests/TestSuite_unit_tests_loopback.py
> > > +++ b/tests/TestSuite_unit_tests_loopback.py
> > > @@ -91,9 +91,9 @@ 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/' app/test/test_pmd_perf.c", "# ", 30)
> > > -        self.dut.send_expect("cd app/test", "# ")
> > > -        self.dut.send_expect("make -j", "# ", 120)
> > > -        self.dut.send_expect("cd /root/dpdk", "# ")
> > > +        out = self.dut.build_dpdk_apps('app/test')
> > > +        self.verify("Error" not in out, "Compilation error")
> > > +        self.verify("No such" not in out, "Compilation error")
> > >
> > >          self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
> > >          self.tester.send_expect("tcpdump -i %s -w 
> > > ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#") @@ -112,9 +112,9 @@ 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/' app/test/test_pmd_perf.c", "# ", 30)
> > > -        self.dut.send_expect("cd app/test", "# ")
> > > -        self.dut.send_expect("make -j", "# ", 120)
> > > -        self.dut.send_expect("cd /root/dpdk", "# ")
> > > +        out = self.dut.build_dpdk_apps('app/test')
> > > +        self.verify("Error" not in out, "Compilation error")
> > > +        self.verify("No such" not in out, "Compilation error")
> > >
> > >          self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
> > >          self.tester.send_expect("tcpdump -i %s -w 
> > > ./getPackageByTcpdump.cap 2> /dev/null& " % self.tester_itf, "#") @@ -139,7 +139,7 @@ class TestUnitTestsLoopback(TestCase):
> > >          """
> > >          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 -j", "# ", 120)
> > > -        self.dut.send_expect("cd /root/dpdk", "# ")
> > > +        out = self.dut.build_dpdk_apps('app/test')
> > > +        self.verify("Error" not in out, "Compilation error")
> > > +        self.verify("No such" not in out, "Compilation error")
> > >          self.dut.kill_all()
> > > diff --git a/tests/TestSuite_vhost_user_live_migration.py
> > > b/tests/TestSuite_vhost_user_live_migration.py
> > > index 0b1abcc..521f3f5 100644
> > > --- a/tests/TestSuite_vhost_user_live_migration.py
> > > +++ b/tests/TestSuite_vhost_user_live_migration.py
> > > @@ -298,7 +298,6 @@ class TestVhostUserLiveMigration(TestCase):
> > >          vm_dut.send_expect('screen -S %s' % self.screen_name, '# 
> > > ',
> > > 120)
> > >
> > >          vm_testpmd = self.target + '/app/testpmd -c 0x3 -n 4 -- -i'
> > > -        vm_dut.send_expect('cd %s' % self.base_dir, "# ")
> > >          vm_dut.send_expect(vm_testpmd, 'testpmd> ', 120)
> > >          vm_dut.send_expect('set fwd rxonly', 'testpmd> ', 30)
> > >          vm_dut.send_expect('set promisc all off', 'testpmd> ', 
> > > 30)
> > > --
> > > 2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-11-20  8:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19 22:07 [dts] [PATCH V1] tests: delete cmd about cd to absolute path lihong
2019-11-20  8:23 ` Mo, YufengX
2019-11-20  8:37   ` Ma, LihongX
2019-11-20  8:40     ` Mo, YufengX
2019-11-20  8:49       ` Ma, LihongX
2019-11-20  8:51         ` Mo, YufengX
2019-11-20  8:56           ` Ma, LihongX

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).