Also add some device xml to generichotplugdata for testing purpose, and
add the forgotten testdomfc5.xml to meson.build.
Signed-off-by: Luke Yue <lukedyue(a)gmail.com>
---
examples/xml/test/meson.build | 1 +
examples/xml/test/testdomfc5.xml | 54 +++++++++++++++++++
examples/xml/test/testnodeinline.xml | 54 +++++++++++++++++++
.../generichotplug-controller.xml | 1 +
.../generichotplug-disk-cdrom.xml | 5 ++
.../generichotplug-filesystem.xml | 6 +++
.../generichotplug-hostdev.xml | 5 ++
.../generichotplug-input.xml | 1 +
.../generichotplug-interface.xml | 6 +++
.../generichotplug-lease.xml | 5 ++
.../generichotplug-memballoon.xml | 3 ++
.../generichotplug-memory.xml | 6 +++
.../generichotplugdata/generichotplug-rng.xml | 4 ++
.../generichotplug-shmem.xml | 4 ++
.../generichotplug-sound.xml | 3 ++
.../generichotplugdata/generichotplug-tpm.xml | 5 ++
.../generichotplug-vsock.xml | 3 ++
.../generichotplug-watchdog.xml | 1 +
18 files changed, 167 insertions(+)
create mode 100644 tests/generichotplugdata/generichotplug-controller.xml
create mode 100644 tests/generichotplugdata/generichotplug-disk-cdrom.xml
create mode 100644 tests/generichotplugdata/generichotplug-filesystem.xml
create mode 100644 tests/generichotplugdata/generichotplug-hostdev.xml
create mode 100644 tests/generichotplugdata/generichotplug-input.xml
create mode 100644 tests/generichotplugdata/generichotplug-interface.xml
create mode 100644 tests/generichotplugdata/generichotplug-lease.xml
create mode 100644 tests/generichotplugdata/generichotplug-memballoon.xml
create mode 100644 tests/generichotplugdata/generichotplug-memory.xml
create mode 100644 tests/generichotplugdata/generichotplug-rng.xml
create mode 100644 tests/generichotplugdata/generichotplug-shmem.xml
create mode 100644 tests/generichotplugdata/generichotplug-sound.xml
create mode 100644 tests/generichotplugdata/generichotplug-tpm.xml
create mode 100644 tests/generichotplugdata/generichotplug-vsock.xml
create mode 100644 tests/generichotplugdata/generichotplug-watchdog.xml
diff --git a/examples/xml/test/meson.build b/examples/xml/test/meson.build
index 89ebf03a7b..4a7e357d47 100644
--- a/examples/xml/test/meson.build
+++ b/examples/xml/test/meson.build
@@ -3,6 +3,7 @@ install_data(
'testdev.xml',
'testnodeinline.xml',
'testdomfc4.xml',
+ 'testdomfc5.xml',
'testdomfv0.xml',
'testnode.xml',
'testnetdef.xml',
diff --git a/examples/xml/test/testdomfc5.xml b/examples/xml/test/testdomfc5.xml
index a8afc211f6..3b9edb9da9 100644
--- a/examples/xml/test/testdomfc5.xml
+++ b/examples/xml/test/testdomfc5.xml
@@ -29,6 +29,12 @@
<mac address='00:16:3e:5d:c7:26'/>
<script path='vif-bridge'/>
</interface>
+ <interface type='network'>
+ <source network='testbrigde' />
+ <mac address='00:11:22:33:44:55' />
+ <model type='virtio' />
+ <alias name='ua-testNIC' />
+ </interface>
<disk type='file'>
<source file='/root/fv0'/>
<target dev='hda'/>
@@ -36,6 +42,7 @@
<disk type='block' device='cdrom'>
<source dev='/dev/sr0'/>
<target dev='hdb' bus='ide'/>
+ <alias name='ua-testCD' />
<readonly/>
</disk>
<disk type='file' device='floppy'>
@@ -47,5 +54,52 @@
<target dev='sda' bus='scsi'/>
</disk>
<graphics type='vnc' port='5904'/>
+ <sound model='ich6'>
+ <codec type='micro'/>
+ </sound>
+ <hostdev mode='capabilities' type='storage'>
+ <source>
+ <block>/dev/sdf1</block>
+ </source>
+ </hostdev>
+ <lease>
+ <lockspace>testarea</lockspace>
+ <key>testkey</key>
+ <target path='/root/test/lease/path' offset='1024'/>
+ </lease>
+ <controller type='ide' index='0'/>
+ <filesystem type='file' accessmode='passthrough'>
+ <driver type='loop' format='raw'/>
+ <source file='/root/test/guest.img'/>
+ <target dir='/root/libvirt/test'/>
+ <readonly/>
+ </filesystem>
+ <rng model='virtio'>
+ <rate period="2000" bytes="1234" />
+ <backend model='builtin' />
+ </rng>
+ <memory model='dimm' access='private' discard='yes'>
+ <target>
+ <size unit='KiB'>524287</size>
+ <node>0</node>
+ </target>
+ </memory>
+ <shmem name='my_shmem0' role='peer'>
+ <model type='ivshmem-plain'/>
+ <size unit='M'>4</size>
+ </shmem>
+ <watchdog model='i6300esb'/>
+ <input type='mouse' bus='virtio'/>
+ <vsock model='virtio'>
+ <cid auto='no' address='3'/>
+ </vsock>
+ <tpm model='tpm-tis'>
+ <backend type='emulator' version='2.0'>
+ <encryption secret='6dd3e4a5-1d76-44ce-961f-f119f5aad935'/>
+ </backend>
+ </tpm>
+ <memballoon model='virtio'>
+ <stats period='10' />
+ </memballoon>
</devices>
</domain>
diff --git a/examples/xml/test/testnodeinline.xml b/examples/xml/test/testnodeinline.xml
index 9165d9302d..1124146f73 100644
--- a/examples/xml/test/testnodeinline.xml
+++ b/examples/xml/test/testnodeinline.xml
@@ -117,6 +117,12 @@
<mac address='00:16:3e:5d:c7:26'/>
<script path='vif-bridge'/>
</interface>
+ <interface type='network'>
+ <source network='testbrigde' />
+ <mac address='00:11:22:33:44:55' />
+ <model type='virtio' />
+ <alias name='ua-testNIC' />
+ </interface>
<disk type='file'>
<source file='/root/fv0'/>
<target dev='hda'/>
@@ -124,6 +130,7 @@
<disk type='block' device='cdrom'>
<source dev='/dev/sr0'/>
<target dev='hdb' bus='ide'/>
+ <alias name='ua-testCD' />
<readonly/>
</disk>
<disk type='file' device='floppy'>
@@ -135,6 +142,53 @@
<target dev='sda' bus='scsi'/>
</disk>
<graphics type='vnc' port='5904'/>
+ <sound model='ich6'>
+ <codec type='micro'/>
+ </sound>
+ <hostdev mode='capabilities' type='storage'>
+ <source>
+ <block>/dev/sdf1</block>
+ </source>
+ </hostdev>
+ <lease>
+ <lockspace>testarea</lockspace>
+ <key>testkey</key>
+ <target path='/root/test/lease/path' offset='1024'/>
+ </lease>
+ <controller type='ide' index='0'/>
+ <filesystem type='file' accessmode='passthrough'>
+ <driver type='loop' format='raw'/>
+ <source file='/root/test/guest.img'/>
+ <target dir='/root/libvirt/test'/>
+ <readonly/>
+ </filesystem>
+ <rng model='virtio'>
+ <rate period="2000" bytes="1234" />
+ <backend model='builtin' />
+ </rng>
+ <memory model='dimm' access='private' discard='yes'>
+ <target>
+ <size unit='KiB'>524287</size>
+ <node>0</node>
+ </target>
+ </memory>
+ <shmem name='my_shmem0' role='peer'>
+ <model type='ivshmem-plain'/>
+ <size unit='M'>4</size>
+ </shmem>
+ <watchdog model='i6300esb'/>
+ <input type='mouse' bus='virtio'/>
+ <vsock model='virtio'>
+ <cid auto='no' address='3'/>
+ </vsock>
+ <tpm model='tpm-tis'>
+ <backend type='emulator' version='2.0'>
+ <encryption secret='6dd3e4a5-1d76-44ce-961f-f119f5aad935'/>
+ </backend>
+ </tpm>
+ <memballoon model='virtio'>
+ <stats period='10' />
+ </memballoon>
</devices>
</domain>
<network>
diff --git a/tests/generichotplugdata/generichotplug-controller.xml
b/tests/generichotplugdata/generichotplug-controller.xml
new file mode 100644
index 0000000000..d855bfa17f
--- /dev/null
+++ b/tests/generichotplugdata/generichotplug-controller.xml
@@ -0,0 +1 @@
+<controller type='ide' index='0'/>
diff --git a/tests/generichotplugdata/generichotplug-disk-cdrom.xml
b/tests/generichotplugdata/generichotplug-disk-cdrom.xml
new file mode 100644
index 0000000000..edc90556bb
--- /dev/null
+++ b/tests/generichotplugdata/generichotplug-disk-cdrom.xml
@@ -0,0 +1,5 @@
+<disk type='block' device='cdrom'>
+ <source dev='/dev/sr0'/>
+ <target dev='hdb' bus='ide'/>
+ <readonly/>
+</disk>
diff --git a/tests/generichotplugdata/generichotplug-filesystem.xml
b/tests/generichotplugdata/generichotplug-filesystem.xml
new file mode 100644
index 0000000000..cee5ed4ed9
--- /dev/null
+++ b/tests/generichotplugdata/generichotplug-filesystem.xml
@@ -0,0 +1,6 @@
+<filesystem type='file' accessmode='passthrough'>
+ <driver type='loop' format='raw'/>
+ <source file='/root/test/guest.img'/>
+ <target dir='/root/libvirt/test'/>
+ <readonly/>
+</filesystem>
diff --git a/tests/generichotplugdata/generichotplug-hostdev.xml
b/tests/generichotplugdata/generichotplug-hostdev.xml
new file mode 100644
index 0000000000..e364b50f36
--- /dev/null
+++ b/tests/generichotplugdata/generichotplug-hostdev.xml
@@ -0,0 +1,5 @@
+<hostdev mode='capabilities' type='storage'>
+ <source>
+ <block>/dev/sdf1</block>s
+ </source>
+</hostdev>
diff --git a/tests/generichotplugdata/generichotplug-input.xml
b/tests/generichotplugdata/generichotplug-input.xml
new file mode 100644
index 0000000000..d958f5b931
--- /dev/null
+++ b/tests/generichotplugdata/generichotplug-input.xml
@@ -0,0 +1 @@
+<input type='mouse' bus='virtio'/>
diff --git a/tests/generichotplugdata/generichotplug-interface.xml
b/tests/generichotplugdata/generichotplug-interface.xml
new file mode 100644
index 0000000000..7e0be80050
--- /dev/null
+++ b/tests/generichotplugdata/generichotplug-interface.xml
@@ -0,0 +1,6 @@
+<interface type='network'>
+ <source network='testbrigde' />
+ <mac address='00:11:22:33:44:55' />
+ <model type='virtio' />
+ <alias name='ua-testNIC' />
+</interface>
diff --git a/tests/generichotplugdata/generichotplug-lease.xml
b/tests/generichotplugdata/generichotplug-lease.xml
new file mode 100644
index 0000000000..c53c0c7e7d
--- /dev/null
+++ b/tests/generichotplugdata/generichotplug-lease.xml
@@ -0,0 +1,5 @@
+<lease>
+ <lockspace>testarea</lockspace>
+ <key>testkey</key>
+ <target path='/root/test/lease/path' offset='1024'/>
+</lease>
diff --git a/tests/generichotplugdata/generichotplug-memballoon.xml
b/tests/generichotplugdata/generichotplug-memballoon.xml
new file mode 100644
index 0000000000..fde18a9db6
--- /dev/null
+++ b/tests/generichotplugdata/generichotplug-memballoon.xml
@@ -0,0 +1,3 @@
+<memballoon model='virtio'>
+ <stats period='10' />
+</memballoon>
diff --git a/tests/generichotplugdata/generichotplug-memory.xml
b/tests/generichotplugdata/generichotplug-memory.xml
new file mode 100644
index 0000000000..49efd4af55
--- /dev/null
+++ b/tests/generichotplugdata/generichotplug-memory.xml
@@ -0,0 +1,6 @@
+<memory model='dimm' access='private' discard='yes'>
+ <target>
+ <size unit='KiB'>524287</size>
+ <node>0</node>
+ </target>
+</memory>
diff --git a/tests/generichotplugdata/generichotplug-rng.xml
b/tests/generichotplugdata/generichotplug-rng.xml
new file mode 100644
index 0000000000..369f423740
--- /dev/null
+++ b/tests/generichotplugdata/generichotplug-rng.xml
@@ -0,0 +1,4 @@
+<rng model='virtio'>
+ <rate period="2000" bytes="1234" />
+ <backend model='builtin' />
+</rng>
diff --git a/tests/generichotplugdata/generichotplug-shmem.xml
b/tests/generichotplugdata/generichotplug-shmem.xml
new file mode 100644
index 0000000000..04bf3d9a53
--- /dev/null
+++ b/tests/generichotplugdata/generichotplug-shmem.xml
@@ -0,0 +1,4 @@
+<shmem name='my_shmem0' role='peer'>
+ <model type='ivshmem-plain'/>
+ <size unit='M'>4</size>
+</shmem>
diff --git a/tests/generichotplugdata/generichotplug-sound.xml
b/tests/generichotplugdata/generichotplug-sound.xml
new file mode 100644
index 0000000000..cf7323077f
--- /dev/null
+++ b/tests/generichotplugdata/generichotplug-sound.xml
@@ -0,0 +1,3 @@
+<sound model='ich6'>
+ <codec type='micro'/>
+</sound>
diff --git a/tests/generichotplugdata/generichotplug-tpm.xml
b/tests/generichotplugdata/generichotplug-tpm.xml
new file mode 100644
index 0000000000..cc08b7bf6d
--- /dev/null
+++ b/tests/generichotplugdata/generichotplug-tpm.xml
@@ -0,0 +1,5 @@
+<tpm model='tpm-tis'>
+ <backend type='emulator' version='2.0'>
+ <encryption secret='6dd3e4a5-1d76-44ce-961f-f119f5aad935'/>
+ </backend>
+</tpm>
diff --git a/tests/generichotplugdata/generichotplug-vsock.xml
b/tests/generichotplugdata/generichotplug-vsock.xml
new file mode 100644
index 0000000000..dda45780c4
--- /dev/null
+++ b/tests/generichotplugdata/generichotplug-vsock.xml
@@ -0,0 +1,3 @@
+<vsock model='virtio'>
+ <cid auto='no' address='3'/>
+</vsock>
diff --git a/tests/generichotplugdata/generichotplug-watchdog.xml
b/tests/generichotplugdata/generichotplug-watchdog.xml
new file mode 100644
index 0000000000..a02086f296
--- /dev/null
+++ b/tests/generichotplugdata/generichotplug-watchdog.xml
@@ -0,0 +1 @@
+<watchdog model='i6300esb'/>
--
2.34.1