From 984c534a3f2219444f4cb4df61d77b8c6e5054d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 7 Dec 2017 03:27:47 +0100 Subject: [PATCH] tests: add test for multiple IPs for libxl and xenconfig driver Test conversion of multiple IP addresses to/from xl format and domXML. Also test libxl_domain_config generator handling of multiple IP addresses. Reviewed-by: Jim Fehlig --- tests/libxlxml2domconfigdata/multiple-ip.json | 37 ++++++++++++++ tests/libxlxml2domconfigdata/multiple-ip.xml | 22 +++++++++ tests/libxlxml2domconfigtest.c | 1 + tests/xlconfigdata/test-vif-multi-ip.cfg | 25 ++++++++++ tests/xlconfigdata/test-vif-multi-ip.xml | 48 +++++++++++++++++++ tests/xlconfigtest.c | 1 + 6 files changed, 134 insertions(+) create mode 100644 tests/libxlxml2domconfigdata/multiple-ip.json create mode 100644 tests/libxlxml2domconfigdata/multiple-ip.xml create mode 100644 tests/xlconfigdata/test-vif-multi-ip.cfg create mode 100644 tests/xlconfigdata/test-vif-multi-ip.xml diff --git a/tests/libxlxml2domconfigdata/multiple-ip.json b/tests/libxlxml2domconfigdata/multiple-ip.json new file mode 100644 index 0000000000..4aff61d4b5 --- /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 0000000000..5188935f60 --- /dev/null +++ b/tests/libxlxml2domconfigdata/multiple-ip.xml @@ -0,0 +1,22 @@ + + test-pv + 039e9ee6-4a84-3055-4c81-8ba426ae2656 + 524288 + 524288 + 4 + + linux + + + destroy + restart + destroy + + + + + +