* [PATCH] kvm-autotest: log test failed execption string
@ 2009-03-25 16:43 Ryan Harper
2009-03-29 17:15 ` Uri Lublin
0 siblings, 1 reply; 2+ messages in thread
From: Ryan Harper @ 2009-03-25 16:43 UTC (permalink / raw)
To: kvm
When a test case fails and throws an execption, we don't log the
exception details, only that it occured.
reboot: DEBUG: remote_login: Got password prompt; sending '123456'
reboot: DEBUG: remote_login: Got shell prompt -- logged in
reboot: Logged in
reboot: DEBUG: run_once: Test failed; postprocessing on error...
reboot: DEBUG: postprocess_vm: Postprocessing VM 'vm1'...
The attached patch includes the exception text from the failure which makes it
easier to debug.
reboot: DEBUG: remote_login: Got password prompt; sending '123456'
reboot: DEBUG: remote_login: Got shell prompt -- logged in
reboot: Logged in
reboot: DEBUG: run_once: Test failed (invalid syntax (kvm_tests.py, line 34)); postprocessing on error...
reboot: DEBUG: postprocess_vm: Postprocessing VM 'vm1'...
--
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh@us.ibm.com
diffstat output:
kvm_runtest_2.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
---
diff --git a/client/tests/kvm_runtest_2/kvm_runtest_2.py b/client/tests/kvm_runtest_2/kvm_runtest_2.py
index 9add48a..cf6b699 100644
--- a/client/tests/kvm_runtest_2/kvm_runtest_2.py
+++ b/client/tests/kvm_runtest_2/kvm_runtest_2.py
@@ -91,8 +91,8 @@ class kvm_runtest_2(test.test):
routine_obj.routine(self, params, env)
env.sync()
- except:
- kvm_log.debug("Test failed; postprocessing on error...")
+ except Exception, e:
+ kvm_log.debug("Test failed (%s); postprocessing on error..." %(str(e)))
kvm_preprocessing.postprocess_on_error(self, params, env)
env.sync()
raise
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kvm-autotest: log test failed execption string
2009-03-25 16:43 [PATCH] kvm-autotest: log test failed execption string Ryan Harper
@ 2009-03-29 17:15 ` Uri Lublin
0 siblings, 0 replies; 2+ messages in thread
From: Uri Lublin @ 2009-03-29 17:15 UTC (permalink / raw)
To: Ryan Harper; +Cc: kvm
Ryan Harper wrote:
> When a test case fails and throws an execption, we don't log the
> exception details, only that it occured.
>
> reboot: DEBUG: remote_login: Got password prompt; sending '123456'
> reboot: DEBUG: remote_login: Got shell prompt -- logged in
> reboot: Logged in
> reboot: DEBUG: run_once: Test failed; postprocessing on error...
> reboot: DEBUG: postprocess_vm: Postprocessing VM 'vm1'...
>
> The attached patch includes the exception text from the failure which makes it
> easier to debug.
>
> reboot: DEBUG: remote_login: Got password prompt; sending '123456'
> reboot: DEBUG: remote_login: Got shell prompt -- logged in
> reboot: Logged in
> reboot: DEBUG: run_once: Test failed (invalid syntax (kvm_tests.py, line 34)); postprocessing on error...
> reboot: DEBUG: postprocess_vm: Postprocessing VM 'vm1'...
>
>
Applied, Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-29 17:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-25 16:43 [PATCH] kvm-autotest: log test failed execption string Ryan Harper
2009-03-29 17:15 ` Uri Lublin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).