From ea4976de7bccfe8016950d040629a6818a58db4e Mon Sep 17 00:00:00 2001 Message-Id: From: Boris Fiuczynski Date: Fri, 13 May 2022 12:31:16 +0200 Subject: [PATCH] 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 Reviewed-by: Michal Privoznik (cherry picked from commit 127fda5e84790af2c5a16b61a87e339391cccb3b) Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011 Signed-off-by: Thomas Huth --- .../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 @@ + + css_0_0_10000 + /sys/devices/css0/0.0.10000 + computer + + 0x0 + 0x0 + 0x10000 + + 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 @@ + + css_0_0_fffe + /sys/devices/css0/0.0.fffe + computer + + 0x0 + 0x0 + 0xfffe + + 0x0 + 0x0 + 0x0815 + + + + I/O subchannel (Non-QDIO) + vfio-ccw + 1 + + + + 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 @@ + + css_0_0_ffff + /sys/devices/css0/0.0.ffff + computer + + 0x0 + 0x0 + 0xffff + + 0x0 + 0x0 + 0x10000 + + + 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 @@ + + css_0_0_ffff + /sys/devices/css0/0.0.ffff + computer + + 0x0 + 0x0 + 0xffff + + 0x0 + 0x0 + 0x0815 + + + 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.39.1