[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [test-API][PATCH] Fix a problem in cpu_affinity



int() with base 16 will cause problem when cpu number bigger than
10, so change it as default with base 10.

Signed-off-by: Wayne Sun <gsun redhat com>
---
 repos/domain/cpu_affinity.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/repos/domain/cpu_affinity.py b/repos/domain/cpu_affinity.py
index ee585e6..e710968 100644
--- a/repos/domain/cpu_affinity.py
+++ b/repos/domain/cpu_affinity.py
@@ -151,7 +151,7 @@ def vcpu_affinity_check(domain_name, vcpu, expected_pinned_cpu, hypervisor):
 
             task_list = output.split('\n')[1:]
             vcpu_task = task_list[int(vcpu)]
-            actual_pinned_cpu = int(vcpu_task.split('\t')[1], 16)
+            actual_pinned_cpu = int(vcpu_task.split('\t')[1])
         elif 'el5' in host_kernel_version:
             cmd_get_task_list = "grep Cpus_allowed /proc/%s/task/*/status" % pid
             status, output = commands.getstatusoutput(cmd_get_task_list)
-- 
1.7.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]