Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- .../generic-graphics-vnc-listen-attr-only.xml | 28 ++++++++++++++++++++ ...generic-graphics-vnc-listen-element-minimal.xml | 30 ++++++++++++++++++++++ ...ic-graphics-vnc-listen-element-with-address.xml | 30 ++++++++++++++++++++++ .../generic-graphics-vnc-manual-port.xml | 28 ++++++++++++++++++++ .../generic-graphics-vnc-minimal.xml | 28 ++++++++++++++++++++ .../generic-graphics-vnc-socket-listen.xml | 30 ++++++++++++++++++++++ .../generic-graphics-vnc-socket.xml | 28 ++++++++++++++++++++ .../generic-graphics-vnc-listen-attr-only.xml | 30 ++++++++++++++++++++++ ...generic-graphics-vnc-listen-element-minimal.xml | 30 ++++++++++++++++++++++ ...ic-graphics-vnc-listen-element-with-address.xml | 30 ++++++++++++++++++++++ .../generic-graphics-vnc-manual-port.xml | 28 ++++++++++++++++++++ .../generic-graphics-vnc-minimal.xml | 28 ++++++++++++++++++++ .../generic-graphics-vnc-socket-listen.xml | 30 ++++++++++++++++++++++ .../generic-graphics-vnc-socket.xml | 28 ++++++++++++++++++++ tests/genericxml2xmltest.c | 7 +++++ 15 files changed, 413 insertions(+) create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-listen-attr-only.xml create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-listen-element-minimal.xml create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-listen-element-with-address.xml create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-manual-port.xml create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-minimal.xml create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-socket-listen.xml create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-socket.xml create mode 100644 tests/genericxml2xmloutdata/generic-graphics-vnc-listen-attr-only.xml create mode 100644 tests/genericxml2xmloutdata/generic-graphics-vnc-listen-element-minimal.xml create mode 100644 tests/genericxml2xmloutdata/generic-graphics-vnc-listen-element-with-address.xml create mode 100644 tests/genericxml2xmloutdata/generic-graphics-vnc-manual-port.xml create mode 100644 tests/genericxml2xmloutdata/generic-graphics-vnc-minimal.xml create mode 100644 tests/genericxml2xmloutdata/generic-graphics-vnc-socket-listen.xml create mode 100644 tests/genericxml2xmloutdata/generic-graphics-vnc-socket.xml diff --git a/tests/genericxml2xmlindata/generic-graphics-vnc-listen-attr-only.xml b/tests/genericxml2xmlindata/generic-graphics-vnc-listen-attr-only.xml new file mode 100644 index 0000000..f27eaa2 --- /dev/null +++ b/tests/genericxml2xmlindata/generic-graphics-vnc-listen-attr-only.xml @@ -0,0 +1,28 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</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> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' listen='127.0.0.1'/> + <video> + <model type='cirrus' vram='16384' heads='1'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmlindata/generic-graphics-vnc-listen-element-minimal.xml b/tests/genericxml2xmlindata/generic-graphics-vnc-listen-element-minimal.xml new file mode 100644 index 0000000..8bbf5df --- /dev/null +++ b/tests/genericxml2xmlindata/generic-graphics-vnc-listen-element-minimal.xml @@ -0,0 +1,30 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</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> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc'> + <listen type='address' address='127.0.0.1'/> + </graphics> + <video> + <model type='cirrus' vram='16384' heads='1'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmlindata/generic-graphics-vnc-listen-element-with-address.xml b/tests/genericxml2xmlindata/generic-graphics-vnc-listen-element-with-address.xml new file mode 100644 index 0000000..8bbf5df --- /dev/null +++ b/tests/genericxml2xmlindata/generic-graphics-vnc-listen-element-with-address.xml @@ -0,0 +1,30 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</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> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc'> + <listen type='address' address='127.0.0.1'/> + </graphics> + <video> + <model type='cirrus' vram='16384' heads='1'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmlindata/generic-graphics-vnc-manual-port.xml b/tests/genericxml2xmlindata/generic-graphics-vnc-manual-port.xml new file mode 100644 index 0000000..580c27d --- /dev/null +++ b/tests/genericxml2xmlindata/generic-graphics-vnc-manual-port.xml @@ -0,0 +1,28 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</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> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' port='5900' autoport='yes'/> + <video> + <model type='cirrus' vram='16384' heads='1'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmlindata/generic-graphics-vnc-minimal.xml b/tests/genericxml2xmlindata/generic-graphics-vnc-minimal.xml new file mode 100644 index 0000000..4ffba85 --- /dev/null +++ b/tests/genericxml2xmlindata/generic-graphics-vnc-minimal.xml @@ -0,0 +1,28 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</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> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc'/> + <video> + <model type='cirrus' vram='16384' heads='1'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmlindata/generic-graphics-vnc-socket-listen.xml b/tests/genericxml2xmlindata/generic-graphics-vnc-socket-listen.xml new file mode 100644 index 0000000..5f82abc --- /dev/null +++ b/tests/genericxml2xmlindata/generic-graphics-vnc-socket-listen.xml @@ -0,0 +1,30 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</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> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' socket='/tmp/QEMUGuest1-vnc.sock'> + <listen type='address' address='127.0.0.1'/> + </graphics> + <video> + <model type='cirrus' vram='16384' heads='1'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmlindata/generic-graphics-vnc-socket.xml b/tests/genericxml2xmlindata/generic-graphics-vnc-socket.xml new file mode 100644 index 0000000..cc26a33 --- /dev/null +++ b/tests/genericxml2xmlindata/generic-graphics-vnc-socket.xml @@ -0,0 +1,28 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</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> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' socket='/tmp/QEMUGuest1-vnc.sock'/> + <video> + <model type='cirrus' vram='16384' heads='1'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmloutdata/generic-graphics-vnc-listen-attr-only.xml b/tests/genericxml2xmloutdata/generic-graphics-vnc-listen-attr-only.xml new file mode 100644 index 0000000..ee4909b --- /dev/null +++ b/tests/genericxml2xmloutdata/generic-graphics-vnc-listen-attr-only.xml @@ -0,0 +1,30 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</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> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> + <listen type='address' address='127.0.0.1'/> + </graphics> + <video> + <model type='cirrus' vram='16384' heads='1' primary='yes'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmloutdata/generic-graphics-vnc-listen-element-minimal.xml b/tests/genericxml2xmloutdata/generic-graphics-vnc-listen-element-minimal.xml new file mode 100644 index 0000000..ee4909b --- /dev/null +++ b/tests/genericxml2xmloutdata/generic-graphics-vnc-listen-element-minimal.xml @@ -0,0 +1,30 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</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> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> + <listen type='address' address='127.0.0.1'/> + </graphics> + <video> + <model type='cirrus' vram='16384' heads='1' primary='yes'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmloutdata/generic-graphics-vnc-listen-element-with-address.xml b/tests/genericxml2xmloutdata/generic-graphics-vnc-listen-element-with-address.xml new file mode 100644 index 0000000..ee4909b --- /dev/null +++ b/tests/genericxml2xmloutdata/generic-graphics-vnc-listen-element-with-address.xml @@ -0,0 +1,30 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</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> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> + <listen type='address' address='127.0.0.1'/> + </graphics> + <video> + <model type='cirrus' vram='16384' heads='1' primary='yes'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmloutdata/generic-graphics-vnc-manual-port.xml b/tests/genericxml2xmloutdata/generic-graphics-vnc-manual-port.xml new file mode 100644 index 0000000..ac8c279 --- /dev/null +++ b/tests/genericxml2xmloutdata/generic-graphics-vnc-manual-port.xml @@ -0,0 +1,28 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</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> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' port='-1' autoport='yes'/> + <video> + <model type='cirrus' vram='16384' heads='1' primary='yes'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmloutdata/generic-graphics-vnc-minimal.xml b/tests/genericxml2xmloutdata/generic-graphics-vnc-minimal.xml new file mode 100644 index 0000000..ac8c279 --- /dev/null +++ b/tests/genericxml2xmloutdata/generic-graphics-vnc-minimal.xml @@ -0,0 +1,28 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</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> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' port='-1' autoport='yes'/> + <video> + <model type='cirrus' vram='16384' heads='1' primary='yes'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmloutdata/generic-graphics-vnc-socket-listen.xml b/tests/genericxml2xmloutdata/generic-graphics-vnc-socket-listen.xml new file mode 100644 index 0000000..a3b82fe --- /dev/null +++ b/tests/genericxml2xmloutdata/generic-graphics-vnc-socket-listen.xml @@ -0,0 +1,30 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</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> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' socket='/tmp/QEMUGuest1-vnc.sock'> + <listen type='address' address='127.0.0.1'/> + </graphics> + <video> + <model type='cirrus' vram='16384' heads='1' primary='yes'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmloutdata/generic-graphics-vnc-socket.xml b/tests/genericxml2xmloutdata/generic-graphics-vnc-socket.xml new file mode 100644 index 0000000..d8742c6 --- /dev/null +++ b/tests/genericxml2xmloutdata/generic-graphics-vnc-socket.xml @@ -0,0 +1,28 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</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> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' socket='/tmp/QEMUGuest1-vnc.sock'/> + <video> + <model type='cirrus' vram='16384' heads='1' primary='yes'/> + </video> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/genericxml2xmltest.c b/tests/genericxml2xmltest.c index 70a5203..70ecd2d 100644 --- a/tests/genericxml2xmltest.c +++ b/tests/genericxml2xmltest.c @@ -77,9 +77,16 @@ mymain(void) DO_TEST_DIFFERENT("disk-virtio"); + DO_TEST_DIFFERENT("graphics-vnc-minimal"); + DO_TEST_DIFFERENT("graphics-vnc-manual-port"); + DO_TEST_DIFFERENT("graphics-vnc-socket"); + DO_TEST_DIFFERENT("graphics-vnc-socket-listen"); DO_TEST_DIFFERENT("graphics-listen-back-compat"); DO_TEST_FULL("graphics-listen-back-compat-mismatch", 0, false, TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_PARSE); + DO_TEST_DIFFERENT("graphics-vnc-listen-attr-only"); + DO_TEST_DIFFERENT("graphics-vnc-listen-element-minimal"); + DO_TEST_DIFFERENT("graphics-vnc-listen-element-with-address"); DO_TEST_FULL("name-slash-parse", 0, false, TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_PARSE); -- 2.8.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list