test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1 0/2] power_branch_ratio: add suite config content and cpu mapping
@ 2020-07-01  6:01 yufengmx
  2020-07-01  6:01 ` [dts] [PATCH V1 1/2] power_branch_ratio: add suite config content yufengmx
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: yufengmx @ 2020-07-01  6:01 UTC (permalink / raw)
  To: dts, lei.a.yao; +Cc: yufengmx


. add suite config content for traffic frame size and branch ratio threshold. 

. add vcpu to pcpu mapping. 

yufengmx (2):
  power_branch_ratio: add suite config content
  power_branch_ratio: add suite config content and cpu mapping

 conf/power_branch_ratio.cfg           |  3 +++
 tests/TestSuite_power_branch_ratio.py | 18 +++++++++++-------
 2 files changed, 14 insertions(+), 7 deletions(-)

-- 
2.21.0


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

* [dts] [PATCH V1 1/2] power_branch_ratio: add suite config content
  2020-07-01  6:01 [dts] [PATCH V1 0/2] power_branch_ratio: add suite config content and cpu mapping yufengmx
@ 2020-07-01  6:01 ` yufengmx
  2020-07-01  6:01 ` [dts] [PATCH V1 2/2] power_branch_ratio: add suite config content and cpu yufengmx
  2020-07-01  6:18 ` [dts] [PATCH V1 0/2] power_branch_ratio: add suite config content and cpu mapping Tu, Lijuan
  2 siblings, 0 replies; 4+ messages in thread
From: yufengmx @ 2020-07-01  6:01 UTC (permalink / raw)
  To: dts, lei.a.yao; +Cc: yufengmx


add suite config content for traffic frame size and branch ratio threshold.

Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
 conf/power_branch_ratio.cfg | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/conf/power_branch_ratio.cfg b/conf/power_branch_ratio.cfg
index bb4af67..2f8ead6 100644
--- a/conf/power_branch_ratio.cfg
+++ b/conf/power_branch_ratio.cfg
@@ -28,3 +28,6 @@ disk =
     file=/home/image/xxxxx.img,opt_format=qcow2;
 login =
     user=root,password=tester;
+[suite]
+frame_size = 1024
+check_core = 0.3
-- 
2.21.0


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

* [dts] [PATCH V1 2/2] power_branch_ratio: add suite config content and cpu
  2020-07-01  6:01 [dts] [PATCH V1 0/2] power_branch_ratio: add suite config content and cpu mapping yufengmx
  2020-07-01  6:01 ` [dts] [PATCH V1 1/2] power_branch_ratio: add suite config content yufengmx
@ 2020-07-01  6:01 ` yufengmx
  2020-07-01  6:18 ` [dts] [PATCH V1 0/2] power_branch_ratio: add suite config content and cpu mapping Tu, Lijuan
  2 siblings, 0 replies; 4+ messages in thread
From: yufengmx @ 2020-07-01  6:01 UTC (permalink / raw)
  To: dts, lei.a.yao; +Cc: yufengmx

 mapping

#. add suite config content for traffic frame size and branch ratio threshold.
#. add vcpu to pcpu mapping.

Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
 tests/TestSuite_power_branch_ratio.py | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/tests/TestSuite_power_branch_ratio.py b/tests/TestSuite_power_branch_ratio.py
index e055b03..8bd82d4 100644
--- a/tests/TestSuite_power_branch_ratio.py
+++ b/tests/TestSuite_power_branch_ratio.py
@@ -152,7 +152,7 @@ class TestPowerBranchRatio(TestCase):
                 'type': pkt_name.upper(),
                 'pkt_layers': {
                     'ether': {'dst': dmac},
-                    'raw': {'payload': ['58'] * self.get_pkt_len(pkt_name)}}},
+                    'raw': {'payload': ['58'] * self.get_pkt_len(pkt_name, frame_size=self.frame_size)}}},
         }
         # create packet for send
         if stm_name not in list(pkt_configs.keys()):
@@ -229,7 +229,7 @@ class TestPowerBranchRatio(TestCase):
         self.d_a_con(cmd)
 
     def init_vms_params(self):
-        self.vcpu_map = self.vm = self.vm_dut = self.guest_session = None
+        self.vcpu_map = self.vcpu_lst = self.vm = self.vm_dut = self.guest_session = None
         self.vm_log_dir = '/tmp/powermonitor'
         self.create_powermonitor_folder()
 
@@ -267,7 +267,8 @@ class TestPowerBranchRatio(TestCase):
         self.verify(self.vm_dut, "create vm_dut fail !")
         self.add_console(self.vm_dut.session)
         # get virtual machine cpu cores
-        self.vcpu_map = self.vm.get_vm_cpu()
+        self.vcpu_map = [int(core) for core in self.vm.get_vm_cpu()]
+        self.vcpu_lst = [int(item['core']) for item  in self.vm_dut.cores]
 
     def close_vm(self):
         '''
@@ -383,7 +384,7 @@ class TestPowerBranchRatio(TestCase):
                 'file_prefix': 'vmpower1',
                 'vm_name': self.vm_name,
                 'vpus': ','.join(
-                    [str(int(index) - 1) for index in self.vcpu_map]),
+                    [str(index) for index in self.vcpu_lst]),
             })
         guest_cmd = ' '.join([self.guest_cli, option])
         self.vm_g_con([guest_cmd, prompt, 120])
@@ -573,7 +574,7 @@ class TestPowerBranchRatio(TestCase):
             # run traffic
             option = {'stm_type': 'UDP_1', }
             self.run_traffic(option)
-            time.sleep(2)
+            time.sleep(10)
             # check test result
             self.check_core_freq_in_traffic(self.check_core)
             self.check_vm_power_mgr_output()
@@ -625,7 +626,10 @@ class TestPowerBranchRatio(TestCase):
         self.init_vm_power_mgr()
         self.init_vm_testpmd()
         self.init_guest_mgr()
-        self.check_core = 2
+        test_content = self.get_suite_cfg()
+        self.frame_size = test_content.get('frame_size') or 1024
+        self.check_ratio = test_content.get('check_ratio') or 0.1
+        self.check_core = self.vcpu_map[1]
         msg = "select dut core {} as check core".format(self.check_core)
         self.logger.info(msg)
     #
@@ -675,5 +679,5 @@ class TestPowerBranchRatio(TestCase):
         """
         Set Branch-Ratio Rate by User
         """
-        self.branch_ratio = 0.1
+        self.branch_ratio = self.check_ratio
         self.verify_branch_ratio()
-- 
2.21.0


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

* Re: [dts] [PATCH V1 0/2] power_branch_ratio: add suite config content and cpu mapping
  2020-07-01  6:01 [dts] [PATCH V1 0/2] power_branch_ratio: add suite config content and cpu mapping yufengmx
  2020-07-01  6:01 ` [dts] [PATCH V1 1/2] power_branch_ratio: add suite config content yufengmx
  2020-07-01  6:01 ` [dts] [PATCH V1 2/2] power_branch_ratio: add suite config content and cpu yufengmx
@ 2020-07-01  6:18 ` Tu, Lijuan
  2 siblings, 0 replies; 4+ messages in thread
From: Tu, Lijuan @ 2020-07-01  6:18 UTC (permalink / raw)
  To: Mo, YufengX, dts, Yao, Lei A; +Cc: Mo, YufengX

Applied the series, thanks

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of yufengmx
> Sent: 2020年7月1日 14:02
> To: dts@dpdk.org; Yao, Lei A <lei.a.yao@intel.com>
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts] [PATCH V1 0/2] power_branch_ratio: add suite config content and
> cpu mapping
> 
> 
> . add suite config content for traffic frame size and branch ratio threshold.
> 
> . add vcpu to pcpu mapping.
> 
> yufengmx (2):
>   power_branch_ratio: add suite config content
>   power_branch_ratio: add suite config content and cpu mapping
> 
>  conf/power_branch_ratio.cfg           |  3 +++
>  tests/TestSuite_power_branch_ratio.py | 18 +++++++++++-------
>  2 files changed, 14 insertions(+), 7 deletions(-)
> 
> --
> 2.21.0


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

end of thread, other threads:[~2020-07-01  6:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01  6:01 [dts] [PATCH V1 0/2] power_branch_ratio: add suite config content and cpu mapping yufengmx
2020-07-01  6:01 ` [dts] [PATCH V1 1/2] power_branch_ratio: add suite config content yufengmx
2020-07-01  6:01 ` [dts] [PATCH V1 2/2] power_branch_ratio: add suite config content and cpu yufengmx
2020-07-01  6:18 ` [dts] [PATCH V1 0/2] power_branch_ratio: add suite config content and cpu mapping Tu, Lijuan

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