[libvirt] [PATCH] tests: Add couple of nodedev tests

Michal Privoznik posted 1 patch 4 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/baa828e01d67de125d66546946d93df8a7243be1.1487569931.git.mprivozn@redhat.com
tests/nodedevschemadata/drm_card0.xml      | 9 +++++++++
tests/nodedevschemadata/drm_controlD64.xml | 9 +++++++++
tests/nodedevschemadata/drm_renderD128.xml | 9 +++++++++
tests/nodedevxml2xmltest.c                 | 3 +++
4 files changed, 30 insertions(+)
create mode 100644 tests/nodedevschemadata/drm_card0.xml
create mode 100644 tests/nodedevschemadata/drm_controlD64.xml
create mode 100644 tests/nodedevschemadata/drm_renderD128.xml

[libvirt] [PATCH] tests: Add couple of nodedev tests

Posted by Michal Privoznik 4 years, 2 months ago
With recent DRM device addition we report more devices. I happen
to have some on my system therefore add the nodedev XMLs intou
our test suite so that we make sure we won't break it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 tests/nodedevschemadata/drm_card0.xml      | 9 +++++++++
 tests/nodedevschemadata/drm_controlD64.xml | 9 +++++++++
 tests/nodedevschemadata/drm_renderD128.xml | 9 +++++++++
 tests/nodedevxml2xmltest.c                 | 3 +++
 4 files changed, 30 insertions(+)
 create mode 100644 tests/nodedevschemadata/drm_card0.xml
 create mode 100644 tests/nodedevschemadata/drm_controlD64.xml
 create mode 100644 tests/nodedevschemadata/drm_renderD128.xml

diff --git a/tests/nodedevschemadata/drm_card0.xml b/tests/nodedevschemadata/drm_card0.xml
new file mode 100644
index 000000000..307bada1a
--- /dev/null
+++ b/tests/nodedevschemadata/drm_card0.xml
@@ -0,0 +1,9 @@
+<device>
+  <name>drm_card0</name>
+  <path>/sys/devices/pci0000:00/0000:00:02.0/drm/card0</path>
+  <devnode type='dev'>/dev/dri/card0</devnode>
+  <parent>pci_0000_00_02_0</parent>
+  <capability type='drm'>
+    <type>primary</type>
+  </capability>
+</device>
diff --git a/tests/nodedevschemadata/drm_controlD64.xml b/tests/nodedevschemadata/drm_controlD64.xml
new file mode 100644
index 000000000..4f36a7068
--- /dev/null
+++ b/tests/nodedevschemadata/drm_controlD64.xml
@@ -0,0 +1,9 @@
+<device>
+  <name>drm_controlD64</name>
+  <path>/sys/devices/pci0000:00/0000:00:02.0/drm/controlD64</path>
+  <devnode type='dev'>/dev/dri/controlD64</devnode>
+  <parent>pci_0000_00_02_0</parent>
+  <capability type='drm'>
+    <type>control</type>
+  </capability>
+</device>
diff --git a/tests/nodedevschemadata/drm_renderD128.xml b/tests/nodedevschemadata/drm_renderD128.xml
new file mode 100644
index 000000000..7ae5474b1
--- /dev/null
+++ b/tests/nodedevschemadata/drm_renderD128.xml
@@ -0,0 +1,9 @@
+<device>
+  <name>drm_renderD128</name>
+  <path>/sys/devices/pci0000:00/0000:00:02.0/drm/renderD128</path>
+  <devnode type='dev'>/dev/dri/renderD128</devnode>
+  <parent>pci_0000_00_02_0</parent>
+  <capability type='drm'>
+    <type>render</type>
+  </capability>
+</device>
diff --git a/tests/nodedevxml2xmltest.c b/tests/nodedevxml2xmltest.c
index 5e1ae170c..5a8dd7dee 100644
--- a/tests/nodedevxml2xmltest.c
+++ b/tests/nodedevxml2xmltest.c
@@ -101,6 +101,9 @@ mymain(void)
     DO_TEST("pci_0000_02_10_7_sriov_pf_vfs_all");
     DO_TEST("pci_0000_02_10_7_sriov_pf_vfs_all_header_type");
     DO_TEST("drm_renderD129");
+    DO_TEST("drm_card0");
+    DO_TEST("drm_controlD64");
+    DO_TEST("drm_renderD128");
 
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
-- 
2.11.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] tests: Add couple of nodedev tests

Posted by Marc-André Lureau 4 years, 2 months ago
Hi

----- Original Message -----
> With recent DRM device addition we report more devices. I happen
> to have some on my system therefore add the nodedev XMLs intou
> our test suite so that we make sure we won't break it.
> 
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>

Isn't it redundant with drm_renderD129 test ?

> ---
>  tests/nodedevschemadata/drm_card0.xml      | 9 +++++++++
>  tests/nodedevschemadata/drm_controlD64.xml | 9 +++++++++
>  tests/nodedevschemadata/drm_renderD128.xml | 9 +++++++++
>  tests/nodedevxml2xmltest.c                 | 3 +++
>  4 files changed, 30 insertions(+)
>  create mode 100644 tests/nodedevschemadata/drm_card0.xml
>  create mode 100644 tests/nodedevschemadata/drm_controlD64.xml
>  create mode 100644 tests/nodedevschemadata/drm_renderD128.xml
> 
> diff --git a/tests/nodedevschemadata/drm_card0.xml
> b/tests/nodedevschemadata/drm_card0.xml
> new file mode 100644
> index 000000000..307bada1a
> --- /dev/null
> +++ b/tests/nodedevschemadata/drm_card0.xml
> @@ -0,0 +1,9 @@
> +<device>
> +  <name>drm_card0</name>
> +  <path>/sys/devices/pci0000:00/0000:00:02.0/drm/card0</path>
> +  <devnode type='dev'>/dev/dri/card0</devnode>
> +  <parent>pci_0000_00_02_0</parent>
> +  <capability type='drm'>
> +    <type>primary</type>
> +  </capability>
> +</device>
> diff --git a/tests/nodedevschemadata/drm_controlD64.xml
> b/tests/nodedevschemadata/drm_controlD64.xml
> new file mode 100644
> index 000000000..4f36a7068
> --- /dev/null
> +++ b/tests/nodedevschemadata/drm_controlD64.xml
> @@ -0,0 +1,9 @@
> +<device>
> +  <name>drm_controlD64</name>
> +  <path>/sys/devices/pci0000:00/0000:00:02.0/drm/controlD64</path>
> +  <devnode type='dev'>/dev/dri/controlD64</devnode>
> +  <parent>pci_0000_00_02_0</parent>
> +  <capability type='drm'>
> +    <type>control</type>
> +  </capability>
> +</device>
> diff --git a/tests/nodedevschemadata/drm_renderD128.xml
> b/tests/nodedevschemadata/drm_renderD128.xml
> new file mode 100644
> index 000000000..7ae5474b1
> --- /dev/null
> +++ b/tests/nodedevschemadata/drm_renderD128.xml
> @@ -0,0 +1,9 @@
> +<device>
> +  <name>drm_renderD128</name>
> +  <path>/sys/devices/pci0000:00/0000:00:02.0/drm/renderD128</path>
> +  <devnode type='dev'>/dev/dri/renderD128</devnode>
> +  <parent>pci_0000_00_02_0</parent>
> +  <capability type='drm'>
> +    <type>render</type>
> +  </capability>
> +</device>
> diff --git a/tests/nodedevxml2xmltest.c b/tests/nodedevxml2xmltest.c
> index 5e1ae170c..5a8dd7dee 100644
> --- a/tests/nodedevxml2xmltest.c
> +++ b/tests/nodedevxml2xmltest.c
> @@ -101,6 +101,9 @@ mymain(void)
>      DO_TEST("pci_0000_02_10_7_sriov_pf_vfs_all");
>      DO_TEST("pci_0000_02_10_7_sriov_pf_vfs_all_header_type");
>      DO_TEST("drm_renderD129");
> +    DO_TEST("drm_card0");
> +    DO_TEST("drm_controlD64");
> +    DO_TEST("drm_renderD128");
>  
>      return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
>  }
> --
> 2.11.0
> 
> 

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] tests: Add couple of nodedev tests

Posted by Michal Privoznik 4 years, 2 months ago
On 20.02.2017 08:50, Marc-André Lureau wrote:
> Hi
> 
> ----- Original Message -----
>> With recent DRM device addition we report more devices. I happen
>> to have some on my system therefore add the nodedev XMLs intou
>> our test suite so that we make sure we won't break it.
>>
>> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> 
> Isn't it redundant with drm_renderD129 test ?

I guess the drm_renderD129 is but others have different value in
/device/capability/type. I agree this is not critical so whatever we
feel like.

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list