[dts] [PATCH V1 1/1] tests/vm_pw_mgmt_policy: resolve centos compatibility

yufengmx yufengx.mo at intel.com
Fri Jul 3 07:43:15 CEST 2020


resolve centos compatibility.

Signed-off-by: yufengmx <yufengx.mo at intel.com>
---
 tests/TestSuite_vm_pw_mgmt_policy.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_vm_pw_mgmt_policy.py b/tests/TestSuite_vm_pw_mgmt_policy.py
index 00c7304..654dc6b 100644
--- a/tests/TestSuite_vm_pw_mgmt_policy.py
+++ b/tests/TestSuite_vm_pw_mgmt_policy.py
@@ -473,7 +473,7 @@ class TestVmPwMgmtPolicy(TestCase):
         date_tool = "date"
         cmd = ';'.join([
             "{0}",
-            "{0} -s \'{1}\'",
+            r"{0} -s \'{1}\'",
             "hwclock -w"]).format(date_tool, timestamp)
         self.d_a_con([cmd, '# ', 20])
         cmd = "{0} '+%H:00'".format(date_tool)
@@ -498,7 +498,7 @@ class TestVmPwMgmtPolicy(TestCase):
         real_time = timestamp.strftime(FMT)
         cmd = ';'.join([
             "{0}",
-            "{0} -s \'{1}\'",
+            r"{0} -s \'{1}\'",
             "hwclock -w",
             "{0}", ]).format(date_tool, real_time)
         self.d_a_con([cmd, '# ', 20])
@@ -537,7 +537,7 @@ class TestVmPwMgmtPolicy(TestCase):
                 if key_value == 'scaling_available_frequencies':
                     cpu_info[cpu_id][key_value] = freqs[index]
                 cpu_info[cpu_id][key_value] = \
-                    [int(item) for item in sorted(freqs[index].split())] \
+                    sorted([int(item) for item in sorted(freqs[index].split())]) \
                     if key_value == 'scaling_available_frequencies' else \
                     freqs[index]
 
-- 
2.21.0



More information about the dts mailing list