From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmcbr-0000ph-Qk for qemu-devel@nongnu.org; Wed, 21 Sep 2016 04:10:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmcbm-000651-UX for qemu-devel@nongnu.org; Wed, 21 Sep 2016 04:10:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmcbm-00064g-L5 for qemu-devel@nongnu.org; Wed, 21 Sep 2016 04:10:22 -0400 Date: Wed, 21 Sep 2016 16:10:18 +0800 From: Fam Zheng Message-ID: <20160921081018.GA10804@lemon> References: <20160920135616.2215-1-alex.bennee@linaro.org> <20160921040901.GC20653@lemon> <87lgylbsj1.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <87lgylbsj1.fsf@linaro.org> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC] test/docker/Makefile.include: add a generic docker-run target List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex =?iso-8859-1?Q?Benn=E9e?= Cc: qemu-devel@nongnu.org On Wed, 09/21 08:50, Alex Benn=E9e wrote: >=20 > Fam Zheng writes: >=20 > > On Tue, 09/20 14:56, Alex Benn=E9e wrote: > >> This re-factors the docker makefile to include a docker-run target w= hich > >> can be controlled entirely from environment variables specified on t= he > >> make command line. This allows us to run against any given docker im= age > >> we may have in our repository, for example: > >> > >> make docker-run TEST=3D"test-quick" IMAGE=3D"debian:arm64" \ > >> EXECUTABLE=3D./aarch64-linux-user/qemu-aarch64 > >> > >> The existing docker-foo@bar targets still work but the inline > >> verification has been shunted into other target prerequisites before= a > >> sub-make is invoked for the docker-run target. > > > > Hi Alex, > > > > I understand sometimes one can have specialized images, but still: is= it > > possible to convert them to Dockerfile and include in the tree? > > > > Or, is this for testing/debugging purpose? >=20 > A bit of both. In this particular use case I'm using a debootstrap imag= e > while updating the binfmt_misc executable. Currently there is a 1->N > relationship for debootstrap as we can bootstrap multiple architectures > in different images. By splitting the docker-run from the expansions we > give ourselves a little more flexibility for running stuff. >=20 > But I think it's also useful for testing/debugging. I wrote this up as = I > was trying to debug a Travis build failure with gcc-6 so I was > generating lots of test images and wanting to build against those. I > would also like to add a travis Dockerfile at some point but at the > moment what exactly goes into one of those is a little opaque to me. Thanks for clarifying, and I agree this feature is really nice in general= . >=20 > > > >> > >> Signed-off-by: Alex Benn=E9e > >> > >> --- > >> NB: I dropped the awk magic that verifies the image exists before > >> running. I couldn't get the thing to work in my shell so wasn't quit= e > >> sure what it was doing. > > > > It was to allow "make docker-test" to skip debian-bootstrap image if = it is not > > there (e.g. when qemu-user not available). >=20 > Ahh ok. I got a little confused as the docker images command can filter > things based on tag so maybe we can come up with a cleaner test? For once it used a format option of "docker images" that isn't available = on RHEL 7, per requested I changed it to the unobvious awk test. >=20 > > > > I'm not much too concerned about that though, since most of the time = we will > > use docker-FOO@BAR, for specific combinations, instead of docker-test= for a > > blanket coverage. >=20 > What does patchew use? The general strategy of patchew is good coverage of both tests and images= , without multiplexing them which could make testing one patch infinitely l= ong on a simple minded tester. For now, we have: docker-test-quick@centos6 docker-test-mingw@fedora And staging (pending because of some mysterious false positives): docker-test-quick@min-glib I also plan to extend to centos7 and ubuntu in the middle term, and give = cross compiling for OSX a try in the long run (googling says it's technically possible). I haven't prioritied debootstrap for now, because arm is not too differen= t than x86 in terms of endianness and stuff, and qemu-user is probably much slow= er than native compilers. But still, BE images will be a compelling reason, if there comes one. Fam