[libvirt] [PATCH 2/2] tests: add test for multiple IPs for libxl driver

Jim Fehlig jfehlig at suse.com
Mon Dec 4 21:47:38 UTC 2017


On 12/02/2017 07:35 PM, Marek Marczykowski-Górecki wrote:
> ---
>   tests/libxlxml2domconfigdata/multiple-ip.json | 37 ++++++++++++++++++++-
>   tests/libxlxml2domconfigdata/multiple-ip.xml  | 22 ++++++++++++-
>   tests/libxlxml2domconfigtest.c                |  1 +-
>   3 files changed, 60 insertions(+)
>   create mode 100644 tests/libxlxml2domconfigdata/multiple-ip.json
>   create mode 100644 tests/libxlxml2domconfigdata/multiple-ip.xml

Reviewed-by: Jim Fehlig <jfehlig at suse.com>

Regards,
Jim

> 
> diff --git a/tests/libxlxml2domconfigdata/multiple-ip.json b/tests/libxlxml2domconfigdata/multiple-ip.json
> new file mode 100644
> index 0000000..4aff61d
> --- /dev/null
> +++ b/tests/libxlxml2domconfigdata/multiple-ip.json
> @@ -0,0 +1,37 @@
> +{
> +    "c_info": {
> +        "type": "pv",
> +        "name": "test-pv",
> +        "uuid": "039e9ee6-4a84-3055-4c81-8ba426ae2656"
> +    },
> +    "b_info": {
> +        "max_vcpus": 4,
> +        "avail_vcpus": [
> +            0,
> +            1,
> +            2,
> +            3
> +        ],
> +        "max_memkb": 524288,
> +        "target_memkb": 524288,
> +        "sched_params": {
> +            "weight": 1000
> +        },
> +        "type.pv": {
> +            "bootloader": "pygrub"
> +        },
> +        "arch_arm": {
> +
> +        }
> +    },
> +    "nics": [
> +        {
> +            "devid": 0,
> +            "mac": "00:16:3e:3e:86:60",
> +            "ip": "10.0.0.1 2000:abcd::1",
> +            "script": "/etc/xen/scripts/vif-bridge",
> +            "nictype": "vif"
> +        }
> +    ],
> +    "on_reboot": "restart"
> +}
> diff --git a/tests/libxlxml2domconfigdata/multiple-ip.xml b/tests/libxlxml2domconfigdata/multiple-ip.xml
> new file mode 100644
> index 0000000..5188935
> --- /dev/null
> +++ b/tests/libxlxml2domconfigdata/multiple-ip.xml
> @@ -0,0 +1,22 @@
> +<domain type='xen'>
> +  <name>test-pv</name>
> +  <uuid>039e9ee6-4a84-3055-4c81-8ba426ae2656</uuid>
> +  <memory>524288</memory>
> +  <currentMemory>524288</currentMemory>
> +  <vcpu>4</vcpu>
> +  <os>
> +    <type arch='x86_64' machine='xenpv'>linux</type>
> +  </os>
> +  <clock offset='utc'/>
> +  <on_poweroff>destroy</on_poweroff>
> +  <on_reboot>restart</on_reboot>
> +  <on_crash>destroy</on_crash>
> +  <devices>
> +    <interface type='ethernet'>
> +      <ip address='10.0.0.1' family='ipv4'/>
> +      <ip address='2000:abcd::1' family='ipv6'/>
> +      <mac address='00:16:3e:3e:86:60'/>
> +      <script path='/etc/xen/scripts/vif-bridge'/>
> +    </interface>
> +  </devices>
> +</domain>
> diff --git a/tests/libxlxml2domconfigtest.c b/tests/libxlxml2domconfigtest.c
> index c8379f1..bd4c3af 100644
> --- a/tests/libxlxml2domconfigtest.c
> +++ b/tests/libxlxml2domconfigtest.c
> @@ -190,6 +190,7 @@ mymain(void)
>       DO_TEST("basic-hvm");
>       DO_TEST("moredevs-hvm");
>       DO_TEST("vnuma-hvm");
> +    DO_TEST("multiple-ip");
>   
>       return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
>   }
> 




More information about the libvir-list mailing list