Message ID | 1490470142-9032-7-git-send-email-geza.gemes@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sat, 25 Mar 2017, Géza Gémes wrote: > This test is the cirros equivalent of the busybox-hvm test > > Signed-off-by: Géza Gémes <geza.gemes@gmail.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> > --- > tests/cirros-qemu-hvm | 26 ++++++++++++++++++++++++++ > tests/series | 1 + > 2 files changed, 27 insertions(+) > create mode 100644 tests/cirros-qemu-hvm > > diff --git a/tests/cirros-qemu-hvm b/tests/cirros-qemu-hvm > new file mode 100644 > index 0000000..2e4ec2a > --- /dev/null > +++ b/tests/cirros-qemu-hvm > @@ -0,0 +1,26 @@ > +#!/usr/bin/env bash > + > +set -e > + > +function cirros-qemu-hvm-cleanup() { > + tear_down_cirros_test $testdir > +} > + > +function cirros-qemu-hvm-test() { > + download_cirros_components > + testdir=`mktemp -d` > + cp $CIRROS_DOWNLOADS/$CIRROS_DISK_FILE $testdir > + cat >$testdir/cirros-qemu-hvm.cfg <<EOF > +name = "raisin-test" > +builder = "hvm" > +memory = 128 > +vcpus = 2 > +disk = [ '$testdir/$CIRROS_DISK_FILE,raw,hda,rw' ] > +vif = [ 'bridge=xenbr1' ] > +serial="pty" > +boot="c" > +EOF > + > + $SUDO xl create $testdir/cirros-qemu-hvm.cfg > + check_guest_alive > +} > diff --git a/tests/series b/tests/series > index 1fec245..49a9257 100644 > --- a/tests/series > +++ b/tests/series > @@ -4,3 +4,4 @@ busybox-hvm-migrate > cirros-separate-kernel-pv > cirros-pygrub-pv > cirros-pvgrub2-pv > +cirros-qemu-hvm > -- > 2.7.4 >
diff --git a/tests/cirros-qemu-hvm b/tests/cirros-qemu-hvm new file mode 100644 index 0000000..2e4ec2a --- /dev/null +++ b/tests/cirros-qemu-hvm @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +set -e + +function cirros-qemu-hvm-cleanup() { + tear_down_cirros_test $testdir +} + +function cirros-qemu-hvm-test() { + download_cirros_components + testdir=`mktemp -d` + cp $CIRROS_DOWNLOADS/$CIRROS_DISK_FILE $testdir + cat >$testdir/cirros-qemu-hvm.cfg <<EOF +name = "raisin-test" +builder = "hvm" +memory = 128 +vcpus = 2 +disk = [ '$testdir/$CIRROS_DISK_FILE,raw,hda,rw' ] +vif = [ 'bridge=xenbr1' ] +serial="pty" +boot="c" +EOF + + $SUDO xl create $testdir/cirros-qemu-hvm.cfg + check_guest_alive +} diff --git a/tests/series b/tests/series index 1fec245..49a9257 100644 --- a/tests/series +++ b/tests/series @@ -4,3 +4,4 @@ busybox-hvm-migrate cirros-separate-kernel-pv cirros-pygrub-pv cirros-pvgrub2-pv +cirros-qemu-hvm
This test is the cirros equivalent of the busybox-hvm test Signed-off-by: Géza Gémes <geza.gemes@gmail.com> --- tests/cirros-qemu-hvm | 26 ++++++++++++++++++++++++++ tests/series | 1 + 2 files changed, 27 insertions(+) create mode 100644 tests/cirros-qemu-hvm