]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: nodedevxml2xmltest: test more mdev files
authorJonathon Jongsma <jjongsma@redhat.com>
Fri, 14 May 2021 21:29:00 +0000 (16:29 -0500)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 20 May 2021 09:11:44 +0000 (11:11 +0200)
Add the rest of the mdev xml files to the xml2xml test, and include 2
new test cases: one that explicitly specifies 'manual' start, and one
that explicitly specifies 'auto' start.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/nodedevschemadata/mdev_autostart.xml [new file with mode: 0644]
tests/nodedevschemadata/mdev_manual.xml [new file with mode: 0644]
tests/nodedevxml2xmlout/mdev_autostart.xml [new file with mode: 0644]
tests/nodedevxml2xmlout/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366.xml [new file with mode: 0644]
tests/nodedevxml2xmlout/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml [new file with mode: 0644]
tests/nodedevxml2xmlout/mdev_fedc4916_1ca8_49ac_b176_871d16c13076.xml [new file with mode: 0644]
tests/nodedevxml2xmlout/mdev_manual.xml [new file with mode: 0644]
tests/nodedevxml2xmltest.c

diff --git a/tests/nodedevschemadata/mdev_autostart.xml b/tests/nodedevschemadata/mdev_autostart.xml
new file mode 100644 (file)
index 0000000..7f2f341
--- /dev/null
@@ -0,0 +1,10 @@
+<device>
+  <name>mdev_9c4954d2_fa39_4973_9d66_d61c6c4d0100</name>
+  <parent>pci_0000_00_02_0</parent>
+  <capability type='mdev'>
+    <type id='i915-GVTg_V5_8'/>
+    <attr name='example-attribute' value='attribute-value'/>
+    <start type='auto'/>
+    <uuid>9c4954d2-fa39-4973-9d66-d61c6c4d0100</uuid>
+  </capability>
+</device>
diff --git a/tests/nodedevschemadata/mdev_manual.xml b/tests/nodedevschemadata/mdev_manual.xml
new file mode 100644 (file)
index 0000000..9001588
--- /dev/null
@@ -0,0 +1,10 @@
+<device>
+  <name>mdev_9c4954d2_fa39_4973_9d66_d61c6c4d0100</name>
+  <parent>pci_0000_00_02_0</parent>
+  <capability type='mdev'>
+    <type id='i915-GVTg_V5_8'/>
+    <attr name='example-attribute' value='attribute-value'/>
+    <start type='manual'/>
+    <uuid>9c4954d2-fa39-4973-9d66-d61c6c4d0100</uuid>
+  </capability>
+</device>
diff --git a/tests/nodedevxml2xmlout/mdev_autostart.xml b/tests/nodedevxml2xmlout/mdev_autostart.xml
new file mode 100644 (file)
index 0000000..4313c4a
--- /dev/null
@@ -0,0 +1,11 @@
+<device>
+  <name>mdev_9c4954d2_fa39_4973_9d66_d61c6c4d0100</name>
+  <parent>pci_0000_00_02_0</parent>
+  <capability type='mdev'>
+    <type id='i915-GVTg_V5_8'/>
+    <uuid>9c4954d2-fa39-4973-9d66-d61c6c4d0100</uuid>
+    <start type='auto'/>
+    <iommuGroup number='0'/>
+    <attr name='example-attribute' value='attribute-value'/>
+  </capability>
+</device>
diff --git a/tests/nodedevxml2xmlout/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366.xml b/tests/nodedevxml2xmlout/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366.xml
new file mode 100644 (file)
index 0000000..bff95b0
--- /dev/null
@@ -0,0 +1,10 @@
+<device>
+  <name>mdev_d069d019_36ea_4111_8f0a_8c9a70e21366</name>
+  <parent>pci_0000_00_02_0</parent>
+  <capability type='mdev'>
+    <type id='i915-GVTg_V5_8'/>
+    <uuid>d069d019-36ea-4111-8f0a-8c9a70e21366</uuid>
+    <start type='manual'/>
+    <iommuGroup number='0'/>
+  </capability>
+</device>
diff --git a/tests/nodedevxml2xmlout/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml b/tests/nodedevxml2xmlout/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml
new file mode 100644 (file)
index 0000000..beb25b1
--- /dev/null
@@ -0,0 +1,11 @@
+<device>
+  <name>mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9</name>
+  <parent>pci_0000_00_02_0</parent>
+  <capability type='mdev'>
+    <type id='i915-GVTg_V5_8'/>
+    <start type='manual'/>
+    <iommuGroup number='0'/>
+    <attr name='example-attribute-1' value='attribute-value-1'/>
+    <attr name='example-attribute-2' value='attribute-value-2'/>
+  </capability>
+</device>
diff --git a/tests/nodedevxml2xmlout/mdev_fedc4916_1ca8_49ac_b176_871d16c13076.xml b/tests/nodedevxml2xmlout/mdev_fedc4916_1ca8_49ac_b176_871d16c13076.xml
new file mode 100644 (file)
index 0000000..1d6dbb6
--- /dev/null
@@ -0,0 +1,10 @@
+<device>
+  <name>mdev_fedc4916_1ca8_49ac_b176_871d16c13076</name>
+  <parent>pci_0000_00_02_0</parent>
+  <capability type='mdev'>
+    <type id='i915-GVTg_V5_8'/>
+    <start type='manual'/>
+    <iommuGroup number='0'/>
+    <attr name='example-attribute' value='attribute-value'/>
+  </capability>
+</device>
diff --git a/tests/nodedevxml2xmlout/mdev_manual.xml b/tests/nodedevxml2xmlout/mdev_manual.xml
new file mode 100644 (file)
index 0000000..0735f29
--- /dev/null
@@ -0,0 +1,11 @@
+<device>
+  <name>mdev_9c4954d2_fa39_4973_9d66_d61c6c4d0100</name>
+  <parent>pci_0000_00_02_0</parent>
+  <capability type='mdev'>
+    <type id='i915-GVTg_V5_8'/>
+    <uuid>9c4954d2-fa39-4973-9d66-d61c6c4d0100</uuid>
+    <start type='manual'/>
+    <iommuGroup number='0'/>
+    <attr name='example-attribute' value='attribute-value'/>
+  </capability>
+</device>
index 60a8fcd4863e10f66f31f8027fe85dfda07ff7a1..7bd508f750cf5866a0d664aff8e01d269d418fc7 100644 (file)
@@ -132,6 +132,11 @@ mymain(void)
     DO_TEST("ap_matrix");
     DO_TEST("ap_matrix_mdev_types");
     DO_TEST("mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad");
+    DO_TEST("mdev_d069d019_36ea_4111_8f0a_8c9a70e21366");
+    DO_TEST("mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9");
+    DO_TEST("mdev_fedc4916_1ca8_49ac_b176_871d16c13076");
+    DO_TEST("mdev_autostart");
+    DO_TEST("mdev_manual");
 
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }