[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/3] raisin: check for invalid initrds



get_host_initrd can return an invalid or null initrd. Do not set the
ramdisk option in the VM config file to an invalid value.

Signed-off-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 tests/busybox-pv | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/busybox-pv b/tests/busybox-pv
index a7ae976..7ad4f7a 100755
--- a/tests/busybox-pv
+++ b/tests/busybox-pv
@@ -21,7 +21,6 @@ function busybox-pv-test() {
 
     cat >busybox-pv <<EOF
 kernel = "`get_host_kernel`"
-ramdisk = "`get_host_initrd`"
 extra = "root=/dev/xvda console=hvc0"
 memory = 512
 name = "raisin-test"
@@ -31,6 +30,10 @@ serial="pty"
 boot="c"
 vif=['bridge=xenbr1']
 EOF
+    if [[ -e "`get_host_initrd`" ]]
+    then
+        echo "ramdisk = \"`get_host_initrd`\"" >> busybox-pv
+    fi
 
     $SUDO xl create busybox-pv
     check_guest_alive
-- 
1.9.1


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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.