diff mbox

[03/11] Introduce cirros-separate-kernel-pv test

Message ID 1490381976-22981-4-git-send-email-geza.gemes@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gémes Géza March 24, 2017, 6:59 p.m. UTC
This test is the cirros equivalent of the bussybox-pv test

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

Comments

Stefano Stabellini March 25, 2017, 12:17 a.m. UTC | #1
On Fri, 24 Mar 2017, Géza Gémes wrote:
> This test is the cirros equivalent of the bussybox-pv test
                                            ^ busybox-pv


> Signed-off-by: Géza Gémes <geza.gemes@gmail.com>
> ---
>  tests/cirros-separate-kernel-pv | 26 ++++++++++++++++++++++++++
>  tests/series                    |  1 +
>  2 files changed, 27 insertions(+)
>  create mode 100644 tests/cirros-separate-kernel-pv
> 
> diff --git a/tests/cirros-separate-kernel-pv b/tests/cirros-separate-kernel-pv
> new file mode 100644
> index 0000000..9432481
> --- /dev/null
> +++ b/tests/cirros-separate-kernel-pv
> @@ -0,0 +1,26 @@
> +#!/usr/bin/env bash
> +
> +set -e
> +
> +function cirros-separate-kernel-pv-cleanup() {
> +    tear_down_cirros_test $testdir
> +}
> +
> +function cirros-separate-kernel-pv-test() {
> +    testdir=`mktemp -d`

I would move the call to download_cirros_components here. The test looks
fine though.


> +    set_up_cirros_kernel_initrd $testdir
> +    set_up_cirros_rootfs $testdir
> +    cat >$testdir/cirros-separate-kernel-pv.cfg <<EOF
> +name = "raisin-test"
> +memory = 128
> +vcpus = 2
> +kernel = "$testdir/$CIRROS_KERNEL_FILE"
> +ramdisk = "$testdir/$CIRROS_INITRD_FILE"
> +disk = [ '$testdir/$CIRROS_ROOTFS_FILE,raw,xvda,rw' ]
> +extra = "root=/dev/xvda"
> +vif = [ 'bridge=xenbr1' ]
> +EOF
> +
> +
> +    $SUDO xl create $testdir/cirros-separate-kernel-pv.cfg
> +    check_guest_alive
> +}
> diff --git a/tests/series b/tests/series
> index a2f4b34..38ee35a 100644
> --- a/tests/series
> +++ b/tests/series
> @@ -1,3 +1,4 @@
>  busybox-pv
>  busybox-hvm
>  busybox-hvm-migrate
> +cirros-separate-kernel-pv
> -- 
> 2.7.4
>
diff mbox

Patch

diff --git a/tests/cirros-separate-kernel-pv b/tests/cirros-separate-kernel-pv
new file mode 100644
index 0000000..9432481
--- /dev/null
+++ b/tests/cirros-separate-kernel-pv
@@ -0,0 +1,26 @@ 
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-separate-kernel-pv-cleanup() {
+    tear_down_cirros_test $testdir
+}
+
+function cirros-separate-kernel-pv-test() {
+    testdir=`mktemp -d`
+    set_up_cirros_kernel_initrd $testdir
+    set_up_cirros_rootfs $testdir
+    cat >$testdir/cirros-separate-kernel-pv.cfg <<EOF
+name = "raisin-test"
+memory = 128
+vcpus = 2
+kernel = "$testdir/$CIRROS_KERNEL_FILE"
+ramdisk = "$testdir/$CIRROS_INITRD_FILE"
+disk = [ '$testdir/$CIRROS_ROOTFS_FILE,raw,xvda,rw' ]
+extra = "root=/dev/xvda"
+vif = [ 'bridge=xenbr1' ]
+EOF
+
+    $SUDO xl create $testdir/cirros-separate-kernel-pv.cfg
+    check_guest_alive
+}
diff --git a/tests/series b/tests/series
index a2f4b34..38ee35a 100644
--- a/tests/series
+++ b/tests/series
@@ -1,3 +1,4 @@ 
 busybox-pv
 busybox-hvm
 busybox-hvm-migrate
+cirros-separate-kernel-pv