[libvirt] [libvirt-test-API] [PATCH] fix two error in script pin_iothread.py and connection_getAllDomainStats.py

Shanzhi Yu shyu at redhat.com
Mon Sep 28 09:45:29 UTC 2015


Signed-off-by: Shanzhi Yu <shyu at redhat.com>
---
 repos/domain/pin_iothread.py                  | 2 +-
 repos/virconn/connection_getAllDomainStats.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/repos/domain/pin_iothread.py b/repos/domain/pin_iothread.py
index 28ee2c4..d2d812f 100644
--- a/repos/domain/pin_iothread.py
+++ b/repos/domain/pin_iothread.py
@@ -116,7 +116,7 @@ def pin_iothread(params):
 
             if not find_iothreadid_fromxml(vm, 1, 1):
                 logger.info("add iothread %d to running guest" % 1)
-                vm.addIOThread(i, libvirt.VIR_DOMAIN_AFFECT_LIVE)
+                vm.addIOThread(1, libvirt.VIR_DOMAIN_AFFECT_LIVE)
 
             vm.pinIOThread(1, tu_cpu, libvirt.VIR_DOMAIN_AFFECT_LIVE)
             cpuset = find_iothreadpin_fromxml(vm, 1, 1)
diff --git a/repos/virconn/connection_getAllDomainStats.py b/repos/virconn/connection_getAllDomainStats.py
index d95004f..3362444 100644
--- a/repos/virconn/connection_getAllDomainStats.py
+++ b/repos/virconn/connection_getAllDomainStats.py
@@ -164,7 +164,7 @@ def check_each_vcpu(logger,dom_name,dom_active,dom_eles):
         if not vcpu_cur:
             for i in range(0,vcpu_max):
                 vcpu_pre = "vcpu."+ str(i) + "."
-                logger.debug("Checking %sstate: %d" \
+                logger.debug("Checking %sstate: %s" \
                         %(vcpu_pre, dom_eles.get(vcpu_pre + "state")))
                 if not compare_value(logger,vcpu_stat, \
                         dom_eles.get(vcpu_pre + "state")):
@@ -172,7 +172,7 @@ def check_each_vcpu(logger,dom_name,dom_active,dom_eles):
         elif int(vcpu_cur.nodeValue) <= vcpu_max:
             for i in range(0,int(vcpu_cur.nodeValue)):
                 vcpu_pre = "vcpu."+ str(i) + "."
-                logger.debug("Checking %sstate: %d" \
+                logger.debug("Checking %sstate: %s" \
                         %(vcpu_pre, dom_eles.get(vcpu_pre + "state")))
                 if not compare_value(logger,vcpu_stat, \
                         dom_eles.get(vcpu_pre + "state")):
-- 
1.8.3.1




More information about the libvir-list mailing list