qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: Ed Swierk <eswierk@skyportsystems.com>,
	Fam Zheng <famz@redhat.com>, Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>, John Snow <jsnow@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] New iotest repros failures on virtio external snapshot with iothread
Date: Thu, 6 Apr 2017 10:10:10 +0100	[thread overview]
Message-ID: <20170406091010.GA21261@stefanha-x1.localdomain> (raw)
In-Reply-To: <87zifw9s6f.fsf@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 2890 bytes --]

On Tue, Apr 04, 2017 at 03:13:44PM +0100, Alex Bennée wrote:
> 
> Stefan Hajnoczi <stefanha@gmail.com> writes:
> 
> > On Wed, Mar 29, 2017 at 07:01:38PM -0700, Ed Swierk wrote:
> >> Parts of qemu's block code have changed a lot in recent months but are
> >> not well exercised by current tests.
> <snip>
> >
> > 4. How to automate tests with real Linux guests?  This is a complex
> > topic and probably what we should discuss in this email thread.
> >
> > The buildroot + busybox approach is good for a small set of sanity
> > tests.  There was a similar attempt here:
> > https://github.com/stsquad/qemu-jeos
> >
> > Building from source becomes a challenge when other people want to add
> > software to test other areas of QEMU.  The process also requires
> > attention to maintain the image over time (e.g. as host build
> > environments change).
> >
> > There are image builder tools like virt-builder and mkosi for building
> > bootable virtual machine images based on standard Linux distros:
> > http://libguestfs.org/virt-builder.1.html
> > https://github.com/systemd/mkosi
> >
> > This eliminates the build-from-source hassles and gives us a full Linux
> > guest environment.  Booting is very fast with mkosi so the advantage to
> > custom building a minimal image is negligible.
> 
> Does it entirely? If your building a ARM guest on x86 how do you ensure
> the cross-compilers are correct for the kernel and userspace?

virt-builder and mkosi install binary distros like Debian or Fedora.
They do not compile from source.

virt-builder supports cross-arch image building so it's a good starting
point for QEMU guest images.

> > My suggestion is:
> >
> > Let's pick an image builder tool like virt-builder and keep a single
> > build script per guest architecture (e.g.  build-test-os-x86_64.sh).
> > All tests for that architecture run against the same disk image.
> >
> > It's easy to add additional software to the disk image by modifying the
> > build script.
> >
> > A Makefile ensures that the image file gets rebuilt if the build script
> > has changed.
> 
> I have experimented building LTP for foreign guests inside docker
> images. I expect the docker build image could be extended to build full
> kernel and file-systems in a known environment, possibly using
> virt-builder to do it.

My concern with building from source is that extending and maintaining
the infrastructure does not scale.  These efforts fizzle out like
qemu-jeos because no one really has time to maintain them.  Few people
want to extend them because they are complex and brittle.

Image builder tools skip the complexity of build-from-source.  You start
with something like a Dockerfile or virt-builder command-line.  It's
much easier for people to contribute and there is much less that can go
wrong at image build time.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

      reply	other threads:[~2017-04-06  9:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30  2:01 [Qemu-devel] New iotest repros failures on virtio external snapshot with iothread Ed Swierk
2017-03-30  2:16 ` Eric Blake
2017-03-30 23:43   ` Laszlo Ersek
2017-04-07 13:58   ` Max Reitz
2017-03-30 23:06 ` John Snow
2017-03-30 23:26   ` Ed Swierk
2017-04-03 16:57 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-04-04 14:13   ` Alex Bennée
2017-04-06  9:10     ` Stefan Hajnoczi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170406091010.GA21261@stefanha-x1.localdomain \
    --to=stefanha@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=eswierk@skyportsystems.com \
    --cc=famz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).