Received: from eggs.gnu.org ([2001:4830:134:3::10]:46028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIA5q-00022B-Fj for qemu-devel@nongnu.org; Wed, 29 Jun 2016 03:39:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIA5n-00015V-4s for qemu-devel@nongnu.org; Wed, 29 Jun 2016 03:39:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55711) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIA5m-00015R-Sq for qemu-devel@nongnu.org; Wed, 29 Jun 2016 03:39:27 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (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 53189C05B1EF for ; Wed, 29 Jun 2016 07:39:26 +0000 (UTC) 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> From: =?UTF-8?B?THVrw6HFoSBEb2t0b3I=?= Message-ID: <860650cd-5a85-7af2-663e-f2f0071d517b@redhat.com> Date: Wed, 29 Jun 2016 09:39:22 +0200 MIME-Version: 1.0 In-Reply-To: <20160628155623.GH10557@ndevos-x240.usersys.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MPAProsOLTVPHg126UVdfm20PJ8SbQut1" 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: Niels de Vos Cc: Kevin Wolf , areis@redhat.com, qemu-devel@nongnu.org, Xu Tian , Hao Liu This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MPAProsOLTVPHg126UVdfm20PJ8SbQut1 From: =?UTF-8?B?THVrw6HFoSBEb2t0b3I=?= To: Niels de Vos Cc: Kevin Wolf , areis@redhat.com, qemu-devel@nongnu.org, Xu Tian , Hao Liu Message-ID: <860650cd-5a85-7af2-663e-f2f0071d517b@redhat.com> Subject: Re: [Qemu-devel] Automated testing of block/gluster.c with upstream Gluster 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> In-Reply-To: <20160628155623.GH10557@ndevos-x240.usersys.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable 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, >>>> >>>> it seems we broke the block/gluster.c functionality with a recent pa= tch >>>> in upstream Gluster. In order to prevent this from happening in the >>>> future, I would like to setup a Jenkins job that installs a plan Cen= tOS >>>> with its version of QEMU, and nightly builds of upstream Gluster. >>>> Getting a notification about breakage the day after a patch got merg= ed >>>> seems like a reasonable approach. >>>> >>>> The test should at least boot the generic CentOS cloud image (slight= ly >>>> modified with libguestfs) and return a success/fail. I am wondering = if >>>> there are automated tests like this already, and if I could (re)use = some >>>> of the scripts for it. At the moment, I am thinking to so it like th= is: >>>> - 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" messa= ge >>>> - return success/fail >>> >>> 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 tes= t >>> case for it, but I'm adding a CC to Luk=C3=A1=C5=A1 who probably can = (and I think >>> it shouldn't be hard anyway). >>> >>> Kevin >>> >> >> Hello guys, >> >> yes, Avocado is designed to do this and I believe it even contain quit= e 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). >> >> Regarding the building the CI I use the combination of Jenkins, Jenkin= s job >> builder and Avocado (avocado-vt) to check power/arm >> weekly/per-package-update. Jenkins even supports github and other trig= gers >> if you decide you have enough resources to check each PR/commit. It al= l >> depends on what HW you have available. > > 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 > > 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 ver= y > minimal example would be much appreciated. > > When I'm able to run avocado-vt, it should be trivial to put that in a > Jenkins job :) > > Many thanks, > Niels > Hello Niels, yep, it should be quite simple, but I don't want to break my setup just=20 to try it out. Hopefully you'll manage to do it yourself. Anyway few=20 pointers... Install avocado: =20 http://avocado-vt.readthedocs.io/en/latest/GetStartedGuide.html#installin= g-avocado it should be straight forward so I expect you're able to run `avocado=20 boot` already. There are several backends so can run the same tests on=20 top of them. Let's assume you're using `qemu`, which is the default. The = difference is the backend configuration location and some details=20 regarding importing images and so on. Qemu is the simplest for me as it=20 does not require anything. Now regarding the GlusterFS. By default avocado uses `only=20 (image_backend=3Dfilesystem)` hardcoded in=20 `/usr/share/avocado_vt/backends/qemu/cfg/tests.cfg`. This is because=20 wast majority of people don't want to change it and if they do they=20 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=20 (image_backend=3Dgluster)`. Then you might take a look into=20 `/usr/share/avocado_vt/shared/cfg/guest-hw.cfg` where you can find the=20 `variants image_backend:` and several profiles there including=20 `gluster`. You can specify the `gluster_brick` and other options. When you modify everything to your needs you should re-run `avocado=20 vt-bootstrap` to update the configs and you should be ready to run. Any=20 test should then use the `gluster` image instead of file-based image. As for the kvm-unit-test, the documentation is seriously outdated and=20 new version is in progress. You can use the pure avocado for running=20 kvm-unit-test, see=20 https://github.com/avocado-framework/avocado/pull/1280 for details. I'll = update the avocado-vt documentation when the script is merged. In the end I'd recommend using the `--xunit` to produce junit results=20 and you can import them in jenkins including per-subtest-statuses. Let=20 me send you my setup in PM for inspiration... Regards, Luk=C3=A1=C5=A1 --MPAProsOLTVPHg126UVdfm20PJ8SbQut1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXc3sqAAoJECazYuR/zyLBOOYH/1yRoWtf/q8fkAiudl0+AsVZ sHfFluOee00h43Csz4iks4oo4+oqtJyCUXneo10CBohOphDzD15JP9n+K0/CAnQV SoXqW4U+WQOkcgsaEq8FiH9G1LgstKU3aeyjM3WFHMbDaBbmVaEB1NUP+TeZ0m/O RESX5UEXIJyACsFSt8m4X9HDgXnweoVSZzbrDW0CNcg3+WqCE/rwyTWA2bWcjuq3 q5SPzbaWSzA4O0IG9v3jXa4MtJu8toVrxywFjbxf4L2Im/25faCr+9rkVpKB2gGg XYwhwZKgq+pucAh5OwmC+tkDjU7I5M3Wuz01EgHWlMrINRV5r8pO0mRj5OmIM/s= =PcA6 -----END PGP SIGNATURE----- --MPAProsOLTVPHg126UVdfm20PJ8SbQut1--