[PATCH libvirt v3 07/11] tests: AP matrix node device

Shalini Chellathurai Saroja posted 11 patches 4 years ago
There is a newer version of this series
[PATCH libvirt v3 07/11] tests: AP matrix node device
Posted by Shalini Chellathurai Saroja 4 years ago
Add tests to verify libvirt node device driver support for AP matrix
device.

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
---
 tests/nodedevschemadata/ap_matrix.xml                    | 7 +++++++
 .../mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml        | 9 +++++++++
 tests/nodedevxml2xmltest.c                               | 2 ++
 3 files changed, 18 insertions(+)
 create mode 100644 tests/nodedevschemadata/ap_matrix.xml
 create mode 100644 tests/nodedevschemadata/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml

diff --git a/tests/nodedevschemadata/ap_matrix.xml b/tests/nodedevschemadata/ap_matrix.xml
new file mode 100644
index 00000000..30dab9cf
--- /dev/null
+++ b/tests/nodedevschemadata/ap_matrix.xml
@@ -0,0 +1,7 @@
+<device>
+  <name>ap_matrix</name>
+  <path>/sys/devices/vfio_ap/matrix</path>
+  <parent>computer</parent>
+  <capability type='ap_matrix'>
+  </capability>
+</device>
diff --git a/tests/nodedevschemadata/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml b/tests/nodedevschemadata/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml
new file mode 100644
index 00000000..106f7593
--- /dev/null
+++ b/tests/nodedevschemadata/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml
@@ -0,0 +1,9 @@
+<device>
+  <name>mdev_ee0b88c4-f554-4dc1-809d-b2a01e8e48ad</name>
+  <path>/sys/devices/vfio_ap/matrix/mdev_ee0b88c4-f554-4dc1-809d-b2a01e8e48ad</path>
+  <parent>ap_matrix</parent>
+  <capability type='mdev'>
+    <type id='vfio_ap-passthrough'/>
+    <iommuGroup number='0'/>
+  </capability>
+</device>
diff --git a/tests/nodedevxml2xmltest.c b/tests/nodedevxml2xmltest.c
index a8cbe6a9..dc8cb04f 100644
--- a/tests/nodedevxml2xmltest.c
+++ b/tests/nodedevxml2xmltest.c
@@ -127,6 +127,8 @@ mymain(void)
     DO_TEST("css_0_0_fffe_mdev_types");
     DO_TEST("ap_card07");
     DO_TEST("ap_07_0038");
+    DO_TEST("ap_matrix");
+    DO_TEST("mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad");
 
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
-- 
2.26.2