diff mbox

[04/10] Introduce cirros-pygrub-pv test

Message ID 1490470142-9032-5-git-send-email-geza.gemes@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gémes Géza March 25, 2017, 7:28 p.m. UTC
This test verifies booting the cirros image using pygrub

Signed-off-by: Géza Gémes <geza.gemes@gmail.com>
---
 tests/cirros-pygrub-pv | 25 +++++++++++++++++++++++++
 tests/series           |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 tests/cirros-pygrub-pv

Comments

Stefano Stabellini March 27, 2017, 5:13 p.m. UTC | #1
On Sat, 25 Mar 2017, Géza Gémes wrote:
> This test verifies booting the cirros image using pygrub
> 
> Signed-off-by: Géza Gémes <geza.gemes@gmail.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
>  tests/cirros-pygrub-pv | 25 +++++++++++++++++++++++++
>  tests/series           |  1 +
>  2 files changed, 26 insertions(+)
>  create mode 100644 tests/cirros-pygrub-pv
> 
> diff --git a/tests/cirros-pygrub-pv b/tests/cirros-pygrub-pv
> new file mode 100644
> index 0000000..37e288c
> --- /dev/null
> +++ b/tests/cirros-pygrub-pv
> @@ -0,0 +1,25 @@
> +#!/usr/bin/env bash
> +
> +set -e
> +
> +function cirros-pygrub-pv-cleanup() {
> +    tear_down_cirros_test $testdir
> +}
> +
> +function cirros-pygrub-pv-test() {
> +    download_cirros_components
> +    testdir=`mktemp -d`
> +    cp $CIRROS_DOWNLOADS/$CIRROS_DISK_FILE $testdir
> +    cat >$testdir/cirros-pygrub-pv.cfg <<EOF
> +name = "raisin-test"
> +memory = 128
> +vcpus = 2
> +bootloader = "pygrub"
> +disk = [ '$testdir/$CIRROS_DISK_FILE,raw,xvda,rw' ]
> +extra = "root=/dev/xvda1"
> +vif = [ 'bridge=xenbr1' ]
> +EOF
> +
> +    $SUDO xl create $testdir/cirros-pygrub-pv.cfg
> +    check_guest_alive
> +}
> diff --git a/tests/series b/tests/series
> index 38ee35a..372fafb 100644
> --- a/tests/series
> +++ b/tests/series
> @@ -2,3 +2,4 @@ busybox-pv
>  busybox-hvm
>  busybox-hvm-migrate
>  cirros-separate-kernel-pv
> +cirros-pygrub-pv
> -- 
> 2.7.4
>
diff mbox

Patch

diff --git a/tests/cirros-pygrub-pv b/tests/cirros-pygrub-pv
new file mode 100644
index 0000000..37e288c
--- /dev/null
+++ b/tests/cirros-pygrub-pv
@@ -0,0 +1,25 @@ 
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-pygrub-pv-cleanup() {
+    tear_down_cirros_test $testdir
+}
+
+function cirros-pygrub-pv-test() {
+    download_cirros_components
+    testdir=`mktemp -d`
+    cp $CIRROS_DOWNLOADS/$CIRROS_DISK_FILE $testdir
+    cat >$testdir/cirros-pygrub-pv.cfg <<EOF
+name = "raisin-test"
+memory = 128
+vcpus = 2
+bootloader = "pygrub"
+disk = [ '$testdir/$CIRROS_DISK_FILE,raw,xvda,rw' ]
+extra = "root=/dev/xvda1"
+vif = [ 'bridge=xenbr1' ]
+EOF
+
+    $SUDO xl create $testdir/cirros-pygrub-pv.cfg
+    check_guest_alive
+}
diff --git a/tests/series b/tests/series
index 38ee35a..372fafb 100644
--- a/tests/series
+++ b/tests/series
@@ -2,3 +2,4 @@  busybox-pv
 busybox-hvm
 busybox-hvm-migrate
 cirros-separate-kernel-pv
+cirros-pygrub-pv