nodedev: add tests for optional device address to css device

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

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Boris Fiuczynski 2022-05-13 12:31:16 +02:00 committed by Michal Privoznik
parent 122b975e40
commit 127fda5e84
7 changed files with 66 additions and 0 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1 @@
../nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml

View File

@ -0,0 +1 @@
../nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml

View File

@ -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");