Re: [Autotest] [PATCH] KVM Test: Fix bug that check_image.py will check removed image.
- "Lucas Meneghel Rodrigues" wrote: > From: "Lucas Meneghel Rodrigues" > To: "Feng Yang" > Cc: autot...@test.kernel.org, kvm@vger.kernel.org > Sent: Thursday, April 15, 2010 8:05:41 AM GMT +08:00 Beijing / Chongqing / > Hong Kong / Urumqi > Subject: Re: [Autotest] [PATCH] KVM Test: Fix bug that check_image.py will > check removed image. > > On Mon, Apr 12, 2010 at 5:32 AM, Feng Yang wrote: > > If set remove_image to yes, the image will be removed before > > check_image.py is executed as post command. But check_img.py > > still try to check the removed image When it is running. > > This patch update check_image.py and let it do not check > > non-exist image. > > Thanks Feng, applied! > > > BTW, could we first run post command then remove the image? > > I don't see any problem with that. Could you please prepare a patch to > do it? Ok, will work on it. Thanks > > Thank you > > > Signed-off-by: Feng Yang > > --- > > client/tests/kvm/scripts/check_image.py | 3 +++ > > 1 files changed, 3 insertions(+), 0 deletions(-) > > > > diff --git a/client/tests/kvm/scripts/check_image.py > b/client/tests/kvm/scripts/check_image.py > > index 4056fb8..de163e7 100755 > > --- a/client/tests/kvm/scripts/check_image.py > > +++ b/client/tests/kvm/scripts/check_image.py > > @@ -77,6 +77,9 @@ class ImageCheck(object): > > # Check all the image in list. > > errmsg = [] > > for image_path in self.image_path_list: > > + if not os.path.exists(image_path): > > + print "Image %s does not exist!" % image_path > > + continue > > s, o = self.exec_img_cmd('info', image_path) > > if not s: > > errmsg.append(o) > > -- > > 1.5.5.6 > > > > ___ > > Autotest mailing list > > autot...@test.kernel.org > > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest > > > > > > -- > Lucas -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Autotest] [PATCH] KVM Test: Fix bug that check_image.py will check removed image.
On Mon, Apr 12, 2010 at 5:32 AM, Feng Yang wrote: > If set remove_image to yes, the image will be removed before > check_image.py is executed as post command. But check_img.py > still try to check the removed image When it is running. > This patch update check_image.py and let it do not check > non-exist image. Thanks Feng, applied! > BTW, could we first run post command then remove the image? I don't see any problem with that. Could you please prepare a patch to do it? Thank you > Signed-off-by: Feng Yang > --- > client/tests/kvm/scripts/check_image.py | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/client/tests/kvm/scripts/check_image.py > b/client/tests/kvm/scripts/check_image.py > index 4056fb8..de163e7 100755 > --- a/client/tests/kvm/scripts/check_image.py > +++ b/client/tests/kvm/scripts/check_image.py > @@ -77,6 +77,9 @@ class ImageCheck(object): > # Check all the image in list. > errmsg = [] > for image_path in self.image_path_list: > + if not os.path.exists(image_path): > + print "Image %s does not exist!" % image_path > + continue > s, o = self.exec_img_cmd('info', image_path) > if not s: > errmsg.append(o) > -- > 1.5.5.6 > > ___ > Autotest mailing list > autot...@test.kernel.org > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest > -- Lucas -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] KVM Test: Fix bug that check_image.py will check removed image.
If set remove_image to yes, the image will be removed before check_image.py is executed as post command. But check_img.py still try to check the removed image When it is running. This patch update check_image.py and let it do not check non-exist image. BTW, could we first run post command then remove the image? Signed-off-by: Feng Yang --- client/tests/kvm/scripts/check_image.py |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/scripts/check_image.py b/client/tests/kvm/scripts/check_image.py index 4056fb8..de163e7 100755 --- a/client/tests/kvm/scripts/check_image.py +++ b/client/tests/kvm/scripts/check_image.py @@ -77,6 +77,9 @@ class ImageCheck(object): # Check all the image in list. errmsg = [] for image_path in self.image_path_list: +if not os.path.exists(image_path): +print "Image %s does not exist!" % image_path +continue s, o = self.exec_img_cmd('info', image_path) if not s: errmsg.append(o) -- 1.5.5.6 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html