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

Re: [libvirt] [PATCH v3 UPDATED 2/2] tests: Add tests for gluster protocol based network disks support



On Fri, Oct 26, 2012 at 22:27:36 +0530, Harsh Prateek Bora wrote:
> Signed-off-by: Harsh Prateek Bora <harsh linux vnet ibm com>
> ---
>  tests/qemuargv2xmltest.c                           |  1 +
>  .../qemuxml2argv-disk-drive-network-gluster.args   |  1 +
>  .../qemuxml2argv-disk-drive-network-gluster.xml    | 35 ++++++++++++++++++++++
>  tests/qemuxml2argvtest.c                           |  2 ++
>  4 files changed, 39 insertions(+)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.args
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.xml
> 
> diff --git a/tests/qemuargv2xmltest.c b/tests/qemuargv2xmltest.c
> index 5e51d32..bcea8fe 100644
> --- a/tests/qemuargv2xmltest.c
> +++ b/tests/qemuargv2xmltest.c
> @@ -183,6 +183,7 @@ mymain(void)
>      DO_TEST("disk-drive-cache-directsync");
>      DO_TEST("disk-drive-cache-unsafe");
>      DO_TEST("disk-drive-network-nbd");
> +    DO_TEST("disk-drive-network-gluster");
>      DO_TEST("disk-drive-network-rbd");
>      /* older format using CEPH_ARGS env var */
>      DO_TEST("disk-drive-network-rbd-ceph-env");
> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.args
> new file mode 100644
> index 0000000..e11a9d2
> --- /dev/null
> +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.args
> @@ -0,0 +1 @@
> +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -no-kqemu -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -drive file=gluster+tcp://example.org:6000/Volume1/Image,if=virtio,format=raw -drive 'file=gluster+unix:///Volume2/Image?socket=/path/to/sock,if=virtio,format=raw' -net none -serial none -parallel none -usb
> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.xml
> new file mode 100644
> index 0000000..50619e7
> --- /dev/null
> +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.xml
> @@ -0,0 +1,35 @@
> +<domain type='qemu'>
> +  <name>QEMUGuest1</name>
> +  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
> +  <memory unit='KiB'>219136</memory>
> +  <currentMemory unit='KiB'>219136</currentMemory>
> +  <vcpu placement='static'>1</vcpu>
> +  <os>
> +    <type arch='i686' machine='pc'>hvm</type>
> +    <boot dev='hd'/>
> +  </os>
> +  <clock offset='utc'/>
> +  <on_poweroff>destroy</on_poweroff>
> +  <on_reboot>restart</on_reboot>
> +  <on_crash>destroy</on_crash>
> +  <devices>
> +    <emulator>/usr/bin/qemu</emulator>
> +    <disk type='network' device='disk'>
> +      <driver name='qemu' type='raw'/>
> +      <source protocol='gluster' name='Volume1/Image'>
> +        <host name='example.org' port='6000' transport='tcp'/>
> +      </source>
> +      <target dev='vda' bus='virtio'/>
> +    </disk>
> +    <disk type='network' device='disk'>
> +      <driver name='qemu' type='raw'/>
> +      <source protocol='gluster' name='Volume2/Image'>
> +        <host transport='unix' socket='/path/to/sock'/>
> +      </source>
> +      <target dev='vdb' bus='virtio'/>
> +    </disk>
> +    <controller type='usb' index='0'/>
> +    <controller type='ide' index='0'/>
> +    <memballoon model='virtio'/>
> +  </devices>
> +</domain>
> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
> index 0757e37..20ed7cb 100644
> --- a/tests/qemuxml2argvtest.c
> +++ b/tests/qemuxml2argvtest.c
> @@ -469,6 +469,8 @@ mymain(void)
>              QEMU_CAPS_DRIVE_CACHE_UNSAFE, QEMU_CAPS_DRIVE_FORMAT);
>      DO_TEST("disk-drive-network-nbd",
>              QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_FORMAT);
> +    DO_TEST("disk-drive-network-gluster", false,
> +            QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_FORMAT);
>      DO_TEST("disk-drive-network-rbd",
>              QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_FORMAT);
>      DO_TEST("disk-drive-network-sheepdog",

ACK after removing the "transport='tcp'" attribute after implementing the
changes I suggested in 1/2.

Jirka


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