From: Ryan Harper <ryanh@us.ibm.com>
To: kvm@vger.kernel.org
Subject: [PATCH] kvm-autotest: log test failed execption string
Date: Wed, 25 Mar 2009 11:43:22 -0500 [thread overview]
Message-ID: <20090325164322.GM27104@us.ibm.com> (raw)
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
next reply other threads:[~2009-03-25 16:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-25 16:43 Ryan Harper [this message]
2009-03-29 17:15 ` [PATCH] kvm-autotest: log test failed execption string Uri Lublin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090325164322.GM27104@us.ibm.com \
--to=ryanh@us.ibm.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.