[PATCH 13/13] KVM test: Fix a small bug on timedrift test

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

 



On timedrift.py, a prefix is added to indicate the
kvm subprocess instances of the guest load processes.
With the fact the ssh sessions are being logged, that
implies in changing the the kvm subprocess callback
function. When this happens, the wrong parameters
will be passed to the logging system causing an exception
while formatting the message. Let's fix that.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@xxxxxxxxxx>
Signed-off-by: Michael Goldish <mgoldish@xxxxxxxxxx>
---
 client/tests/kvm/tests/timedrift.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/client/tests/kvm/tests/timedrift.py b/client/tests/kvm/tests/timedrift.py
index 028b74c..a6d3076 100644
--- a/client/tests/kvm/tests/timedrift.py
+++ b/client/tests/kvm/tests/timedrift.py
@@ -90,6 +90,11 @@ def run_timedrift(test, params, env):
                 load_session = vm.remote_login()
                 if not load_session:
                     raise error.TestFail("Could not log into guest")
+                # Set output func to None to stop it from being called so we
+                # can change the callback function and the parameters it takes
+                # with no problems
+                load_session.set_output_func(None)
+                load_session.set_output_params(())
                 load_session.set_output_prefix("(guest load %d) " % i)
                 load_session.set_output_func(logging.debug)
                 guest_load_sessions.append(load_session)
-- 
1.7.0.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux