[libvirt] [PATCH v2 4/4] tests: Add tests for per-device boot elements

Eric Blake eblake at redhat.com
Fri Jan 14 18:51:56 UTC 2011


On 01/14/2011 10:04 AM, Jiri Denemark wrote:
> 
> ---
> Notes:
>     Version 2:
>     - support for floppy devices
> 
> +  <devices>
> +    <emulator>/usr/bin/qemu</emulator>
> +    <disk type='block' device='disk'>
> +      <source dev='/dev/HostVG/QEMUGuest1'/>
> +      <target dev='hda' bus='ide'/>
> +      <address type='drive' controller='0' bus='0' unit='0'/>
> +    </disk>
> +    <disk type='network' device='disk'>
> +      <driver name='qemu' type='raw'/>
> +      <source protocol='sheepdog' name='image'>
> +        <host name='example.org' port='6000'/>
> +      </source>
> +      <target dev='vda' bus='virtio'/>
> +      <boot order='3'/>
> +    </disk>

Just to make sure I'm clear - if any <disk> has a <boot> sub-element,
then all remaining disks (in this case, /dev/HostVG/QEMUGuest1) that
lack <boot> are not even considered for booting within the guest bios.
What happens if <boot order='1'/> is accidentally specified twice among
two different <disk>/<interface> elements?  Or what if I only supply
<boot order='2'/>, but no 1?  Does this series need an additional patch
that ensures that there are no duplicates, or even that once all devices
are visited, the boot order is contiguous from 1 to n?

> +++ b/tests/qemuxml2xmltest.c
> @@ -127,6 +127,7 @@ mymain(int argc, char **argv)
>      DO_TEST("boot-floppy");
>      DO_TEST("boot-multi");
>      DO_TEST("boot-menu-disable");
> +    DO_TEST("boot-order");

Oh, good point - my smartcard patch forgot to update this file (there's
probably several cases where we touched one but not all related test files).

ACK to this patch, but I'm not sure your series is complete yet.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110114/4c4525a6/attachment-0001.sig>


More information about the libvir-list mailing list