* [dts] [PATCH V1 0/1] power_bidirection_channel: python3 support and script optimize
@ 2020-03-23 2:10 yufengmx
2020-03-23 2:10 ` [dts] [PATCH V1 1/1] tests/power_bidirection_channel: python3 support and script yufengmx
2020-03-23 2:19 ` [dts] [PATCH V1 0/1] power_bidirection_channel: python3 support and script optimize Mo, YufengX
0 siblings, 2 replies; 5+ messages in thread
From: yufengmx @ 2020-03-23 2:10 UTC (permalink / raw)
To: dts, lei.a.yao; +Cc: yufengmx
. python3 support.
. display dpdk version.
. use ^C to take the place of killall.
yufengmx (1):
tests/power_bidirection_channel: python3 support and script optimize
tests/TestSuite_power_bidirection_channel.py | 21 ++++++++------------
1 file changed, 8 insertions(+), 13 deletions(-)
--
2.21.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts] [PATCH V1 1/1] tests/power_bidirection_channel: python3 support and script
2020-03-23 2:10 [dts] [PATCH V1 0/1] power_bidirection_channel: python3 support and script optimize yufengmx
@ 2020-03-23 2:10 ` yufengmx
2020-03-24 6:51 ` Tu, Lijuan
2020-03-23 2:19 ` [dts] [PATCH V1 0/1] power_bidirection_channel: python3 support and script optimize Mo, YufengX
1 sibling, 1 reply; 5+ messages in thread
From: yufengmx @ 2020-03-23 2:10 UTC (permalink / raw)
To: dts, lei.a.yao; +Cc: yufengmx
optimize
#. python3 support.
#. display dpdk version.
#. use ^C to take the place of killall.
Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
tests/TestSuite_power_bidirection_channel.py | 21 ++++++++------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/tests/TestSuite_power_bidirection_channel.py b/tests/TestSuite_power_bidirection_channel.py
index ed82fda..8159e11 100644
--- a/tests/TestSuite_power_bidirection_channel.py
+++ b/tests/TestSuite_power_bidirection_channel.py
@@ -31,7 +31,7 @@
"""
DPDK Test suite.
-virtual power manager test suite.
+power bidirection channel test suite.
"""
import os
import time
@@ -44,8 +44,6 @@ from test_case import TestCase
class TestPowerBidirectionChannel(TestCase):
- # temporary file directory
- output_path = '/tmp'
@property
def target_dir(self):
@@ -95,7 +93,7 @@ class TestPowerBidirectionChannel(TestCase):
console, msg_pipe = self.get_console(name)
if len(cmds) == 0:
return
- if isinstance(cmds, (str, unicode)):
+ if isinstance(cmds, str):
cmds = [cmds, '# ', 5]
if not isinstance(cmds[0], list):
cmds = [cmds]
@@ -103,10 +101,8 @@ class TestPowerBidirectionChannel(TestCase):
for item in cmds:
expected_items = item[1]
if expected_items and isinstance(expected_items, (list, tuple)):
- check_output = True
expected_str = expected_items[0] or '# '
else:
- check_output = False
expected_str = expected_items or '# '
try:
@@ -195,14 +191,14 @@ class TestPowerBidirectionChannel(TestCase):
# get high priority core and normal core
base_freqs_info = {}
- for core_index, value in cpu_info.iteritems():
+ for core_index, value in cpu_info.items():
base_frequency = value.get('base_frequency')
base_freqs_info.setdefault(base_frequency, []).append(core_index)
- base_freqs = base_freqs_info.keys()
+ base_freqs = list(base_freqs_info.keys())
# cpu should have high priority core and normal core
# high priority core frequency is higher than normal core frequency
if len(base_freqs) <= 1 or \
- not all([len(value) for value in base_freqs_info.values()]):
+ not all([len(value) for value in list(base_freqs_info.values())]):
msg = 'current cpu has no high priority core'
raise Exception(msg)
@@ -273,15 +269,14 @@ class TestPowerBidirectionChannel(TestCase):
self.vm_power_mgr = self.prepare_binary('vm_power_manager')
def start_vm_power_mgr(self):
- eal_option = (
- ' '
+ option = (
+ ' -v '
'-c {core_mask} '
'-n {mem_channel} '
'--no-pci ').format(**{
'core_mask': self.get_cores_mask("1S/3C/1T"),
'mem_channel': self.dut.get_memory_channels(), })
prompt = 'vmpower>'
- option = eal_option
cmd = [' '.join([self.vm_power_mgr, option]), prompt, 30]
self.d_con(cmd)
self.is_mgr_on = True
@@ -321,7 +316,7 @@ class TestPowerBidirectionChannel(TestCase):
def start_guest_mgr(self):
prompt = r"vmpower\(guest\)>"
option = (
- ' '
+ ' -v '
'-c {core_mask} '
'-n {memory_channel} '
'-m {memory_size} '
--
2.21.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1 0/1] power_bidirection_channel: python3 support and script optimize
2020-03-23 2:10 [dts] [PATCH V1 0/1] power_bidirection_channel: python3 support and script optimize yufengmx
2020-03-23 2:10 ` [dts] [PATCH V1 1/1] tests/power_bidirection_channel: python3 support and script yufengmx
@ 2020-03-23 2:19 ` Mo, YufengX
2020-03-25 1:46 ` Yao, Lei A
1 sibling, 1 reply; 5+ messages in thread
From: Mo, YufengX @ 2020-03-23 2:19 UTC (permalink / raw)
To: dts, Yao, Lei A
Tested by: Mo, YufengX <yufengx.mo@intel.com>
> -----Original Message-----
> From: Mo, YufengX
> Sent: Monday, March 23, 2020 10:11 AM
> To: dts@dpdk.org; Yao, Lei A <lei.a.yao@intel.com>
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts][PATCH V1 0/1] power_bidirection_channel: python3 support and script optimize
>
>
> . python3 support.
>
> . display dpdk version.
>
> . use ^C to take the place of killall.
>
> yufengmx (1):
> tests/power_bidirection_channel: python3 support and script optimize
>
> tests/TestSuite_power_bidirection_channel.py | 21 ++++++++------------
> 1 file changed, 8 insertions(+), 13 deletions(-)
>
> --
> 2.21.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1 1/1] tests/power_bidirection_channel: python3 support and script
2020-03-23 2:10 ` [dts] [PATCH V1 1/1] tests/power_bidirection_channel: python3 support and script yufengmx
@ 2020-03-24 6:51 ` Tu, Lijuan
0 siblings, 0 replies; 5+ messages in thread
From: Tu, Lijuan @ 2020-03-24 6:51 UTC (permalink / raw)
To: Mo, YufengX, dts, Yao, Lei A; +Cc: Mo, YufengX
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yufengmx
> Sent: Monday, March 23, 2020 10:11 AM
> To: dts@dpdk.org; Yao, Lei A <lei.a.yao@intel.com>
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts] [PATCH V1 1/1] tests/power_bidirection_channel: python3
> support and script
>
> optimize
>
> #. python3 support.
> #. display dpdk version.
> #. use ^C to take the place of killall.
>
> Signed-off-by: yufengmx <yufengx.mo@intel.com>
> ---
> tests/TestSuite_power_bidirection_channel.py | 21 ++++++++------------
> 1 file changed, 8 insertions(+), 13 deletions(-)
>
> diff --git a/tests/TestSuite_power_bidirection_channel.py
> b/tests/TestSuite_power_bidirection_channel.py
> index ed82fda..8159e11 100644
> --- a/tests/TestSuite_power_bidirection_channel.py
> +++ b/tests/TestSuite_power_bidirection_channel.py
> @@ -31,7 +31,7 @@
>
> """
> DPDK Test suite.
> -virtual power manager test suite.
> +power bidirection channel test suite.
> """
> import os
> import time
> @@ -44,8 +44,6 @@ from test_case import TestCase
>
>
> class TestPowerBidirectionChannel(TestCase):
> - # temporary file directory
> - output_path = '/tmp'
>
> @property
> def target_dir(self):
> @@ -95,7 +93,7 @@ class TestPowerBidirectionChannel(TestCase):
> console, msg_pipe = self.get_console(name)
> if len(cmds) == 0:
> return
> - if isinstance(cmds, (str, unicode)):
> + if isinstance(cmds, str):
> cmds = [cmds, '# ', 5]
> if not isinstance(cmds[0], list):
> cmds = [cmds]
> @@ -103,10 +101,8 @@ class TestPowerBidirectionChannel(TestCase):
> for item in cmds:
> expected_items = item[1]
> if expected_items and isinstance(expected_items, (list, tuple)):
> - check_output = True
> expected_str = expected_items[0] or '# '
> else:
> - check_output = False
> expected_str = expected_items or '# '
>
> try:
> @@ -195,14 +191,14 @@ class TestPowerBidirectionChannel(TestCase):
>
> # get high priority core and normal core
> base_freqs_info = {}
> - for core_index, value in cpu_info.iteritems():
> + for core_index, value in cpu_info.items():
> base_frequency = value.get('base_frequency')
> base_freqs_info.setdefault(base_frequency, []).append(core_index)
> - base_freqs = base_freqs_info.keys()
> + base_freqs = list(base_freqs_info.keys())
> # cpu should have high priority core and normal core
> # high priority core frequency is higher than normal core frequency
> if len(base_freqs) <= 1 or \
> - not all([len(value) for value in base_freqs_info.values()]):
> + not all([len(value) for value in list(base_freqs_info.values())]):
> msg = 'current cpu has no high priority core'
> raise Exception(msg)
>
> @@ -273,15 +269,14 @@ class TestPowerBidirectionChannel(TestCase):
> self.vm_power_mgr = self.prepare_binary('vm_power_manager')
>
> def start_vm_power_mgr(self):
> - eal_option = (
> - ' '
> + option = (
> + ' -v '
> '-c {core_mask} '
> '-n {mem_channel} '
> '--no-pci ').format(**{
> 'core_mask': self.get_cores_mask("1S/3C/1T"),
> 'mem_channel': self.dut.get_memory_channels(), })
> prompt = 'vmpower>'
> - option = eal_option
> cmd = [' '.join([self.vm_power_mgr, option]), prompt, 30]
> self.d_con(cmd)
> self.is_mgr_on = True
> @@ -321,7 +316,7 @@ class TestPowerBidirectionChannel(TestCase):
> def start_guest_mgr(self):
> prompt = r"vmpower\(guest\)>"
> option = (
> - ' '
> + ' -v '
> '-c {core_mask} '
> '-n {memory_channel} '
> '-m {memory_size} '
> --
> 2.21.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1 0/1] power_bidirection_channel: python3 support and script optimize
2020-03-23 2:19 ` [dts] [PATCH V1 0/1] power_bidirection_channel: python3 support and script optimize Mo, YufengX
@ 2020-03-25 1:46 ` Yao, Lei A
0 siblings, 0 replies; 5+ messages in thread
From: Yao, Lei A @ 2020-03-25 1:46 UTC (permalink / raw)
To: Mo, YufengX, dts
> -----Original Message-----
> From: Mo, YufengX <yufengx.mo@intel.com>
> Sent: Monday, March 23, 2020 10:20 AM
> To: dts@dpdk.org; Yao, Lei A <lei.a.yao@intel.com>
> Subject: RE: [dts][PATCH V1 0/1] power_bidirection_channel: python3
> support and script optimize
>
> Tested by: Mo, YufengX <yufengx.mo@intel.com>
Acked-by: Lei Yao <lei.a.yao@intel.com>
>
>
> > -----Original Message-----
> > From: Mo, YufengX
> > Sent: Monday, March 23, 2020 10:11 AM
> > To: dts@dpdk.org; Yao, Lei A <lei.a.yao@intel.com>
> > Cc: Mo, YufengX <yufengx.mo@intel.com>
> > Subject: [dts][PATCH V1 0/1] power_bidirection_channel: python3 support
> and script optimize
> >
> >
> > . python3 support.
> >
> > . display dpdk version.
> >
> > . use ^C to take the place of killall.
> >
> > yufengmx (1):
> > tests/power_bidirection_channel: python3 support and script optimize
> >
> > tests/TestSuite_power_bidirection_channel.py | 21 ++++++++------------
> > 1 file changed, 8 insertions(+), 13 deletions(-)
> >
> > --
> > 2.21.0
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-03-25 1:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-23 2:10 [dts] [PATCH V1 0/1] power_bidirection_channel: python3 support and script optimize yufengmx
2020-03-23 2:10 ` [dts] [PATCH V1 1/1] tests/power_bidirection_channel: python3 support and script yufengmx
2020-03-24 6:51 ` Tu, Lijuan
2020-03-23 2:19 ` [dts] [PATCH V1 0/1] power_bidirection_channel: python3 support and script optimize Mo, YufengX
2020-03-25 1:46 ` Yao, Lei A
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).