All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: "Gémes Géza" <geza.gemes@gmail.com>
Cc: xen-devel@lists.xenproject.org,
	Stefano Stabellini <sstabellini@kernel.org>,
	george.dunlap@citrix.com
Subject: Re: [PATCH 05/10] Introduce cirros-pvgrub2-pv test
Date: Mon, 27 Mar 2017 11:42:25 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1703271142060.8001@sstabellini-ThinkPad-X260> (raw)
In-Reply-To: <ac23fd6a-fdf9-3e6a-075a-01f42667c834@gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 3667 bytes --]

On Mon, 27 Mar 2017, Gémes Géza wrote:
> 2017-03-27 19:24 keltezéssel, Stefano Stabellini írta:
> > On Mon, 27 Mar 2017, Stefano Stabellini wrote:
> > > On Sat, 25 Mar 2017, Géza Gémes wrote:
> > > > This test verifies booting the cirros image using pvgrub2
> > > > 
> > > > Signed-off-by: Géza Gémes <geza.gemes@gmail.com>
> > > Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> > > 
> > > 
> > > > ---
> > > >   tests/cirros-pvgrub2-pv | 33 +++++++++++++++++++++++++++++++++
> > > >   tests/series            |  1 +
> > > >   2 files changed, 34 insertions(+)
> > > >   create mode 100644 tests/cirros-pvgrub2-pv
> > > > 
> > > > diff --git a/tests/cirros-pvgrub2-pv b/tests/cirros-pvgrub2-pv
> > > > new file mode 100644
> > > > index 0000000..4994ea9
> > > > --- /dev/null
> > > > +++ b/tests/cirros-pvgrub2-pv
> > > > @@ -0,0 +1,33 @@
> > > > +#!/usr/bin/env bash
> > > > +
> > > > +set -e
> > > > +
> > > > +function cirros-pvgrub2-pv-cleanup() {
> > > > +    tear_down_cirros_test $testdir
> > > > +}
> > > > +
> > > > +function cirros-pvgrub2-pv-test() {
> > > > +    download_cirros_components
> > > > +    testdir=`mktemp -d`
> > > > +    cp $CIRROS_DOWNLOADS/$CIRROS_DISK_FILE $testdir
> > > > +    # Need to install grub.cfg
> > > > +    local cirros_disk_loop=`$SUDO $BASEDIR/scripts/lopartsetup
> > > > $testdir/$CIRROS_DISK_FILE | head -1 | cut -d ":" -f 1`
> > > > +    local cirros_disk_mntpt=`mktemp -d`
> > > > +    $SUDO mount $cirros_disk_loop $cirros_disk_mntpt
> > > > +    cirros_grub_cfg $cirros_disk_mntpt
> > > > +    $SUDO umount $cirros_disk_mntpt
> > > > +    $SUDO rmdir $cirros_disk_mntpt
> > > > +    $SUDO losetup -d $cirros_disk_loop
> > Actually, one more comment before I commit the series: would it be
> > possible to call cirros_grub_cfg from download_cirros_components as we
> > do for cirros_network_init?
> > 
> > If we did that, would the other tests that rely on the grub config file
> > (for example cirros-qemu-hvm) continue to work properly? I think they
> > must work properly, otherwise even today with the series as is, they
> > would fail if they get executed after cirros-pvgrub2-pv, which calls
> > cirros_grub_cfg.
> > 
> As each test runs in its own private testdir, they all run with their almost
> (except the static ip address) verbatim copy of vanilla cirros.
> However pvgrub requires a grub2 config file, which is missing from cirros,
> having only a menu.lst.
> Modifying the downloaded image to have a grub.cfg by default has no effect on
> the majority of the tests, with the exception of the pygrub test, which cannot
> interpret the grub.cfg needed by pvgrub. Because of this incompatibility I've
> chosen to add grub.cfg only in the case of the pvgrub test, which needs it and
> run the other tests with a cirros image as close to the original as possible.

OK, I think you made the right choice. I'll commit shortly.


> > > > +    cat >$testdir/cirros-pvgrub2-pv.cfg <<EOF
> > > > +name = "raisin-test"
> > > > +memory = 128
> > > > +vcpus = 2
> > > > +kernel = "$PVGRUB"
> > > > +disk = [ '${testdir}/${CIRROS_DISK_FILE},raw,xvda,rw' ]
> > > > +extra = "$CIRROS_GRUB_CFG"
> > > > +vif = [ 'bridge=xenbr1' ]
> > > > +EOF
> > > > +
> > > > +    $SUDO xl create $testdir/cirros-pvgrub2-pv.cfg
> > > > +    check_guest_alive
> > > > +}
> > > > diff --git a/tests/series b/tests/series
> > > > index 372fafb..1fec245 100644
> > > > --- a/tests/series
> > > > +++ b/tests/series
> > > > @@ -3,3 +3,4 @@ busybox-hvm
> > > >   busybox-hvm-migrate
> > > >   cirros-separate-kernel-pv
> > > >   cirros-pygrub-pv
> > > > +cirros-pvgrub2-pv
> > > > -- 
> > > > 2.7.4
> 
> Cheers,
> 
> Geza
> 

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-03-27 18:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-25 19:28 [raisin][PATCH 00/10] pygrub fix + cirros tests Géza Gémes
2017-03-25 19:28 ` [PATCH 01/10] Fix installation of python libs Géza Gémes
2017-03-27 17:08   ` Stefano Stabellini
2017-03-25 19:28 ` [PATCH 02/10] Introduce cirros tests Géza Gémes
2017-03-27 17:11   ` Stefano Stabellini
2017-03-25 19:28 ` [PATCH 03/10] Introduce cirros-separate-kernel-pv test Géza Gémes
2017-03-27 17:12   ` Stefano Stabellini
2017-03-25 19:28 ` [PATCH 04/10] Introduce cirros-pygrub-pv test Géza Gémes
2017-03-27 17:13   ` Stefano Stabellini
2017-03-25 19:28 ` [PATCH 05/10] Introduce cirros-pvgrub2-pv test Géza Gémes
2017-03-27 17:13   ` Stefano Stabellini
2017-03-27 17:24     ` Stefano Stabellini
2017-03-27 18:38       ` Gémes Géza
2017-03-27 18:42         ` Stefano Stabellini [this message]
2017-03-25 19:28 ` [PATCH 06/10] Introduce cirros-qemu-hvm test Géza Gémes
2017-03-27 17:16   ` Stefano Stabellini
2017-03-25 19:28 ` [PATCH 07/10] Introduce cirros-minios-stubdom-hvm test Géza Gémes
2017-03-27 17:16   ` Stefano Stabellini
2017-03-25 19:29 ` [PATCH 08/10] Introduce cirros-qemu-pvhvm test Géza Gémes
2017-03-27 17:17   ` Stefano Stabellini
2017-03-25 19:29 ` [PATCH 09/10] Introduce cirros-minios-stubdom-pvhvm test Géza Gémes
2017-03-27 17:17   ` Stefano Stabellini
2017-03-25 19:29 ` [PATCH 10/10] Enable cirros tests in the default config Géza Gémes
  -- strict thread matches above, loose matches on Subject: below --
2017-03-18 14:00 [raisin][PATCH 00/10] Introduce usage of cirros images Géza Gémes
2017-03-18 14:00 ` [PATCH 05/10] Introduce cirros-pvgrub2-pv test Géza Gémes

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=alpine.DEB.2.10.1703271142060.8001@sstabellini-ThinkPad-X260 \
    --to=sstabellini@kernel.org \
    --cc=george.dunlap@citrix.com \
    --cc=geza.gemes@gmail.com \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.