[PATCH 17/17] nodedev: add tests for optional device address to css device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add nodedev schema parsing and format tests for the optional new device
address on the css devices.

Signed-off-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxx>
---
 .../css_0_0_10000-invalid.xml                 | 10 +++++++++
 ...s_0_0_fffe_mdev_types_channel_dev_addr.xml | 22 +++++++++++++++++++
 .../css_0_0_ffff_channel_dev_addr-invalid.xml | 15 +++++++++++++
 .../css_0_0_ffff_channel_dev_addr.xml         | 15 +++++++++++++
 ...s_0_0_fffe_mdev_types_channel_dev_addr.xml |  1 +
 .../css_0_0_ffff_channel_dev_addr.xml         |  1 +
 tests/nodedevxml2xmltest.c                    |  2 ++
 7 files changed, 66 insertions(+)
 create mode 100644 tests/nodedevschemadata/css_0_0_10000-invalid.xml
 create mode 100644 tests/nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml
 create mode 100644 tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr-invalid.xml
 create mode 100644 tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml
 create mode 120000 tests/nodedevxml2xmlout/css_0_0_fffe_mdev_types_channel_dev_addr.xml
 create mode 120000 tests/nodedevxml2xmlout/css_0_0_ffff_channel_dev_addr.xml

diff --git a/tests/nodedevschemadata/css_0_0_10000-invalid.xml b/tests/nodedevschemadata/css_0_0_10000-invalid.xml
new file mode 100644
index 0000000000..740bb489a7
--- /dev/null
+++ b/tests/nodedevschemadata/css_0_0_10000-invalid.xml
@@ -0,0 +1,10 @@
+<device>
+  <name>css_0_0_10000</name>
+  <path>/sys/devices/css0/0.0.10000</path>
+  <parent>computer</parent>
+  <capability type='css'>
+    <cssid>0x0</cssid>
+    <ssid>0x0</ssid>
+    <devno>0x10000</devno>
+  </capability>
+</device>
diff --git a/tests/nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml b/tests/nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml
new file mode 100644
index 0000000000..198dcb0cb0
--- /dev/null
+++ b/tests/nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml
@@ -0,0 +1,22 @@
+<device>
+  <name>css_0_0_fffe</name>
+  <path>/sys/devices/css0/0.0.fffe</path>
+  <parent>computer</parent>
+  <capability type='css'>
+    <cssid>0x0</cssid>
+    <ssid>0x0</ssid>
+    <devno>0xfffe</devno>
+    <channel_dev_addr>
+      <cssid>0x0</cssid>
+      <ssid>0x0</ssid>
+      <devno>0x0815</devno>
+    </channel_dev_addr>
+    <capability type='mdev_types'>
+      <type id='vfio_ccw-io'>
+        <name>I/O subchannel (Non-QDIO)</name>
+        <deviceAPI>vfio-ccw</deviceAPI>
+        <availableInstances>1</availableInstances>
+      </type>
+    </capability>
+  </capability>
+</device>
diff --git a/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr-invalid.xml b/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr-invalid.xml
new file mode 100644
index 0000000000..3f2c5558c7
--- /dev/null
+++ b/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr-invalid.xml
@@ -0,0 +1,15 @@
+<device>
+  <name>css_0_0_ffff</name>
+  <path>/sys/devices/css0/0.0.ffff</path>
+  <parent>computer</parent>
+  <capability type='css'>
+    <cssid>0x0</cssid>
+    <ssid>0x0</ssid>
+    <devno>0xffff</devno>
+    <channel_dev_addr>
+      <cssid>0x0</cssid>
+      <ssid>0x0</ssid>
+      <devno>0x10000</devno>
+    </channel_dev_addr>
+  </capability>
+</device>
diff --git a/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml b/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml
new file mode 100644
index 0000000000..17a77cb282
--- /dev/null
+++ b/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml
@@ -0,0 +1,15 @@
+<device>
+  <name>css_0_0_ffff</name>
+  <path>/sys/devices/css0/0.0.ffff</path>
+  <parent>computer</parent>
+  <capability type='css'>
+    <cssid>0x0</cssid>
+    <ssid>0x0</ssid>
+    <devno>0xffff</devno>
+    <channel_dev_addr>
+      <cssid>0x0</cssid>
+      <ssid>0x0</ssid>
+      <devno>0x0815</devno>
+    </channel_dev_addr>
+  </capability>
+</device>
diff --git a/tests/nodedevxml2xmlout/css_0_0_fffe_mdev_types_channel_dev_addr.xml b/tests/nodedevxml2xmlout/css_0_0_fffe_mdev_types_channel_dev_addr.xml
new file mode 120000
index 0000000000..65ab582ee8
--- /dev/null
+++ b/tests/nodedevxml2xmlout/css_0_0_fffe_mdev_types_channel_dev_addr.xml
@@ -0,0 +1 @@
+../nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml
\ No newline at end of file
diff --git a/tests/nodedevxml2xmlout/css_0_0_ffff_channel_dev_addr.xml b/tests/nodedevxml2xmlout/css_0_0_ffff_channel_dev_addr.xml
new file mode 120000
index 0000000000..cbfe719777
--- /dev/null
+++ b/tests/nodedevxml2xmlout/css_0_0_ffff_channel_dev_addr.xml
@@ -0,0 +1 @@
+../nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml
\ No newline at end of file
diff --git a/tests/nodedevxml2xmltest.c b/tests/nodedevxml2xmltest.c
index 557347fb07..ad9562cc82 100644
--- a/tests/nodedevxml2xmltest.c
+++ b/tests/nodedevxml2xmltest.c
@@ -125,7 +125,9 @@ mymain(void)
     DO_TEST("mdev_3627463d_b7f0_4fea_b468_f1da537d301b");
     DO_TEST("ccw_0_0_ffff");
     DO_TEST("css_0_0_ffff");
+    DO_TEST("css_0_0_ffff_channel_dev_addr");
     DO_TEST("css_0_0_fffe_mdev_types");
+    DO_TEST("css_0_0_fffe_mdev_types_channel_dev_addr");
     DO_TEST("ap_card07");
     DO_TEST("ap_07_0038");
     DO_TEST("ap_matrix");
-- 
2.33.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux