From: Michael Goldish <mgold...@redhat.com>

Print outputs (before and after migration) of migration_test_command only if
they differ. Currently we print them anyway, and the outputs can be very long.

Signed-off-by: Michael Goldish <mgold...@redhat.com>

diff --git a/client/tests/kvm_runtest_2/kvm_tests.py 
b/client/tests/kvm_runtest_2/kvm_tests.py
index 9733dc1..7349524 100644
--- a/client/tests/kvm_runtest_2/kvm_tests.py
+++ b/client/tests/kvm_runtest_2/kvm_tests.py
@@ -80,8 +80,6 @@ def run_migration(test, params, env):
     reference_output = 
session.get_command_output(params.get("migration_test_command"))
     session.close()
 
-    kvm_log.info("Reference output of command '%s':\n%s" % 
(params.get("migration_test_command"), reference_output))
-
     # Define the migration command
     cmd = "migrate -d tcp:localhost:%d" % dest_vm.migration_port
     kvm_log.debug("Migration command: %s" % cmd)
@@ -162,11 +160,13 @@ def run_migration(test, params, env):
     output = session.get_command_output(params.get("migration_test_command"))
     session.close()
 
-    kvm_log.info("Output of command '%s' after migration:\n%s" % 
(params.get("migration_test_command"), output))
-
     # Compare output to reference output
     if output != reference_output:
-        raise error.TestFail, "Command output before and after migration 
differs"
+        kvm_log.info("Command output before migration differs from command 
output after migration")
+        kvm_log.info("Command: %s" % params.get("migration_test_command"))
+        kvm_log.info("Output before: %s" % reference_output)
+        kvm_log.info("Output after: %s" % output)
+        raise error.TestFail, "Command produced different output before and 
after migration"
 
 
 def run_autotest(test, params, env):
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to