lib/igt_eld: fix eld_is_supported failing if not supported
PATCH 1/1 lib/igt_eld: fix eld_is_supported failing if not supported
When glob(3) doesn't find any results, it returns GLOB_NOMATCH. I've been confused by GLOB_NOCHECK's description and thought it would return 0.
Instead of failing on the assert, return that ELDs aren't supported in case there's no match.
While at it, also include glob's return value in the assert message.
---
Sorry about the fuss.
lib/igt_eld.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
lib/igt_eld.c +6 -3
@@ -270,11 +270,14 @@ bool eld_has_igt(void)bool eld_is_supported (void ) {glob_t glob_buf = {0 }; +int ret;bool has_elds; -igt_assert_f (glob ("/proc/asound/card*/" ELD_PREFIX "*" , -GLOB_NOSORT ,NULL , &glob_buf) ==0 , -"glob failed\n" ); + ret =glob ("/proc/asound/card*/" ELD_PREFIX "*" , +GLOB_NOSORT ,NULL , &glob_buf); +if (ret ==GLOB_NOMATCH ) +return false; +igt_assert_f (ret ==0 ,"glob failed: %d\n" , ret); has_elds = glob_buf.gl_pathc >0 ;globfree (&glob_buf);
--
2.23.0
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 27 lines · Simon Ser
When glob(3) doesn't find any results, it returns
GLOB_NOMATCH. I've been confused by GLOB_NOCHECK's description and thought it would return 0.Instead of failing on the assert, return that ELDs aren't supported in case there's no match.
While at it, also include glob's return value in the assert message.
Signed-off-by Simon Ser <[email protected]>Fixes 3374cd0b048f ("lib/igt_eld: introduce eld_is_supported")Cc Petri Latvala <[email protected]>---
Sorry about the fuss.
lib/igt_eld.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)lib/igt_eld.c +1
-0@@ -270,11 +270,14 @@ bool eld_has_igt(void)bool eld_is_supported (void ) {glob_t glob_buf = {0 }; +int ret;
lib/igt_eld.c bool eld_has_igt(void) · line 280
Quoted 10 lines
lib/igt_eld.c +5
-3bool has_elds; -igt_assert_f (glob ("/proc/asound/card*/" ELD_PREFIX "*" , -GLOB_NOSORT ,NULL , &glob_buf) ==0 , -"glob failed\n" ); + ret =glob ("/proc/asound/card*/" ELD_PREFIX "*" , +GLOB_NOSORT ,NULL , &glob_buf); +if (ret ==GLOB_NOMATCH ) +return false; +igt_assert_f (ret ==0 ,"glob failed: %d\n" , ret);
Quoted 6 lines
lib/igt_eld.c +0
-1has_elds = glob_buf.gl_pathc >0 ;globfree (&glob_buf); --2.23.0
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 34 lines · Petri Latvala
Quoted 33 lines · Simon Ser
When glob(3) doesn't find any results, it returns
GLOB_NOMATCH. I've been
confused by GLOB_NOCHECK's description and thought it would return 0.Instead of failing on the assert, return that ELDs aren't supported in case
there's no match.While at it, also include glob's return value in the assert message.
Signed-off-by Simon Ser <[email protected]>Fixes 3374cd0b048f ("lib/igt_eld: introduce eld_is_supported")Cc Petri Latvala <[email protected]>---
Sorry about the fuss.
lib/igt_eld.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)lib/igt_eld.c +1
-0@@ -270,11 +270,14 @@ bool eld_has_igt(void)bool eld_is_supported (void ) {glob_t glob_buf = {0 }; +int ret;bool has_elds;
Quoted 10 lines
lib/igt_eld.c bool eld_has_igt(void) · line 280
Quoted 8 lines
lib/igt_eld.c +5
-3-igt_assert_f (glob ("/proc/asound/card*/" ELD_PREFIX "*" , -GLOB_NOSORT ,NULL , &glob_buf) ==0 , -"glob failed\n" ); + ret =glob ("/proc/asound/card*/" ELD_PREFIX "*" , +GLOB_NOSORT ,NULL , &glob_buf); +if (ret ==GLOB_NOMATCH ) +return false; +igt_assert_f (ret ==0 ,"glob failed: %d\n" , ret);Reviewed-by Petri Latvala <[email protected]>
Thanks for the review. Please merge yourself when CI says it's fine, I won't be there to do it.
Quoted 7 lines
Quoted 7 lines
lib/igt_eld.c +0
-1has_elds = glob_buf.gl_pathc >0 ;globfree (&glob_buf); --2.23.0
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for lib/igt_eld: fix eld_is_supported failing if not supported
In reply to Simon Ser== Series Details ==
== Series Details ==
Series: lib/igt_eld: fix eld_is_supported failing if not supported
URL : https://patchwork.freedesktop.org/series/66649/
State : success
== Summary ==
CI Bug Log - changes from IGT_5180 -> IGTPW_3455
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/66649/revisions/1/mbox/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_3455:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@i915_pm_rpm@basic-pci-d3-state:
- {fi-tgl-u}: NOTRUN -> [SKIP][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/fi-tgl-u/igt@[email protected]
* igt@i915_pm_rpm@basic-rte:
- {fi-tgl-u}: NOTRUN -> [FAIL][2]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/fi-tgl-u/igt@[email protected]
Known issues
------------
Here are the changes found in IGTPW_3455 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live_sanitycheck:
- fi-icl-u3: [PASS][3] -> [DMESG-WARN][4] ([fdo#107724])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][5] -> [FAIL][6] ([fdo#111096])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/fi-kbl-7500u/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/fi-kbl-7500u/igt@[email protected]
#### Possible fixes ####
* igt@gem_sync@basic-store-each:
- {fi-tgl-u}: [INCOMPLETE][7] ([fdo#111647]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/fi-tgl-u/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/fi-tgl-u/igt@[email protected]
* igt@i915_selftest@live_execlists:
- fi-skl-gvtdvm: [DMESG-FAIL][9] ([fdo#111108]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html
* igt@i915_selftest@live_requests:
- {fi-icl-guc}: [INCOMPLETE][11] ([fdo#107713] / [fdo#109644] / [fdo#110464]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/fi-icl-guc/igt@i915_selftest@live_requests.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/fi-icl-guc/igt@i915_selftest@live_requests.html
* igt@kms_prop_blob@basic:
- fi-icl-u3: [DMESG-WARN][13] ([fdo#107724]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/fi-icl-u3/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/fi-icl-u3/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#109644]: https://bugs.freedesktop.org/show_bug.cgi?id=109644
[fdo#110464]: https://bugs.freedesktop.org/show_bug.cgi?id=110464
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#111108]: https://bugs.freedesktop.org/show_bug.cgi?id=111108
[fdo#111647]: https://bugs.freedesktop.org/show_bug.cgi?id=111647
Participating hosts (54 -> 46)
------------------------------
Missing (8): fi-ilk-m540 fi-hsw-4200u fi-tgl-u2 fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5180 -> IGTPW_3455
CI-20190529: 20190529
CI_DRM_6888: 52e9cd0877ee673ba1bb80c7c7be2e53c0821084 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3455: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/
IGT_5180: 811b10e2bd7fd2cd8ced9bbb55361c178886bbbd @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for lib/igt_eld: fix eld_is_supported failing if not supported
In reply to Simon Ser== Series Details ==
== Series Details ==
Series: lib/igt_eld: fix eld_is_supported failing if not supported
URL : https://patchwork.freedesktop.org/series/66649/
State : success
== Summary ==
CI Bug Log - changes from IGT_5180_full -> IGTPW_3455_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/66649/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_3455_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_balancer@smoke:
- shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#110854])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-iclb2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-iclb5/igt@[email protected]
* igt@gem_exec_schedule@in-order-bsd:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#111325]) +4 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-iclb3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-iclb4/igt@[email protected]
* igt@gem_exec_schedule@preempt-bsd1:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#109276]) +11 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-iclb4/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-iclb3/igt@[email protected]
* igt@gem_exec_suspend@basic-s3:
- shard-iclb: [PASS][7] -> [INCOMPLETE][8] ([fdo#107713])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-iclb6/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-iclb7/igt@[email protected]
* igt@i915_suspend@sysfs-reader:
- shard-kbl: [PASS][9] -> [INCOMPLETE][10] ([fdo#103665] / [fdo#108767])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-kbl2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-kbl1/igt@[email protected]
* igt@kms_cursor_crc@pipe-b-cursor-256x256-onscreen:
- shard-kbl: [PASS][11] -> [FAIL][12] ([fdo#103232]) +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-kbl2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-kbl2/igt@[email protected]
* igt@kms_cursor_crc@pipe-b-cursor-dpms:
- shard-apl: [PASS][13] -> [FAIL][14] ([fdo#103232]) +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-apl3/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-apl3/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-kbl: [PASS][15] -> [INCOMPLETE][16] ([fdo#103665])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-kbl6/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-kbl4/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-blt:
- shard-iclb: [PASS][17] -> [FAIL][18] ([fdo#103167]) +4 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-iclb8/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-iclb2/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
- shard-kbl: [PASS][19] -> [DMESG-WARN][20] ([fdo#108566]) +2 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-kbl6/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-kbl3/igt@[email protected]
* igt@kms_plane_lowres@pipe-a-tiling-y:
- shard-iclb: [PASS][21] -> [FAIL][22] ([fdo#103166])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-iclb3/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-iclb5/igt@[email protected]
* igt@kms_psr@psr2_sprite_mmap_gtt:
- shard-iclb: [PASS][23] -> [SKIP][24] ([fdo#109441]) +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-iclb1/igt@kms_psr@psr2_sprite_mmap_gtt.html
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-apl: [PASS][25] -> [DMESG-WARN][26] ([fdo#108566]) +2 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-apl6/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-apl2/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_schedule@deep-bsd:
- shard-iclb: [SKIP][27] ([fdo#111325]) -> [PASS][28] +5 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-iclb2/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-iclb3/igt@[email protected]
* igt@gem_exec_schedule@independent-bsd1:
- shard-iclb: [SKIP][29] ([fdo#109276]) -> [PASS][30] +17 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-iclb8/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-iclb2/igt@[email protected]
* igt@kms_cursor_legacy@cursor-vs-flip-atomic:
- shard-hsw: [FAIL][31] ([fdo#103355]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-hsw6/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-hsw6/igt@[email protected]
* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
- shard-glk: [FAIL][33] ([fdo#105363]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-glk9/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-glk7/igt@[email protected]
* igt@kms_flip@dpms-vs-vblank-race:
- shard-glk: [FAIL][35] ([fdo#111609]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-glk1/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-glk4/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite:
- shard-iclb: [FAIL][37] ([fdo#103167]) -> [PASS][38] +3 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-iclb2/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-iclb4/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-kbl: [INCOMPLETE][39] ([fdo#103665]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-kbl3/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-kbl3/igt@[email protected]
* igt@kms_psr@psr2_sprite_mmap_cpu:
- shard-iclb: [SKIP][41] ([fdo#109441]) -> [PASS][42] +1 similar issue
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-iclb5/igt@kms_psr@psr2_sprite_mmap_cpu.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_cpu.html
* igt@kms_setmode@basic:
- shard-glk: [FAIL][43] ([fdo#99912]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-glk6/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-glk2/igt@[email protected]
* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-apl: [DMESG-WARN][45] ([fdo#108566]) -> [PASS][46] +3 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-apl1/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-apl8/igt@[email protected]
#### Warnings ####
* igt@gem_mocs_settings@mocs-settings-bsd2:
- shard-iclb: [SKIP][47] ([fdo#109276]) -> [FAIL][48] ([fdo#111330]) +2 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5180/shard-iclb6/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/shard-iclb1/igt@[email protected]
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108767]: https://bugs.freedesktop.org/show_bug.cgi?id=108767
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
[fdo#111609]: https://bugs.freedesktop.org/show_bug.cgi?id=111609
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (7 -> 6)
------------------------------
Missing (1): shard-skl
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5180 -> IGTPW_3455
CI-20190529: 20190529
CI_DRM_6888: 52e9cd0877ee673ba1bb80c7c7be2e53c0821084 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3455: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/
IGT_5180: 811b10e2bd7fd2cd8ced9bbb55361c178886bbbd @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3455/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev