Message ID | 85f1057877cb0af31e96654b04235da7911dc997.1249475102.git.mgoldish@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Aug 5, 2009 at 9:32 AM, Michael Goldish<mgoldish@redhat.com> wrote: > Currently the shell session is sometimes not closed because the error.TestFail > exception is raised before the session has a chance to close. Ok, bugfix applied! http://autotest.kernel.org/changeset/3515 > Signed-off-by: Michael Goldish <mgoldish@redhat.com> > --- > Â 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 > > _______________________________________________ > Autotest mailing list > Autotest@test.kernel.org > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest >
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()
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 <mgoldish@redhat.com> --- client/tests/kvm/kvm_tests.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)