Currently the shell session is sometimes not closed because the error.TestFail
exception is raised before the session has a chance to close.

Signed-off-by: Michael Goldish <[email protected]>
---
 client/tests/kvm/kvm_tests.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/tests/kvm/kvm_tests.py b/client/tests/kvm/kvm_tests.py
index 67cf713..d146929 100644
--- a/client/tests/kvm/kvm_tests.py
+++ b/client/tests/kvm/kvm_tests.py
@@ -757,11 +757,11 @@ def run_timedrift(test, params, env):
     logging.info("Total guest duration including rest: %.2f" % 
guest_delta_total)
     logging.info("Total drift after rest: %.2f%%" % drift_total)
 
+    session.close()
+
     # Fail the test if necessary
     if drift > drift_threshold:
         raise error.TestFail("Time drift too large: %.2f%%" % drift)
     if drift > drift_threshold_after_rest:
         raise error.TestFail("Time drift too large after rest period: %.2f%%"
                              % drift_total)
-
-    session.close()
-- 
1.5.4.1

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

Reply via email to