tests/device_reset: Skip if no drm devices are preset
PATCH 1/1 tests/device_reset: Skip if no drm devices are preset
Skip the test if no drm devices are preset.
v2: fix a typo.
--- tests/device_reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/device_reset.c +1 -1
@@ -198,7 +198,7 @@ static void init_device_fds(struct device_fds *dev)* a device file descriptor open for exit handler use. */ dev->fds.dev =__drm_open_driver (DRIVER_ANY ); -igt_assert_fd (dev->fds.dev); +igt_require (dev->fds.dev !=-1 );if (is_i915_device (dev->fds.dev))igt_require_gem (dev->fds.dev);
Signature · 1 line
2.42.0
Hi Nirmoy,
Quoted 1 line · On Tuesday, 12 March 2024 11:07:57 CET Nirmoy Das wrote:
Skip the test if no drm devices are preset.
Did you mean present? (also in the subject line)
Quoted 14 lines
v2: fix a typo.
Signed-off-by Nirmoy Das <[email protected]>--- tests/device_reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/device_reset.c +0
-0
tests/device_reset.c static void init_device_fds(struct device_fds *dev) · line 201
Quoted 5 lines
tests/device_reset.c +1
-1@@ -198,7 +198,7 @@ static void init_device_fds(struct device_fds *dev)* a device file descriptor open for exit handler use. */ dev->fds.dev =__drm_open_driver (DRIVER_ANY ); -igt_assert_fd (dev->fds.dev); +igt_require (dev->fds.dev !=-1 );
What if __drm_open_driver() returns (unlikely) a negative value other than -1? In IGT we used to verify validity of a file descriptor by checking if its value is not negative, i.e., >= 0 (see e.g. lib/igt_core:igt_assert_fd(), lib/drmtest.c:drm_open_driver()). Please follow the same convention.
Thanks,
Janusz
Quoted 4 lines
tests/device_reset.c +0
-0if (is_i915_device (dev->fds.dev))igt_require_gem (dev->fds.dev);
Quoted 5 lines · Janusz Krzysztofik
Hi Nirmoy,
Quoted 1 line · On Tuesday, 12 March 2024 11:07:57 CET Nirmoy Das wrote:
Skip the test if no drm devices are preset.
Did you mean present? (also in the subject line)
Right, another typo
Quoted 9 lines
Quoted 9 lines
v2: fix a typo.
Signed-off-by Nirmoy Das<[email protected]>--- tests/device_reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 11 lines
tests/device_reset.c static void init_device_fds(struct device_fds *dev) · line 201
Quoted 10 lines
tests/device_reset.c +1
-1@@ -198,7 +198,7 @@ static void init_device_fds(struct device_fds *dev)* a device file descriptor open for exit handler use. */ dev->fds.dev =__drm_open_driver (DRIVER_ANY ); -igt_assert_fd (dev->fds.dev); +igt_require (dev->fds.dev !=-1 );What if
__drm_open_driver()returns (unlikely) a negative value other than -1?
__drm_open_driverdoc says: "An open DRM fd or -1 on error" so that won't happen.
Quoted 4 lines
In IGT we used to verify validity of a file descriptor by checking if its value is not negative, i.e., >= 0 (see e.g. lib/igt_core:igt_assert_fd(), lib/drmtest.c:drm_open_driver()). Please follow the same convention.
I can do s/igt_assert_fd/igt_require_fd
Thanks,
Nirmoy
Quoted 10 lines
Thanks,
JanuszQuoted 4 lines
tests/device_reset.c +0
-0if (is_i915_device (dev->fds.dev))igt_require_gem (dev->fds.dev);
Quoted 28 lines · On Tuesday, 12 March 2024 11:54:32 CET Nirmoy Das wrote:
Quoted 5 lines · Janusz Krzysztofik
Hi Nirmoy,
Quoted 1 line · On Tuesday, 12 March 2024 11:07:57 CET Nirmoy Das wrote:
Skip the test if no drm devices are preset.
Did you mean present? (also in the subject line)
Right, another typo
Quoted 20 lines
Quoted 14 lines
v2: fix a typo.
Signed-off-by Nirmoy Das<[email protected]>--- tests/device_reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/device_reset.c +0
-0tests/device_reset.c static void init_device_fds(struct device_fds *dev) · line 201
Quoted 5 lines
tests/device_reset.c +1
-1@@ -198,7 +198,7 @@ static void init_device_fds(struct device_fds *dev)* a device file descriptor open for exit handler use. */ dev->fds.dev =__drm_open_driver (DRIVER_ANY ); -igt_assert_fd (dev->fds.dev); +igt_require (dev->fds.dev !=-1 );What if
__drm_open_driver()returns (unlikely) a negative value other than
-1?
Quoted 2 lines
__drm_open_driverdocsays: "An open DRM fd or -1 on error" so that won't
happen.
That won't happen as long as there are no bugs in __drm_open_driver().
If you don't want to skip on (fd < -1) then let's fail, but we should never succeed in that unlikely case, I believe.
Thanks,
Janusz
Quoted 22 lines
Quoted 5 lines
In IGT we used to verify validity of a file descriptor by checking if its value is not negative, i.e., >= 0 (see e.g. lib/igt_core:igt_assert_fd(), lib/drmtest.c:drm_open_driver()). Please follow the same convention.
I can do s/igt_assert_fd/igt_require_fd
Thanks,
Nirmoy
Quoted 10 lines
Thanks,
JanuszQuoted 4 lines
tests/device_reset.c +0
-0if (is_i915_device (dev->fds.dev))igt_require_gem (dev->fds.dev);
Quoted 27 lines · Janusz Krzysztofik
Quoted 26 lines · On Tuesday, 12 March 2024 11:54:32 CET Nirmoy Das wrote:
Quoted 5 lines · Janusz Krzysztofik
Hi Nirmoy,
Quoted 1 line · On Tuesday, 12 March 2024 11:07:57 CET Nirmoy Das wrote:
Skip the test if no drm devices are preset.
Did you mean present? (also in the subject line)
Right, another typo
Quoted 19 lines
Quoted 13 lines
v2: fix a typo.
Signed-off-by Nirmoy Das<[email protected]>--- tests/device_reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/device_reset.c +0
-0tests/device_reset.c static void init_device_fds(struct device_fds *dev) · line 201
Quoted 5 lines
tests/device_reset.c +1
-1@@ -198,7 +198,7 @@ static void init_device_fds(struct device_fds *dev)* a device file descriptor open for exit handler use. */ dev->fds.dev =__drm_open_driver (DRIVER_ANY ); -igt_assert_fd (dev->fds.dev); +igt_require (dev->fds.dev !=-1 );What if
__drm_open_driver()returns (unlikely) a negative value other than
Quoted 8 lines
-1?
Quoted 1 line
__drm_open_driverdocsays: "An open DRM fd or -1 on error" so that won'thappen.
That won't happen as long as there are no bugs in
__drm_open_driver().If you don't want to skip on (fd < -1) then let's fail, but we should never succeed in that unlikely case, I believe.
No, we should take documented return value as a contract and shouldn't over worry about the function
breaking it.
Regards,
Nirmoy
Quoted 26 lines
Thanks,
JanuszQuoted 19 lines
Quoted 4 lines
In IGT we used to verify validity of a file descriptor by checking if its value is not negative, i.e., >= 0 (see e.g. lib/igt_core:igt_assert_fd(), lib/drmtest.c:drm_open_driver()). Please follow the same convention.
I can do s/igt_assert_fd/igt_require_fd
Thanks,
Nirmoy
Quoted 9 lines
Thanks,
JanuszQuoted 4 lines
tests/device_reset.c +0
-0if (is_i915_device (dev->fds.dev))igt_require_gem (dev->fds.dev);
Patchwork
CI✓ CI.xeBAT: success for tests/device_reset: Skip if no drm devices are preset (rev3)
In reply to Nirmoy Das== Series Details ==
== Series Details ==
Series: tests/device_reset: Skip if no drm devices are preset (rev3)
URL : https://patchwork.freedesktop.org/series/130992/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_7755_BAT -> XEIGTPW_10813_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (4 -> 4)
------------------------------
No changes in participating hosts
Changes
-------
No changes found
Build changes
-------------
* IGT: IGT_7755 -> IGTPW_10813
IGTPW_10813: 10813
IGT_7755: 7755
xe-929-61fa386186cb302cf26e29aef76d5b1a6ffe57ad: 61fa386186cb302cf26e29aef76d5b1a6ffe57ad
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10813/index.html
Patchwork
CI✗ Fi.CI.BAT: failure for tests/device_reset: Skip if no drm devices are preset (rev3)
In reply to Nirmoy Das== Series Details ==
== Series Details ==
Series: tests/device_reset: Skip if no drm devices are preset (rev3)
URL : https://patchwork.freedesktop.org/series/130992/
State : failure
== Summary ==
CI Bug Log - changes from IGT_7755 -> IGTPW_10813
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_10813 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_10813, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10813/index.html
Participating hosts (34 -> 29)
------------------------------
Missing (5): bat-dg2-8 fi-snb-2520m fi-glk-j4005 bat-rpls-3 bat-jsl-1
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_10813:
### IGT changes ###
#### Possible regressions ####
* igt@kms_pm_rpm@basic-rte:
- bat-arls-2: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7755/bat-arls-2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10813/bat-arls-2/igt@[email protected]
Known issues
------------
Here are the changes found in IGTPW_10813 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_huc_copy@huc-copy:
- fi-cfl-8109u: NOTRUN -> [SKIP][3] ([i915#2190])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10813/fi-cfl-8109u/igt@[email protected]
* igt@gem_lmem_swapping@basic@lmem0:
- bat-dg2-14: [PASS][4] -> [FAIL][5] ([i915#10378])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7755/bat-dg2-14/igt@gem_lmem_swapping@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10813/bat-dg2-14/igt@gem_lmem_swapping@[email protected]
* igt@gem_lmem_swapping@verify-random:
- fi-cfl-8109u: NOTRUN -> [SKIP][6] ([i915#4613]) +3 other tests skip
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10813/fi-cfl-8109u/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-blb-e6850: NOTRUN -> [SKIP][7] +32 other tests skip
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10813/fi-blb-e6850/igt@[email protected]
* igt@i915_selftest@live@perf:
- bat-dg2-9: NOTRUN -> [ABORT][8] ([i915#10366])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10813/bat-dg2-9/igt@i915_selftest@[email protected]
* igt@kms_pm_backlight@basic-brightness:
- fi-cfl-8109u: NOTRUN -> [SKIP][9] +11 other tests skip
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10813/fi-cfl-8109u/igt@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live@dmabuf:
- bat-dg2-9: [ABORT][10] ([i915#10366]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7755/bat-dg2-9/igt@i915_selftest@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10813/bat-dg2-9/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@guc_multi_lrc:
- bat-atsm-1: [ABORT][12] ([i915#10366]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7755/bat-atsm-1/igt@i915_selftest@live@guc_multi_lrc.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10813/bat-atsm-1/igt@i915_selftest@live@guc_multi_lrc.html
[i915#10366]: https://gitlab.freedesktop.org/drm/intel/issues/10366
[i915#10378]: https://gitlab.freedesktop.org/drm/intel/issues/10378
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7755 -> IGTPW_10813
CI-20190529: 20190529
CI_DRM_14420: 61fa386186cb302cf26e29aef76d5b1a6ffe57ad @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_10813: 10813
IGT_7755: 7755
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10813/index.html