From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bICDZ-0007ty-85 for qemu-devel@nongnu.org; Wed, 29 Jun 2016 05:55:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bICDV-0008FJ-0A for qemu-devel@nongnu.org; Wed, 29 Jun 2016 05:55:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bICDU-0008F7-Er for qemu-devel@nongnu.org; Wed, 29 Jun 2016 05:55:32 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4B1BD80F6A for ; Wed, 29 Jun 2016 09:55:31 +0000 (UTC) Date: Wed, 29 Jun 2016 11:55:25 +0200 From: Niels de Vos Message-ID: <20160629095525.GL10557@ndevos-x240.usersys.redhat.com> References: <20160628090209.GD10557@ndevos-x240.usersys.redhat.com> <20160628141044.GH6800@noname.redhat.com> <72a6e933-55fc-f448-a0bc-3861b030b73c@redhat.com> <20160628155623.GH10557@ndevos-x240.usersys.redhat.com> <860650cd-5a85-7af2-663e-f2f0071d517b@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="N8NGGaQn1mzfvaPg" Content-Disposition: inline In-Reply-To: <860650cd-5a85-7af2-663e-f2f0071d517b@redhat.com> Subject: Re: [Qemu-devel] Automated testing of block/gluster.c with upstream Gluster List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?B?THVrw6HFoQ==?= Doktor Cc: Kevin Wolf , areis@redhat.com, qemu-devel@nongnu.org, Xu Tian , Hao Liu --N8NGGaQn1mzfvaPg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 29, 2016 at 09:39:22AM +0200, Luk=C3=A1=C5=A1 Doktor wrote: > Dne 28.6.2016 v 17:56 Niels de Vos napsal(a): > > On Tue, Jun 28, 2016 at 05:20:03PM +0200, Luk=C3=A1=C5=A1 Doktor wrote: > > > Dne 28.6.2016 v 16:10 Kevin Wolf napsal(a): > > > > Am 28.06.2016 um 11:02 hat Niels de Vos geschrieben: > > > > > Hi, > > > > >=20 > > > > > it seems we broke the block/gluster.c functionality with a recent= patch > > > > > in upstream Gluster. In order to prevent this from happening in t= he > > > > > future, I would like to setup a Jenkins job that installs a plan = CentOS > > > > > with its version of QEMU, and nightly builds of upstream Gluster. > > > > > Getting a notification about breakage the day after a patch got m= erged > > > > > seems like a reasonable approach. > > > > >=20 > > > > > The test should at least boot the generic CentOS cloud image (sli= ghtly > > > > > modified with libguestfs) and return a success/fail. I am wonderi= ng if > > > > > there are automated tests like this already, and if I could (re)u= se some > > > > > of the scripts for it. At the moment, I am thinking to so it like= this: > > > > > - download the image [1] > > > > > - set kernel parameters to output on the serial console > > > > > - add a auto-login user/script > > > > > - have the script write "bootup complete" or something > > > > > - have the script poweroff the VM > > > > > - script that started the VM checks for the "bootup complete" me= ssage > > > > > - return success/fail > > > >=20 > > > > Sounds like something that Avocado should be able (or actually is > > > > designed) to do. I can't tell you the details of how to write the t= est > > > > case for it, but I'm adding a CC to Luk=C3=A1=C5=A1 who probably ca= n (and I think > > > > it shouldn't be hard anyway). > > > >=20 > > > > Kevin > > > >=20 > > >=20 > > > Hello guys, > > >=20 > > > yes, Avocado is designed to do this and I believe it even contain qui= te a > > > few Gluster tests. You can look for them in avocado-vt or ping our QA= folks > > > who might give you some pointers (cc Xu nad Hao). > > >=20 > > > Regarding the building the CI I use the combination of Jenkins, Jenki= ns job > > > builder and Avocado (avocado-vt) to check power/arm > > > weekly/per-package-update. Jenkins even supports github and other tri= ggers > > > if you decide you have enough resources to check each PR/commit. It a= ll > > > depends on what HW you have available. > >=20 > > That looks promising! Its a bit more complex (or at least 'new' for me) > > than that I was hoping. There is Gluster support in there, I found a > > description of it here: > > http://avocado-vt.readthedocs.io/en/latest/GlusterFs.html > > http://avocado-vt.readthedocs.io/en/latest/RunQemuUnittests.html > >=20 > > Browsing through the docs does not really explain me how to put a > > configuration file together that runs the QEMU tests with a VM image on > > Gluster though. I probably need to read much more, but a pointer or very > > minimal example would be much appreciated. > >=20 > > When I'm able to run avocado-vt, it should be trivial to put that in a > > Jenkins job :) > >=20 > > Many thanks, > > Niels > >=20 >=20 > Hello Niels, >=20 > yep, it should be quite simple, but I don't want to break my setup just to > try it out. Hopefully you'll manage to do it yourself. Anyway few > pointers... >=20 > Install avocado: >=20 >=20 > http://avocado-vt.readthedocs.io/en/latest/GetStartedGuide.html#installin= g-avocado >=20 > it should be straight forward so I expect you're able to run `avocado boo= t` > already. There are several backends so can run the same tests on top of > them. Let's assume you're using `qemu`, which is the default. The differe= nce > is the backend configuration location and some details regarding importing > images and so on. Qemu is the simplest for me as it does not require > anything. >=20 > Now regarding the GlusterFS. By default avocado uses `only > (image_backend=3Dfilesystem)` hardcoded in > `/usr/share/avocado_vt/backends/qemu/cfg/tests.cfg`. This is because wast > majority of people don't want to change it and if they do they usually use > custom config files. I don't think you'd like to go that way so let's just > patch that file and change it to `only (image_backend=3Dgluster)`. >=20 > Then you might take a look into > `/usr/share/avocado_vt/shared/cfg/guest-hw.cfg` where you can find the > `variants image_backend:` and several profiles there including `gluster`. > You can specify the `gluster_brick` and other options. >=20 > When you modify everything to your needs you should re-run `avocado > vt-bootstrap` to update the configs and you should be ready to run. Any t= est > should then use the `gluster` image instead of file-based image. >=20 >=20 > As for the kvm-unit-test, the documentation is seriously outdated and new > version is in progress. You can use the pure avocado for running > kvm-unit-test, see https://github.com/avocado-framework/avocado/pull/1280 > for details. I'll update the avocado-vt documentation when the script is > merged. >=20 >=20 > In the end I'd recommend using the `--xunit` to produce junit results and > you can import them in jenkins including per-subtest-statuses. Let me send > you my setup in PM for inspiration... Thanks! This really helps me a lot. When I have my Jenkins job and scripts ready, I'll share them here as well. It is not high on my priority list, but I try to get it up and running before the end of next week. Niels --N8NGGaQn1mzfvaPg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXc5sNAAoJECXo5AApwsWzulAP/i7hEuwI68TYEMTpGvCe6NjO ONSORAp/UN0v1uP95VjPyc4dsEYh/+OMe0vuhHs87zZOh0bYFVbE/JmhIoyfVb+3 d0rhoFooOpKNQBGGi/0pKqq8lOSNYNcni67f+R8RYC9tiX4KaesxT1VEoCgUtWHy 6LfoodsNu2wg3qIOHkJW2jEaB6Cxfpd0Hy2f8DkcZZgolrvn9Dc3YE31Pp9UIk1W 7o+d5AmRjm6ibExHGnt1BQdFxFy4h6D9ko1aSyT0uW9479KvJxBnA5hGOVhli+Xm LI2b843QCuL0/FJpcDCFDGV7MXibVzDsUwDXuFXkaOvGMjPg2441vp1za7ycPKaF fOseIbj0mh2qaZEPPRN058Sg+wxCkVTSUGUsogJvuG4z2XRuwGBriJZ7XVFRCWPL v5EqHbCDADPH2Ig3txq67AtrD+K41kxqEmgxct0E7XY05Z51DUH5hj8FCP718CAQ sZOW5+7kj8AI0DS5LQEeGoHse50tavtRng0AYep2by2Vf+SUjfXCLG882D4v5wc6 e24NLxU7RYJiG32NWHGCiE79Ldxi9/xr5YD2FvEk0F+78zTd/ix9k2LlNe4sBBc/ i8rz0zj+Eleb7r+o4ohcyC8VZdbUNPkO0R3JMjbouCD6m/yU+SuwIjfxPIS2du9a AoU5EOkBBZBtRYtx8bo5 =i0Qw -----END PGP SIGNATURE----- --N8NGGaQn1mzfvaPg--