From: Uri Lublin <uril@redhat.com>
To: "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Cc: Avi Kivity <avi@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>,
Ryan Harper <ryanh@us.ibm.com>
Subject: Re: [PATCH] kvm-autotest: stepeditor: clear image if width, height, or data are invalid
Date: Sun, 05 Apr 2009 20:33:50 +0300 [thread overview]
Message-ID: <49D8EB7E.1020900@redhat.com> (raw)
In-Reply-To: <49D8A487.9060803@redhat.com>
Avi Kivity wrote:
> Eduardo Habkost wrote:
>>
>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
>> ---
>> client/tests/kvm_runtest_2/stepeditor.py | 14 +++++++++-----
>> 1 files changed, 9 insertions(+), 5 deletions(-)
>>
>> diff --git a/client/tests/kvm_runtest_2/stepeditor.py
>> b/client/tests/kvm_runtest_2/stepeditor.py
>> index caaf47b..383834b 100755
>> --- a/client/tests/kvm_runtest_2/stepeditor.py
>> +++ b/client/tests/kvm_runtest_2/stepeditor.py
>> @@ -488,14 +488,18 @@ Utilities
>> vscrollbar = self.scrolledwindow.get_vscrollbar()
>> vscrollbar.set_range(0, h)
>>
>> + def clear_image(self):
>> + self.image.clear()
>> + self.image_width = 0
>> + self.image_height = 0
>> + self.image_data = ""
>> + def set_image_from_file(self, filename):
>> if not filename or not os.path.exists(filename):
>> - self.image.clear()
>> - self.image_width = 0
>> - self.image_height = 0
>> - self.image_data = ""
>> - return
>> + return self.clear_image()
>> (w, h, data) = ppm_utils.image_read_from_ppm_file(filename)
>> + if w <= 0 or h <= 0 or not data:
>> + return self.clear_image()
>> self.set_image(w, h, data)
>>
>
> Instead of returning an empty image here, we should throw an exception.
> Qemu shouldn't write invalid image.
>
> I've just sent a patch to qemu-devel which may help with this.
>
I'm going to accept this patch.
For step-maker and step-editor, I think we should let the user finish
creating/editing the step-file (see Ryan's comment about wasting time).
For guest-installation test (kvm-guest-wizard), I agree that we should fail the
test, and not ignore the error.
Thanks,
Uri.
prev parent reply other threads:[~2009-04-05 17:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-01 15:55 kvm-autotest: weird memory error during stepmaker test Ryan Harper
2009-04-03 20:37 ` Eduardo Habkost
2009-04-03 21:43 ` [PATCH] kvm-autotest: stepeditor: clear image if width, height, or data are invalid Eduardo Habkost
2009-04-05 12:31 ` Avi Kivity
2009-04-05 17:33 ` Eduardo Habkost
2009-04-05 17:33 ` Uri Lublin [this message]
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=49D8EB7E.1020900@redhat.com \
--to=uril@redhat.com \
--cc=avi@redhat.com \
--cc=ehabkost@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=ryanh@us.ibm.com \
/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.