From: Feng Yang Subject: Re: [Autotest] [PATCH] KVM Test: Fix bug that check_image.py will check removed image. Date: Wed, 14 Apr 2010 21:54:38 -0400 (EDT) Message-ID: <92530477.313451271296478080.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: autotest@test.kernel.org, kvm@vger.kernel.org To: Lucas Meneghel Rodrigues Return-path: Received: from mx4-phx2.redhat.com ([209.132.183.25]:44355 "EHLO mx02.colomx.prod.int.phx2.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755844Ab0DOByj convert rfc822-to-8bit (ORCPT ); Wed, 14 Apr 2010 21:54:39 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: ----- "Lucas Meneghel Rodrigues" wrote: > From: "Lucas Meneghel Rodrigues" > To: "Feng Yang" > Cc: autotest@test.kernel.org, kvm@vger.kernel.org > Sent: Thursday, April 15, 2010 8:05:41 AM GMT +08:00 Beijing / Chongq= ing / 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. =C2=A0But 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. >=20 > Thanks Feng, applied! >=20 > > BTW, could we first run post command then remove the image? >=20 > I don't see any problem with that. Could you please prepare a patch t= o > do it? Ok, will work on it. Thanks >=20 > Thank you >=20 > > Signed-off-by: Feng Yang > > --- > > =C2=A0client/tests/kvm/scripts/check_image.py | =C2=A0 =C2=A03 +++ > > =C2=A01 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): > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Check all the image in list. > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 errmsg =3D [] > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 for image_path in self.image_path_list: > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if not os.path.exists(im= age_path): > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0print "Ima= ge %s does not exist!" % image_path > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0continue > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 s, o =3D self.exec_img_cm= d('info', image_path) > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if not s: > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 errmsg.appe= nd(o) > > -- > > 1.5.5.6 > > > > _______________________________________________ > > Autotest mailing list > > Autotest@test.kernel.org > > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest > > >=20 >=20 >=20 > --=20 > Lucas