ts/core_setmaster: new test for drop/set master semantics
PATCH v3 1/1 ts/core_setmaster: new test for drop/set master semantics
From: Emil Velikov <[email protected]>
This test adds three distinct subtests:
- drop/set master as root
- drop/set master as non-root
- drop/set master for a shared fd
Currently the second subtest will fail, with kernel patch to address that has been submitted.
v2: Add to the autotools build
v3:
- Add igt_describe()
- Use igt_fixture() for tweak_perm
- Enhance comments
--- tests/Makefile.sources | 1 + tests/core_setmaster.c | 206 +++++++++++++++++++++++++++++++++++++++++ tests/meson.build | 1 + 3 files changed, 208 insertions(+) create mode 100644 tests/core_setmaster.c
tests/Makefile.sources +1 -0
@@ -18,6 +18,7 @@ TESTS_progs = \ core_getclient \ core_getstats \ core_getversion \ + core_setmaster \ core_setmaster_vs_auth \ debugfs_test \ dmabuf \
tests/core_setmaster.c new file +206 -0
206 lines not on this page · raw message
tests/meson.build +1 -0
@@ -3,6 +3,7 @@ test_progs = [ 'core_getclient', 'core_getstats', 'core_getversion', + 'core_setmaster', 'core_setmaster_vs_auth', 'debugfs_test', 'dmabuf',
Signature · 6 lines
2.25.0 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for ts/core_setmaster: new test for drop/set master semantics (rev3)
== Series Details ==
== Series Details ==
Series: ts/core_setmaster: new test for drop/set master semantics (rev3)
URL : https://patchwork.freedesktop.org/series/73650/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8046 -> IGTPW_4245
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/index.html
Known issues
------------
Here are the changes found in IGTPW_4245 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s3:
- fi-skl-6600u: [PASS][1] -> [INCOMPLETE][2] ([i915#146] / [i915#69])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/fi-skl-6600u/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/fi-skl-6600u/igt@[email protected]
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [PASS][3] -> [DMESG-WARN][4] ([i915#44])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/fi-hsw-peppy/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/fi-hsw-peppy/igt@[email protected]
* igt@prime_vgem@basic-gtt:
- fi-tgl-y: [PASS][5] -> [DMESG-WARN][6] ([CI#94] / [i915#402]) +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/fi-tgl-y/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/fi-tgl-y/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s4-devices:
- fi-tgl-y: [FAIL][7] ([CI#94]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/fi-tgl-y/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/fi-tgl-y/igt@[email protected]
* igt@kms_addfb_basic@addfb25-modifier-no-flag:
- fi-tgl-y: [DMESG-WARN][9] ([CI#94] / [i915#402]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/fi-tgl-y/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/fi-tgl-y/igt@[email protected]
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][11] ([fdo#111096] / [i915#323]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/fi-kbl-7500u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/fi-kbl-7500u/igt@[email protected]
#### Warnings ####
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-kbl-guc: [FAIL][13] ([i915#704]) -> [SKIP][14] ([fdo#109271])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/fi-kbl-guc/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/fi-kbl-guc/igt@[email protected]
[CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[i915#146]: https://gitlab.freedesktop.org/drm/intel/issues/146
[i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#704]: https://gitlab.freedesktop.org/drm/intel/issues/704
Participating hosts (43 -> 43)
------------------------------
Additional (6): fi-bdw-5557u fi-bwr-2160 fi-snb-2520m fi-gdg-551 fi-bsw-kefka fi-snb-2600
Missing (6): fi-ilk-m540 fi-byt-squawks fi-ctg-p8600 fi-kbl-7560u fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5483 -> IGTPW_4245
CI-20190529: 20190529
CI_DRM_8046: be13ba469987146d8e75f7c07103c0a087a3b520 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4245: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/index.html
IGT_5483: 1707153df224ffb6333c6c660a792b7f334eb3d3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+igt@core_setmaster@master-drop-set-root
+igt@core_setmaster@master-drop-set-shared-fd
+igt@core_setmaster@master-drop-set-user
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✗ Fi.CI.IGT: failure for ts/core_setmaster: new test for drop/set master semantics (rev3)
In reply to Emil Velikov== Series Details ==
== Series Details ==
Series: ts/core_setmaster: new test for drop/set master semantics (rev3)
URL : https://patchwork.freedesktop.org/series/73650/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_8046_full -> IGTPW_4245_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_4245_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_4245_full, please notify your bug team 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_4245/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_4245_full:
### IGT changes ###
#### Possible regressions ####
* {igt@core_setmaster@master-drop-set-user} (NEW):
- shard-iclb: NOTRUN -> [FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb8/igt@[email protected]
- shard-kbl: NOTRUN -> [FAIL][2]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-kbl6/igt@[email protected]
- shard-snb: NOTRUN -> [FAIL][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-snb2/igt@[email protected]
- shard-tglb: NOTRUN -> [FAIL][4]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-tglb7/igt@[email protected]
- shard-apl: NOTRUN -> [FAIL][5]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-apl8/igt@[email protected]
- shard-glk: NOTRUN -> [FAIL][6]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-glk9/igt@[email protected]
- shard-hsw: NOTRUN -> [FAIL][7]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-hsw5/igt@[email protected]
* igt@perf@enable-disable:
- shard-hsw: [PASS][8] -> [FAIL][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-hsw1/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-hsw5/igt@[email protected]
New tests
---------
New tests have been introduced between CI_DRM_8046_full and IGTPW_4245_full:
### New IGT tests (3) ###
* igt@core_setmaster@master-drop-set-root:
- Statuses : 5 pass(s)
- Exec time: [0.01, 0.02] s
* igt@core_setmaster@master-drop-set-shared-fd:
- Statuses : 7 pass(s)
- Exec time: [0.01, 0.03] s
* igt@core_setmaster@master-drop-set-user:
- Statuses : 7 fail(s)
- Exec time: [0.01, 0.06] s
Known issues
------------
Here are the changes found in IGTPW_4245_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@rcs0-s3:
- shard-kbl: [PASS][10] -> [DMESG-WARN][11] ([i915#180]) +6 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-kbl7/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-kbl1/igt@[email protected]
* igt@gem_ctx_isolation@vecs0-s3:
- shard-apl: [PASS][12] -> [DMESG-WARN][13] ([i915#180])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-apl6/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-apl4/igt@[email protected]
* igt@gem_exec_schedule@implicit-both-bsd:
- shard-iclb: [PASS][14] -> [SKIP][15] ([i915#677]) +1 similar issue
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb7/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb4/igt@[email protected]
* igt@gem_exec_schedule@preempt-bsd:
- shard-iclb: [PASS][16] -> [SKIP][17] ([fdo#112146]) +2 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb3/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb4/igt@[email protected]
* igt@gem_exec_whisper@basic-queues-priority-all:
- shard-glk: [PASS][18] -> [DMESG-WARN][19] ([i915#118] / [i915#95])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-glk2/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-glk3/igt@[email protected]
* igt@gem_userptr_blits@sync-unmap-after-close:
- shard-apl: [PASS][20] -> [DMESG-WARN][21] ([fdo#111870] / [i915#211] / [i915#836])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-apl3/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-apl7/igt@[email protected]
* igt@i915_pm_dc@dc6-dpms:
- shard-iclb: [PASS][22] -> [FAIL][23] ([i915#454])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb2/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb3/igt@[email protected]
* igt@i915_pm_rpm@pm-tiling:
- shard-hsw: [PASS][24] -> [SKIP][25] ([fdo#109271]) +1 similar issue
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-hsw6/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-hsw5/igt@[email protected]
- shard-tglb: [PASS][26] -> [SKIP][27] ([i915#1316])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-tglb3/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-tglb8/igt@[email protected]
- shard-glk: [PASS][28] -> [SKIP][29] ([fdo#109271]) +1 similar issue
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-glk4/igt@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-glk6/igt@[email protected]
- shard-iclb: [PASS][30] -> [SKIP][31] ([i915#1316])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb7/igt@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb1/igt@[email protected]
* igt@i915_pm_rps@waitboost:
- shard-iclb: [PASS][32] -> [FAIL][33] ([i915#413])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb2/igt@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb6/igt@[email protected]
* igt@kms_color@pipe-c-legacy-gamma:
- shard-kbl: [PASS][34] -> [FAIL][35] ([i915#71])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-kbl3/igt@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-kbl3/igt@[email protected]
- shard-apl: [PASS][36] -> [FAIL][37] ([i915#71])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-apl4/igt@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-apl7/igt@[email protected]
* igt@kms_plane_lowres@pipe-a-tiling-y:
- shard-glk: [PASS][38] -> [FAIL][39] ([i915#899])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-glk9/igt@[email protected]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-glk2/igt@[email protected]
* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [PASS][40] -> [SKIP][41] ([fdo#109441]) +6 similar issues
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb5/igt@kms_psr@psr2_primary_mmap_cpu.html
* igt@kms_vblank@pipe-a-accuracy-idle:
- shard-glk: [PASS][42] -> [FAIL][43] ([i915#43])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-glk3/igt@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-glk2/igt@[email protected]
* igt@kms_vblank@pipe-b-ts-continuation-dpms-rpm:
- shard-iclb: [PASS][44] -> [SKIP][45] ([fdo#109278])
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb8/igt@[email protected]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb1/igt@[email protected]
- shard-tglb: [PASS][46] -> [SKIP][47] ([fdo#112015])
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-tglb5/igt@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-tglb8/igt@[email protected]
* igt@perf_pmu@busy-no-semaphores-vcs1:
- shard-iclb: [PASS][48] -> [SKIP][49] ([fdo#112080]) +13 similar issues
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb4/igt@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb3/igt@[email protected]
* igt@prime_busy@hang-bsd2:
- shard-iclb: [PASS][50] -> [SKIP][51] ([fdo#109276]) +21 similar issues
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb2/igt@[email protected]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb8/igt@[email protected]
#### Possible fixes ####
* igt@gem_busy@busy-vcs1:
- shard-iclb: [SKIP][52] ([fdo#112080]) -> [PASS][53] +10 similar issues
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb7/igt@[email protected]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb2/igt@[email protected]
* igt@gem_ctx_shared@exec-single-timeline-bsd:
- shard-iclb: [SKIP][54] ([fdo#110841]) -> [PASS][55]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb4/igt@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb6/igt@[email protected]
* igt@gem_exec_schedule@implicit-write-read-bsd1:
- shard-iclb: [SKIP][56] ([fdo#109276] / [i915#677]) -> [PASS][57] +1 similar issue
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb6/igt@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb4/igt@[email protected]
* igt@gem_exec_schedule@independent-bsd2:
- shard-iclb: [SKIP][58] ([fdo#109276]) -> [PASS][59] +12 similar issues
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb3/igt@[email protected]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb4/igt@[email protected]
* igt@gem_exec_schedule@pi-distinct-iova-bsd:
- shard-iclb: [SKIP][60] ([i915#677]) -> [PASS][61]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb4/igt@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb7/igt@[email protected]
* igt@gem_exec_schedule@reorder-wide-bsd:
- shard-iclb: [SKIP][62] ([fdo#112146]) -> [PASS][63] +5 similar issues
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb2/igt@[email protected]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb8/igt@[email protected]
* igt@gem_exec_whisper@basic-queues-forked:
- shard-apl: [INCOMPLETE][64] ([fdo#103927]) -> [PASS][65]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-apl4/igt@[email protected]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-apl8/igt@[email protected]
* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-tglb: [FAIL][66] ([i915#644]) -> [PASS][67]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-tglb6/igt@[email protected]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-tglb1/igt@[email protected]
- shard-kbl: [FAIL][68] ([i915#644]) -> [PASS][69]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-kbl1/igt@[email protected]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-kbl1/igt@[email protected]
* igt@gen9_exec_parse@allowed-all:
- shard-glk: [DMESG-WARN][70] ([i915#716]) -> [PASS][71]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-glk9/igt@[email protected]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-glk2/igt@[email protected]
* igt@i915_pm_rpm@debugfs-forcewake-user:
- shard-hsw: [SKIP][72] ([fdo#109271]) -> [PASS][73]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-hsw6/igt@[email protected]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-hsw6/igt@[email protected]
- shard-iclb: [SKIP][74] ([i915#1316]) -> [PASS][75]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb2/igt@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb2/igt@[email protected]
- shard-tglb: [SKIP][76] ([i915#1316]) -> [PASS][77]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-tglb7/igt@[email protected]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-tglb7/igt@[email protected]
- shard-glk: [SKIP][78] ([fdo#109271]) -> [PASS][79]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-glk3/igt@[email protected]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-glk3/igt@[email protected]
* igt@i915_suspend@fence-restore-untiled:
- shard-kbl: [INCOMPLETE][80] ([fdo#103665]) -> [PASS][81]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-kbl1/igt@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-kbl6/igt@[email protected]
* igt@kms_cursor_crc@pipe-b-cursor-suspend:
- shard-kbl: [DMESG-WARN][82] ([i915#180]) -> [PASS][83] +1 similar issue
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-kbl1/igt@[email protected]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-kbl4/igt@[email protected]
* igt@kms_cursor_legacy@flip-vs-cursor-legacy:
- shard-iclb: [FAIL][84] ([IGT#5]) -> [PASS][85]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb2/igt@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb5/igt@[email protected]
* igt@kms_fbcon_fbt@fbc-suspend:
- shard-apl: [DMESG-WARN][86] ([i915#180]) -> [PASS][87]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-apl1/igt@[email protected]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-apl4/igt@[email protected]
* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
- shard-glk: [FAIL][88] ([i915#79]) -> [PASS][89]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-glk9/igt@[email protected]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-glk5/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-wc:
- shard-snb: [SKIP][90] ([fdo#109271]) -> [PASS][91]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-snb6/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-wc.html
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-snb2/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-wc.html
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-pwrite:
- shard-glk: [FAIL][92] ([i915#49]) -> [PASS][93]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-glk5/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-pwrite.html
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-glk2/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-pwrite.html
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-render:
- shard-tglb: [SKIP][94] ([i915#668]) -> [PASS][95] +6 similar issues
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-tglb2/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-render.html
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-tglb2/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-render.html
* igt@kms_psr@psr2_basic:
- shard-iclb: [SKIP][96] ([fdo#109441]) -> [PASS][97] +1 similar issue
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-iclb6/igt@kms_psr@psr2_basic.html
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-iclb2/igt@kms_psr@psr2_basic.html
* igt@kms_setmode@basic:
- shard-kbl: [FAIL][98] ([i915#31]) -> [PASS][99]
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-kbl7/igt@[email protected]
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-kbl7/igt@[email protected]
* igt@perf@oa-exponents:
- shard-glk: [FAIL][100] ([i915#84]) -> [PASS][101]
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-glk5/igt@[email protected]
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-glk2/igt@[email protected]
* igt@perf@short-reads:
- shard-hsw: [FAIL][102] ([i915#51]) -> [PASS][103]
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-hsw6/igt@[email protected]
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-hsw6/igt@[email protected]
#### Warnings ####
* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
- shard-snb: [DMESG-WARN][104] ([fdo#110789] / [fdo#111870] / [i915#478]) -> [DMESG-WARN][105] ([fdo#111870] / [i915#478])
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-snb5/igt@[email protected]
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-snb2/igt@[email protected]
- shard-hsw: [DMESG-WARN][106] ([fdo#110789] / [fdo#111870]) -> [DMESG-WARN][107] ([fdo#111870])
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-hsw5/igt@[email protected]
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-hsw1/igt@[email protected]
* igt@i915_pm_rpm@drm-resources-equal:
- shard-snb: [SKIP][108] ([fdo#109271]) -> [INCOMPLETE][109] ([i915#82])
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-snb2/igt@[email protected]
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-snb5/igt@[email protected]
* igt@runner@aborted:
- shard-apl: [FAIL][110] ([fdo#103927]) -> ([FAIL][111], [FAIL][112]) ([fdo#103927] / [fdo#111870] / [i915#211] / [i915#771])
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8046/shard-apl6/igt@[email protected]
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-apl2/igt@[email protected]
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/shard-apl7/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[IGT#5]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/5
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110789]: https://bugs.freedesktop.org/show_bug.cgi?id=110789
[fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#112015]: https://bugs.freedesktop.org/show_bug.cgi?id=112015
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1316]: https://gitlab.freedesktop.org/drm/intel/issues/1316
[i915#1356]: https://gitlab.freedesktop.org/drm/intel/issues/1356
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#211]: https://gitlab.freedesktop.org/drm/intel/issues/211
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
[i915#43]: https://gitlab.freedesktop.org/drm/intel/issues/43
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#478]: https://gitlab.freedesktop.org/drm/intel/issues/478
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#51]: https://gitlab.freedesktop.org/drm/intel/issues/51
[i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
[i915#668]: https://gitlab.freedesktop.org/drm/intel/issues/668
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#71]: https://gitlab.freedesktop.org/drm/intel/issues/71
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#771]: https://gitlab.freedesktop.org/drm/intel/issues/771
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
[i915#836]: https://gitlab.freedesktop.org/drm/intel/issues/836
[i915#84]: https://gitlab.freedesktop.org/drm/intel/issues/84
[i915#899]: https://gitlab.freedesktop.org/drm/intel/issues/899
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (10 -> 8)
------------------------------
Missing (2): pig-skl-6260u pig-glk-j5005
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5483 -> IGTPW_4245
* Piglit: piglit_4509 -> None
CI-20190529: 20190529
CI_DRM_8046: be13ba469987146d8e75f7c07103c0a087a3b520 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4245: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/index.html
IGT_5483: 1707153df224ffb6333c6c660a792b7f334eb3d3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4245/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 93 lines · Emil Velikov
From: Emil Velikov <[email protected]>
This test adds three distinct subtests:
- drop/set master as root
- drop/set master as non-root
- drop/set master for a shared fdCurrently the second subtest will fail, with kernel patch to address that has been submitted.
v2: Add to the autotools build
v3:
- Addigt_describe()
- Useigt_fixture()fortweak_perm
- Enhance commentsCc Petri Latvala <[email protected]>Signed-off-by Emil Velikov <[email protected]>--- tests/Makefile.sources | 1 + tests/core_setmaster.c | 206 +++++++++++++++++++++++++++++++++++++++++ tests/meson.build | 1 + 3 files changed, 208 insertions(+) create mode 100644 tests/core_setmaster.ctests/Makefile.sources +1
-0@@ -18,6 +18,7 @@ TESTS_progs = \ core_getclient \ core_getstats \ core_getversion \ + core_setmaster \ core_setmaster_vs_auth \ debugfs_test \ dmabuf \tests/core_setmaster.c new file +50
-0@@ -0,0 +1,206 @@ +/* +* Copyright © 2020 Collabora, Ltd. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +* IN THE SOFTWARE. +* +* Authors: +* Emil Velikov <[email protected]> +* +*/ + +/* +* Testcase: Check that drop/setMaster behaves correctly wrt root/user access +* +* Test checks if the ioctls succeed or fail, depending if the applications was +* run with root, user privileges or if we have separate privileged arbitrator. +*/ + +#include "igt.h" +#include <unistd.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <sys/stat.h> + +IGT_TEST_DESCRIPTION ("Check that Drop/SetMaster behaves correctly wrt root/user" +" access" ); + +static bool is_master (int fd) +{ +/* FIXME: replace with drmIsMaster once we bumped libdrm version */ +return drmAuthMagic (fd,0 ) != -EACCES ; +} +
tests/core_setmaster.c line 60
Quoted 10 lines
tests/core_setmaster.c new file +10
-0+static void check_drop_set (void ) +{ +int master; + + master =__drm_open_driver (DRIVER_ANY ); + +/* Ensure we have a valid device. This is _extremely_ unlikely to +* trigger as tweak_perm() aims to ensure we have the correct rights. +* Although: +* - according to the manual igt_drop_root() + igt_skip() is broken
I asked for clarification on this and didn't get a reply. I'm not seeing such a mention. Well, there is the text warning about igt_drop_root() and atexit handlers and recommending the use of igt_drop_root() in a child process to avoid issues, and this is in a child process.
Whatever I'm missing here surely also applies to igt_assert as well?
tests/core_setmaster.c line 62
Quoted 2 lines
tests/core_setmaster.c new file +2
-0+* - there is _no_ guarantee that we'll open a device handled by +* tweak_perm()
This is a point that came to mind later, the building blocks for that guarantee are in igt_device_scan.
1) If filter already set (test being run with --device), use that filter (igt_device_filter_get or so). Otherwise loop through the generated card%u names, using drm:/dev/dri/card%u as the filter. igt_device_scan.c stuff already has a list of all possible devices but I don't see an easy way to get to the list.
2) igt_device_card_match() gets you a card
3) card->card should be the path to /dev/dri to chmod on
4) igt_open_card(card) gives you an fd to that card
tests/core_setmaster.c line 63
Quoted 1 line
tests/core_setmaster.c new file +1
-0+* - having a device is integral part of the test
It's an integral part of all tests. The issue with the use of igt_require vs igt_assert is whether it's a prerequisite or the thing you're actually testing.
tests/core_setmaster.c line 71
Quoted 8 lines
tests/core_setmaster.c new file +8
-0+*/ +igt_assert_neq (master,-1 ); + +/* At this point we're master capable due to: +* - being root - always +* - normal user - as the only drm only drm client (on this VT) +*/ +igt_assert_eq (is_master (master), true);
Just igt_assert(is_master(master))
Signature · 5 lines
Petri Latvala _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 112 lines · Petri Latvala
Quoted 93 lines · Emil Velikov
From: Emil Velikov <[email protected]>
This test adds three distinct subtests:
- drop/set master as root
- drop/set master as non-root
- drop/set master for a shared fdCurrently the second subtest will fail, with kernel patch to address that has been submitted.
v2: Add to the autotools build
v3:
- Addigt_describe()
- Useigt_fixture()fortweak_perm
- Enhance commentsCc Petri Latvala <[email protected]>Signed-off-by Emil Velikov <[email protected]>--- tests/Makefile.sources | 1 + tests/core_setmaster.c | 206 +++++++++++++++++++++++++++++++++++++++++ tests/meson.build | 1 + 3 files changed, 208 insertions(+) create mode 100644 tests/core_setmaster.ctests/Makefile.sources +1
-0@@ -18,6 +18,7 @@ TESTS_progs = \ core_getclient \ core_getstats \ core_getversion \ + core_setmaster \ core_setmaster_vs_auth \ debugfs_test \ dmabuf \tests/core_setmaster.c new file +50
-0@@ -0,0 +1,206 @@ +/* +* Copyright © 2020 Collabora, Ltd. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +* IN THE SOFTWARE. +* +* Authors: +* Emil Velikov <[email protected]> +* +*/ + +/* +* Testcase: Check that drop/setMaster behaves correctly wrt root/user access +* +* Test checks if the ioctls succeed or fail, depending if the applications was +* run with root, user privileges or if we have separate privileged arbitrator. +*/ + +#include "igt.h" +#include <unistd.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <sys/stat.h> + +IGT_TEST_DESCRIPTION ("Check that Drop/SetMaster behaves correctly wrt root/user" +" access" ); + +static bool is_master (int fd) +{ +/* FIXME: replace with drmIsMaster once we bumped libdrm version */ +return drmAuthMagic (fd,0 ) != -EACCES ; +} +tests/core_setmaster.c line 60
Quoted 10 lines
tests/core_setmaster.c new file +10
-0+static void check_drop_set (void ) +{ +int master; + + master =__drm_open_driver (DRIVER_ANY ); + +/* Ensure we have a valid device. This is _extremely_ unlikely to +* trigger as tweak_perm() aims to ensure we have the correct rights. +* Although: +* - according to the manual igt_drop_root() + igt_skip() is broken I asked for clarification on this and didn't get a reply. I'm not seeing such a mention. Well, there is the text warning about
igt_drop_root()and atexit handlers and recommending the use ofigt_drop_root()in a child process to avoid issues, and this is in a child process.
Quoted 2 lines
Whatever I'm missing here surely also applies to
igt_assertas well?
Darn it ... got the wrong function which explains the confusion.
In particular igt_skip() isn't propagated properly within a igt_fork(), as documented [1].
This results in a) the test failing [2] (instead of skipping) with b) semi-magical trace.
If the IGT team is happy with those pitfalls, I can switch to igt_require :-)
[1] https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/lib/igt_core.h#L1045
[2] igt_skip: Assertion "!test_child failed
Quoted 13 lines
tests/core_setmaster.c line 62
Quoted 3 lines
tests/core_setmaster.c new file +2
-0+* - there is _no_ guarantee that we'll open a device handled by +* tweak_perm() This is a point that came to mind later, the building blocks for that guarantee are in
igt_device_scan.1) If filter already set (test being run with --device), use that filter (
igt_device_filter_getor so). Otherwise loop through the generated card%u names, using drm:/dev/dri/card%u as the filter.igt_device_scan.cstuff already has a list of all possible devices but I don't see an easy way to get to the list.
Quoted 6 lines
2)
igt_device_card_match()gets you a card3)
card->cardshould be the path to/dev/drito chmod on4)
igt_open_card(card)gives you an fd to that card
Not entirely sure what you're suggesting here. Can you please elaborate?
Quoted 7 lines
tests/core_setmaster.c line 63
Quoted 2 lines
tests/core_setmaster.c new file +1
-0+* - having a device is integral part of the test It's an integral part of all tests. The issue with the use of
igt_requirevsigt_assertis whether it's a prerequisite or the thing you're actually testing.
The latter. I can reword that comment to "successfully opening a device is part of the test" or anything that you'd prefer.
Quoted 10 lines
tests/core_setmaster.c line 71
Quoted 9 lines
tests/core_setmaster.c new file +8
-0+*/ +igt_assert_neq (master,-1 ); + +/* At this point we're master capable due to: +* - being root - always +* - normal user - as the only drm only drm client (on this VT) +*/ +igt_assert_eq (is_master (master), true);
Quoted 2 lines
Just igt_assert(is_master(master))
Sure fixed, alongside the s/ts/test/ type in the summary.
Is there some dos and don'ts about which igt_assert* functions to use? Would it make sense to write short list + mass conversion to the recommended ones?
Thanks
Emil
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 122 lines · Emil Velikov
Quoted 112 lines · Petri Latvala
Quoted 93 lines · Emil Velikov
From: Emil Velikov <[email protected]>
This test adds three distinct subtests:
- drop/set master as root
- drop/set master as non-root
- drop/set master for a shared fdCurrently the second subtest will fail, with kernel patch to address that has been submitted.
v2: Add to the autotools build
v3:
- Addigt_describe()
- Useigt_fixture()fortweak_perm
- Enhance commentsCc Petri Latvala <[email protected]>Signed-off-by Emil Velikov <[email protected]>--- tests/Makefile.sources | 1 + tests/core_setmaster.c | 206 +++++++++++++++++++++++++++++++++++++++++ tests/meson.build | 1 + 3 files changed, 208 insertions(+) create mode 100644 tests/core_setmaster.ctests/Makefile.sources +1
-0@@ -18,6 +18,7 @@ TESTS_progs = \ core_getclient \ core_getstats \ core_getversion \ + core_setmaster \ core_setmaster_vs_auth \ debugfs_test \ dmabuf \tests/core_setmaster.c new file +50
-0@@ -0,0 +1,206 @@ +/* +* Copyright © 2020 Collabora, Ltd. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +* IN THE SOFTWARE. +* +* Authors: +* Emil Velikov <[email protected]> +* +*/ + +/* +* Testcase: Check that drop/setMaster behaves correctly wrt root/user access +* +* Test checks if the ioctls succeed or fail, depending if the applications was +* run with root, user privileges or if we have separate privileged arbitrator. +*/ + +#include "igt.h" +#include <unistd.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <sys/stat.h> + +IGT_TEST_DESCRIPTION ("Check that Drop/SetMaster behaves correctly wrt root/user" +" access" ); + +static bool is_master (int fd) +{ +/* FIXME: replace with drmIsMaster once we bumped libdrm version */ +return drmAuthMagic (fd,0 ) != -EACCES ; +} +tests/core_setmaster.c line 60
Quoted 10 lines
tests/core_setmaster.c new file +10
-0+static void check_drop_set (void ) +{ +int master; + + master =__drm_open_driver (DRIVER_ANY ); + +/* Ensure we have a valid device. This is _extremely_ unlikely to +* trigger as tweak_perm() aims to ensure we have the correct rights. +* Although: +* - according to the manual igt_drop_root() + igt_skip() is broken I asked for clarification on this and didn't get a reply. I'm not seeing such a mention. Well, there is the text warning about
igt_drop_root()and atexit handlers and recommending the use ofigt_drop_root()in a child process to avoid issues, and this is in a child process.Quoted 2 lines
Whatever I'm missing here surely also applies to
igt_assertas well?Darn it ... got the wrong function which explains the confusion.
In particular
igt_skip()isn't propagated properly within aigt_fork(), as documented [1].
This results in a) the test failing [2] (instead of skipping) with b) semi-magical trace.
Quoted 4 lines
If the IGT team is happy with those pitfalls, I can switch to
igt_require:-)[1] https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/lib/igt_core.h#L1045
[2]igt_skip: Assertion"!test_childfailed
Ah, now I see!
Indeed skip isn't propagated properly and we should get that fixed at some point. No need to hold your patch as hostage though.
With a comment that states that skip is not properly propagated from child processes, keep the igt_assert and __drm_open_driver() usage in check_drop_set(). There's igt_assert_fd() btw for a shorthand check for fd != -1.
The second subtest can use igt_require though, by way of using drm_open_driver().
Quoted 15 lines
Quoted 15 lines
tests/core_setmaster.c line 62
Quoted 5 lines
tests/core_setmaster.c new file +2
-0+* - there is _no_ guarantee that we'll open a device handled by +* tweak_perm() This is a point that came to mind later, the building blocks for that guarantee are in
igt_device_scan.1) If filter already set (test being run with --device), use that filter (
igt_device_filter_getor so). Otherwise loop through the generated card%u names, using drm:/dev/dri/card%u as the filter.igt_device_scan.cstuff already has a list of all possible devices but I don't see an easy way to get to the list.
Quoted 7 lines
Quoted 6 lines
2)
igt_device_card_match()gets you a card3)
card->cardshould be the path to/dev/drito chmod on4)
igt_open_card(card)gives you an fd to that cardNot entirely sure what you're suggesting here. Can you please elaborate?
lib/igt_device_scan.[ch] is for device selection and you can use that to make sure chown has hit the device drm_open_driver() is opening. Although I wrote that comment thinking you only chmod one of them but that was a misreading from my part, ignore this comment. You chmod all of them. Even with --device usage chmoding all devices will ensure the only way for chmodding not to be done is not having the proper kernel modules modprobed. Which drm_open_driver will do. Yikes.
Which luckily brings us to the best of both worlds. In the igt_fixture before the first subtest:
/* Ensure modules are loaded and the device file exists */ close(drm_open_driver(DRIVER_ANY));
Now having the igt_assert (as opposed to igt_require()) in the child process makes even more sense.
Quoted 10 lines
Quoted 8 lines
tests/core_setmaster.c line 63
Quoted 3 lines
tests/core_setmaster.c new file +1
-0+* - having a device is integral part of the test It's an integral part of all tests. The issue with the use of
igt_requirevsigt_assertis whether it's a prerequisite or the thing you're actually testing.The latter. I can reword that comment to "successfully opening a device is part of the test" or anything that you'd prefer.
I would prefer that yes. The skip propagation is enough to justify igt_assert though. And having that module reloading drm_open_driver() in the fixture.
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
tests/core_setmaster.c new file +8
-0+*/ +igt_assert_neq (master,-1 ); + +/* At this point we're master capable due to: +* - being root - always +* - normal user - as the only drm only drm client (on this VT) +*/ +igt_assert_eq (is_master (master), true);
Quoted 7 lines
Quoted 2 lines
Just igt_assert(is_master(master))
Sure fixed, alongside the s/ts/test/ type in the summary.
Is there some dos and don'ts about which igt_assert* functions to use? Would it make sense to write short list + mass conversion to the recommended ones?
In general, use igt_assert_eq(x, y) instead of igt_assert(x == y) to get better error messages on failure, as it prints the values of both operands. However, for values that are already just booleans, plain igt_assert() reads a bit better.
Signature · 5 lines
Petri Latvala _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 126 lines · Petri Latvala
Quoted 124 lines · Emil Velikov
Quoted 112 lines · Petri Latvala
Quoted 93 lines · Emil Velikov
From: Emil Velikov <[email protected]>
This test adds three distinct subtests:
- drop/set master as root
- drop/set master as non-root
- drop/set master for a shared fdCurrently the second subtest will fail, with kernel patch to address that has been submitted.
v2: Add to the autotools build
v3:
- Addigt_describe()
- Useigt_fixture()fortweak_perm
- Enhance commentsCc Petri Latvala <[email protected]>Signed-off-by Emil Velikov <[email protected]>--- tests/Makefile.sources | 1 + tests/core_setmaster.c | 206 +++++++++++++++++++++++++++++++++++++++++ tests/meson.build | 1 + 3 files changed, 208 insertions(+) create mode 100644 tests/core_setmaster.ctests/Makefile.sources +1
-0@@ -18,6 +18,7 @@ TESTS_progs = \ core_getclient \ core_getstats \ core_getversion \ + core_setmaster \ core_setmaster_vs_auth \ debugfs_test \ dmabuf \tests/core_setmaster.c new file +50
-0@@ -0,0 +1,206 @@ +/* +* Copyright © 2020 Collabora, Ltd. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +* IN THE SOFTWARE. +* +* Authors: +* Emil Velikov <[email protected]> +* +*/ + +/* +* Testcase: Check that drop/setMaster behaves correctly wrt root/user access +* +* Test checks if the ioctls succeed or fail, depending if the applications was +* run with root, user privileges or if we have separate privileged arbitrator. +*/ + +#include "igt.h" +#include <unistd.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <sys/stat.h> + +IGT_TEST_DESCRIPTION ("Check that Drop/SetMaster behaves correctly wrt root/user" +" access" ); + +static bool is_master (int fd) +{ +/* FIXME: replace with drmIsMaster once we bumped libdrm version */ +return drmAuthMagic (fd,0 ) != -EACCES ; +} +tests/core_setmaster.c line 60
Quoted 10 lines
tests/core_setmaster.c new file +10
-0+static void check_drop_set (void ) +{ +int master; + + master =__drm_open_driver (DRIVER_ANY ); + +/* Ensure we have a valid device. This is _extremely_ unlikely to +* trigger as tweak_perm() aims to ensure we have the correct rights. +* Although: +* - according to the manual igt_drop_root() + igt_skip() is broken I asked for clarification on this and didn't get a reply. I'm not seeing such a mention. Well, there is the text warning about
igt_drop_root()and atexit handlers and recommending the use ofigt_drop_root()in a child process to avoid issues, and this is in a child process.Quoted 2 lines
Whatever I'm missing here surely also applies to
igt_assertas well?Darn it ... got the wrong function which explains the confusion.
In particular
igt_skip()isn't propagated properly within aigt_fork(), as documented [1].
This results in a) the test failing [2] (instead of skipping) with b) semi-magical trace.If the IGT team is happy with those pitfalls, I can switch to
igt_require:-)
Quoted 8 lines
Quoted 2 lines
[1] https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/lib/igt_core.h#L1045
[2]igt_skip: Assertion"!test_childfailedAh, now I see!
Indeed skip isn't propagated properly and we should get that fixed at some point. No need to hold your patch as hostage though.
AFAICT I'm the only person who ever dares running tests as non-root, which explains the current state ;-)
Quoted 3 lines
With a comment that states that skip is not properly propagated from child processes, keep the
igt_assertand__drm_open_driver()usage incheck_drop_set().
Ack, comment tweaked.
Quoted 3 lines
There's
igt_assert_fd()btw for a shorthand check
for fd != -1.
See my comment below.
Quoted 3 lines
The second subtest can use
igt_requirethough, by way of usingdrm_open_driver().
Do you really mean "second" aka "master-drop-set-user" here? Above you're agree with using igt_assert(), yet here you suggest (again) for igt_require()...
I'm confused :-\
drm_open_driver() does not look like a good solution here. In particular we're testing core DRM functionality so anything GEM (like in the embedded gem_quiescent_gpu call) is irrelevant.
Additionally, both gem_quiescent_gpu and the atexit handler require root to drop the caches, et al.
Thinking about it, you're likely talking about the 3rd subtest aka "master-drop-set-shared-fd". Sure we can use igt_require() there, although I'd rather keep the__drm_open_driver() + igt_require() combination.
Do you agree?
Quoted 32 lines
Quoted 16 lines
Quoted 16 lines
tests/core_setmaster.c line 62
Quoted 6 lines
tests/core_setmaster.c new file +2
-0+* - there is _no_ guarantee that we'll open a device handled by +* tweak_perm() This is a point that came to mind later, the building blocks for that guarantee are in
igt_device_scan.1) If filter already set (test being run with --device), use that filter (
igt_device_filter_getor so). Otherwise loop through the generated card%u names, using drm:/dev/dri/card%u as the filter.igt_device_scan.cstuff already has a list of all possible devices but I don't see an easy way to get to the list.Quoted 7 lines
Quoted 6 lines
2)
igt_device_card_match()gets you a card3)
card->cardshould be the path to/dev/drito chmod on4)
igt_open_card(card)gives you an fd to that cardNot entirely sure what you're suggesting here. Can you please elaborate?
lib/igt_device_scan.[ch] is for device selection and you can use that to make sure chown has hit the device
drm_open_driver()is opening. Although I wrote that comment thinking you only chmod one of them but that was a misreading from my part, ignore this comment. You chmod all of them. Even with --device usage chmoding all devices will ensure the only way for chmodding not to be done is not having the proper kernel modules modprobed. Whichdrm_open_driverwill do. Yikes.
Quoted 9 lines
Which luckily brings us to the best of both worlds. In the
igt_fixturebefore the first subtest:/* Ensure modules are loaded and the device file exists */ close(drm_open_driver(DRIVER_ANY));
Now having the
igt_assert(as opposed toigt_require()) in the child process makes even more sense.
Thinking about it close(drm_open_driver(...)) looks like a workaround, instead of addressing the issue.
Even though it seems like it might work, the modprobe machinery seems partial:
- in the non i915 case, modprobe failure is a _debug_ message
- the DRIVER_FOO to module name mapping is partial
- for some drivers, the module name differs from the name in drmGetVersion()
- some drivers have changed their module name
So I'd suggest omitting the workaround and leaving the igt_assert() in check_drop_set() do it's job.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
tests/core_setmaster.c line 63
Quoted 4 lines
tests/core_setmaster.c new file +1
-0+* - having a device is integral part of the test It's an integral part of all tests. The issue with the use of
igt_requirevsigt_assertis whether it's a prerequisite or the thing you're actually testing.
Quoted 7 lines
Quoted 2 lines
The latter. I can reword that comment to "successfully opening a device is part of the test" or anything that you'd prefer.
I would prefer that yes. The skip propagation is enough to justify
igt_assertthough. And having that module reloadingdrm_open_driver()in the fixture.
Comment fixed.
Quoted 16 lines
Quoted 16 lines
Quoted 12 lines
tests/core_setmaster.c line 71
Quoted 11 lines
tests/core_setmaster.c new file +8
-0+*/ +igt_assert_neq (master,-1 ); + +/* At this point we're master capable due to: +* - being root - always +* - normal user - as the only drm only drm client (on this VT) +*/ +igt_assert_eq (is_master (master), true);Quoted 2 lines
Just igt_assert(is_master(master))
Sure fixed, alongside the s/ts/test/ type in the summary.
Quoted 9 lines
Quoted 3 lines
Is there some dos and don'ts about which igt_assert* functions to use? Would it make sense to write short list + mass conversion to the recommended ones?
In general, use
igt_assert_eq(x, y)instead ofigt_assert(x == y)to get better error messages on failure, as it prints the values of both operands. However, for values that are already just booleans, plainigt_assert()reads a bit better.
From a quick look:
- 700+ instances of igt_assert(... == ...)
- 200+ instances of igt_assert(... != ...)
- 10+ instances of igt_assert_[n]eq(... {true,false})
- 200+ instances of igt_assert_fd permutations >= 0, < 0, -1
While I agree on the readability aspect, as-is we're in a pretty weird spot. How about we a) document b) add basic CI plumbing (so reviewers don't need to spend brain cycles) and c) update the existing codebase in few large commits?
None of which seems like a blocker for this patch IMHO. Although I can produce a follow-up patch or two addressing some of the inconsistencies.
-Emil
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 130 lines · Emil Velikov
Quoted 129 lines · Petri Latvala
Quoted 126 lines · Emil Velikov
Quoted 112 lines · Petri Latvala
Quoted 93 lines · Emil Velikov
From: Emil Velikov <[email protected]>
This test adds three distinct subtests:
- drop/set master as root
- drop/set master as non-root
- drop/set master for a shared fdCurrently the second subtest will fail, with kernel patch to address that has been submitted.
v2: Add to the autotools build
v3:
- Addigt_describe()
- Useigt_fixture()fortweak_perm
- Enhance commentsCc Petri Latvala <[email protected]>Signed-off-by Emil Velikov <[email protected]>--- tests/Makefile.sources | 1 + tests/core_setmaster.c | 206 +++++++++++++++++++++++++++++++++++++++++ tests/meson.build | 1 + 3 files changed, 208 insertions(+) create mode 100644 tests/core_setmaster.ctests/Makefile.sources +1
-0@@ -18,6 +18,7 @@ TESTS_progs = \ core_getclient \ core_getstats \ core_getversion \ + core_setmaster \ core_setmaster_vs_auth \ debugfs_test \ dmabuf \tests/core_setmaster.c new file +50
-0@@ -0,0 +1,206 @@ +/* +* Copyright © 2020 Collabora, Ltd. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +* IN THE SOFTWARE. +* +* Authors: +* Emil Velikov <[email protected]> +* +*/ + +/* +* Testcase: Check that drop/setMaster behaves correctly wrt root/user access +* +* Test checks if the ioctls succeed or fail, depending if the applications was +* run with root, user privileges or if we have separate privileged arbitrator. +*/ + +#include "igt.h" +#include <unistd.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <sys/stat.h> + +IGT_TEST_DESCRIPTION ("Check that Drop/SetMaster behaves correctly wrt root/user" +" access" ); + +static bool is_master (int fd) +{ +/* FIXME: replace with drmIsMaster once we bumped libdrm version */ +return drmAuthMagic (fd,0 ) != -EACCES ; +} +tests/core_setmaster.c line 60
Quoted 10 lines
tests/core_setmaster.c new file +10
-0+static void check_drop_set (void ) +{ +int master; + + master =__drm_open_driver (DRIVER_ANY ); + +/* Ensure we have a valid device. This is _extremely_ unlikely to +* trigger as tweak_perm() aims to ensure we have the correct rights. +* Although: +* - according to the manual igt_drop_root() + igt_skip() is broken I asked for clarification on this and didn't get a reply. I'm not seeing such a mention. Well, there is the text warning about
igt_drop_root()and atexit handlers and recommending the use ofigt_drop_root()in a child process to avoid issues, and this is in a child process.Quoted 2 lines
Whatever I'm missing here surely also applies to
igt_assertas well?Darn it ... got the wrong function which explains the confusion.
In particular
igt_skip()isn't propagated properly within aigt_fork(), as documented [1].
This results in a) the test failing [2] (instead of skipping) with b) semi-magical trace.If the IGT team is happy with those pitfalls, I can switch to
igt_require:-)[1] https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/lib/igt_core.h#L1045
[2]igt_skip: Assertion"!test_childfailed
Quoted 7 lines
Quoted 5 lines
Ah, now I see!
Indeed skip isn't propagated properly and we should get that fixed at some point. No need to hold your patch as hostage though.
AFAICT I'm the only person who ever dares running tests as non-root, which explains the current state ;-)
Yeah generally we just assume tests are run as root and we lack the necessary checks on the tests that do require root. =(
Quoted 11 lines
Quoted 3 lines
With a comment that states that skip is not properly propagated from child processes, keep the
igt_assertand__drm_open_driver()usage incheck_drop_set().Ack, comment tweaked.
Quoted 3 lines
There's
igt_assert_fd()btw for a shorthand check
for fd != -1.See my comment below.
Quoted 8 lines
Quoted 3 lines
The second subtest can use
igt_requirethough, by way of usingdrm_open_driver().Do you really mean "second" aka "master-drop-set-user" here? Above you're agree with using
igt_assert(), yet here you suggest (again) forigt_require()...I'm confused :-\
Sorry, the first subtest is so small that it slipped from my eyes. I mean the last subtest, the shared-fd one. The one that opens the driver in the main process.
Quoted 8 lines
drm_open_driver()does not look like a good solution here. In particular we're testing core DRM functionality so anything GEM (like in the embeddedgem_quiescent_gpucall) is irrelevant.Additionally, both
gem_quiescent_gpuand the atexit handler require root to drop the caches, et al.
Quoted 6 lines
Thinking about it, you're likely talking about the 3rd subtest aka "master-drop-set-shared-fd". Sure we can use
igt_require()there, although I'd rather keepthe__drm_open_driver()+igt_require()combination.Do you agree?
For i915, gem_quiescent_gpu and pals are required so pending work failing is reported on the correct test. Without that done, results are hilariously racy.
Quoted 39 lines
Quoted 39 lines
Quoted 17 lines
Quoted 17 lines
tests/core_setmaster.c line 62
Quoted 7 lines
tests/core_setmaster.c new file +2
-0+* - there is _no_ guarantee that we'll open a device handled by +* tweak_perm() This is a point that came to mind later, the building blocks for that guarantee are in
igt_device_scan.1) If filter already set (test being run with --device), use that filter (
igt_device_filter_getor so). Otherwise loop through the generated card%u names, using drm:/dev/dri/card%u as the filter.igt_device_scan.cstuff already has a list of all possible devices but I don't see an easy way to get to the list.Quoted 7 lines
Quoted 6 lines
2)
igt_device_card_match()gets you a card3)
card->cardshould be the path to/dev/drito chmod on4)
igt_open_card(card)gives you an fd to that cardNot entirely sure what you're suggesting here. Can you please elaborate?
lib/igt_device_scan.[ch] is for device selection and you can use that to make sure chown has hit the device
drm_open_driver()is opening. Although I wrote that comment thinking you only chmod one of them but that was a misreading from my part, ignore this comment. You chmod all of them. Even with --device usage chmoding all devices will ensure the only way for chmodding not to be done is not having the proper kernel modules modprobed. Whichdrm_open_driverwill do. Yikes.Which luckily brings us to the best of both worlds. In the
igt_fixturebefore the first subtest:/* Ensure modules are loaded and the device file exists */ close(drm_open_driver(DRIVER_ANY));
Quoted 7 lines
Quoted 3 lines
Now having the
igt_assert(as opposed toigt_require()) in the child process makes even more sense.Thinking about it close(drm_open_driver(...)) looks like a workaround, instead of addressing the issue.
Even though it seems like it might work, the modprobe machinery seems partial:
- in the non i915 case, modprobe failure is a _debug_ message
igt_warn("Could not load i915\n");
Looks like a warn to me.
Quoted 1 line
- the
DRIVER_FOOto module name mapping is partial
Yes, we don't have all of them, but we should have all that have module reloading tests.
Quoted 1 line
- for some drivers, the module name differs from the name in
drmGetVersion()
Hence the special cased modprobe hook for i915 and the now-removed virtio-gpu.
Quoted 1 line
- some drivers have changed their module name
The ones we modprobe in IGT don't seem to have?
Now, for i915 in particular since we do a load of module reload testing, our required semantics for tests are to leave the state of the system at test exit time in either
1) module is loaded and working
2) module not loaded
For i915, not doing drm_open_driver() first means you don't have /dev/dri/card0 if the previously run test is something from i915_module_load.
See commit 676d031e6bd9 for a related fix.
Quoted 11 lines
Quoted 5 lines
In general, use
igt_assert_eq(x, y)instead ofigt_assert(x == y)to get better error messages on failure, as it prints the values of both operands. However, for values that are already just booleans, plainigt_assert()reads a bit better.From a quick look:
- 700+ instances of igt_assert(... == ...)
- 200+ instances of igt_assert(... != ...)
- 10+ instances of igt_assert_[n]eq(... {true,false})
- 200+ instances ofigt_assert_fdpermutations >= 0, < 0, -1
Quoted 4 lines
While I agree on the readability aspect, as-is we're in a pretty weird spot. How about we a) document b) add basic CI plumbing (so reviewers don't need to spend brain cycles) and c) update the existing codebase in few large commits?
Weird spot is a good name for this state. a+c gets +1 from me, and b in principle but I don't know how feasible it is to implement.
There's lib/igt.cocci that hasn't been touched in a while...
Quoted 1 line
None of which seems like a blocker for this patch IMHO.
No, definitely not blocking this!
Signature · 5 lines
Petri Latvala _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
On Wed, 4 Mar 2020 at 14:17, Petri Latvala <[email protected]> wrote:
[snip]
Quoted 11 lines
Quoted 6 lines
Thinking about it, you're likely talking about the 3rd subtest aka "master-drop-set-shared-fd". Sure we can use
igt_require()there, although I'd rather keepthe__drm_open_driver()+igt_require()combination.Do you agree?
For i915,
gem_quiescent_gpuand pals are required so pending work failing is reported on the correct test. Without that done, results are hilariously racy.
Sure I get that, yet there is _no_ work being done in these tests.
[snip]
Quoted 9 lines
Quoted 4 lines
Thinking about it close(drm_open_driver(...)) looks like a workaround, instead of addressing the issue.
Even though it seems like it might work, the modprobe machinery seems partial:
- in the non i915 case, modprobe failure is a _debug_ message
igt_warn("Could not load i915\n");Looks like a warn to me.
Note: _non_ i915 case.
Quoted 5 lines
Quoted 1 line
- the
DRIVER_FOOto module name mapping is partialYes, we don't have all of them, but we should have all that have module reloading tests.
Agreed, yet this is not a module reloading test.
Quoted 6 lines
Quoted 1 line
- for some drivers, the module name differs from the name in
drmGetVersion()Hence the special cased modprobe hook for i915 and the now-removed virtio-gpu.
Virtio-gpu is a perfect example.
Quoted 9 lines
Quoted 1 line
- some drivers have changed their module name
The ones we modprobe in IGT don't seem to have?
Now, for i915 in particular since we do a load of module reload testing, our required semantics for tests are to leave the state of the system at test exit time in either
Quoted 9 lines
1) module is loaded and working
2) module not loadedFor i915, not doing
drm_open_driver()first means you don't have/dev/dri/card0if the previously run test is something fromi915_module_load.See commit
676d031e6bd9for a related fix.
I agree with the point of having reloading tests, so having a modprobe machinery, of sorts, makes sense.
Here we are relying on the _partial_ machinery to workaround a extremely unlikely corner-case.
Given the probability of actually needing that WA is negligible, we might as well omit it.
Tl:Dr; let's use __drm_open_driver() + igt_require() for "master-drop-set-shared-fd"
Shall I sent v4 with that?
[snip]
Quoted 6 lines
Weird spot is a good name for this state. a+c gets +1 from me, and b in principle but I don't know how feasible it is to implement.
There's
lib/igt.coccithat hasn't been touched in a while...
Doubt I'll get to cocci it - a quick grep job will do for the initial run.
Will post some patches after this test is finished.
Thanks
-Emil
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 22 lines · Emil Velikov
On Wed, 4 Mar 2020 at 14:17, Petri Latvala <[email protected]> wrote:
[snip]
Quoted 11 lines
Quoted 6 lines
Thinking about it, you're likely talking about the 3rd subtest aka "master-drop-set-shared-fd". Sure we can use
igt_require()there, although I'd rather keepthe__drm_open_driver()+igt_require()combination.Do you agree?
For i915,
gem_quiescent_gpuand pals are required so pending work failing is reported on the correct test. Without that done, results are hilariously racy.Sure I get that, yet there is _no_ work being done in these tests.
[snip]
Quoted 5 lines
Quoted 4 lines
Thinking about it close(drm_open_driver(...)) looks like a workaround, instead of addressing the issue.
Even though it seems like it might work, the modprobe machinery seems partial:
- in the non i915 case, modprobe failure is a _debug_ message
Quoted 5 lines
Quoted 4 lines
igt_warn("Could not load i915\n");Looks like a warn to me.
Note: _non_ i915 case.
I need glasses. Yes, the other probes have debug messages.
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
- the
DRIVER_FOOto module name mapping is partialYes, we don't have all of them, but we should have all that have module reloading tests.
Agreed, yet this is not a module reloading test.
I mean that we modprobe all drivers that have module loading tests, or otherwise special module handling. This test not being a module reloading test doesn't matter, see example below.
Quoted 7 lines
Quoted 6 lines
Quoted 1 line
- for some drivers, the module name differs from the name in
drmGetVersion()Hence the special cased modprobe hook for i915 and the now-removed virtio-gpu.
Virtio-gpu is a perfect example.
And we don't modprobe that anymore.
Quoted 16 lines
Quoted 16 lines
Quoted 1 line
- some drivers have changed their module name
The ones we modprobe in IGT don't seem to have?
Now, for i915 in particular since we do a load of module reload testing, our required semantics for tests are to leave the state of the system at test exit time in either
1) module is loaded and working
2) module not loadedFor i915, not doing
drm_open_driver()first means you don't have/dev/dri/card0if the previously run test is something fromi915_module_load.
Quoted 7 lines
Quoted 2 lines
See commit
676d031e6bd9for a related fix.I agree with the point of having reloading tests, so having a modprobe machinery, of sorts, makes sense.
Here we are relying on the _partial_ machinery to workaround a extremely unlikely corner-case.
It is _extremely_ likely that we (i915 CI) could sometimes run igt@i915_module_load@reload right before this test. Or igt@i915_selftest@live. When we do, there's no /dev/dri/card0 at the time of chmodding but is at the time of __drm_open_driver().
Signature · 5 lines
Petri Latvala _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 5 lines · Petri Latvala
It is _extremely_ likely that we (i915 CI) could sometimes run igt@i915_module_load@reload right before this test. Or igt@i915_selftest@live. When we do, there's no
/dev/dri/card0at the time of chmodding but is at the time of__drm_open_driver().
If I understand you correctly, if a test which does rmmod/modprobe fails, the CI will still continue to run other tests.
Personally it seems to me that any follow-up tests would be 'incorrect' or misleading at the very least.
As such I imagined that the CI will stop at this point.
If that's doable and something people are interested in, as follow-up one can drop the implicit modprobe from _all_ the drm_open_driver() calls. Thus getting IGT coverage closer to a real-world use-case - aka udev does the loading.
Either way, all of this is a brain dump which illustrates my confusion on the topic.
Thanks a million for the help.
Will send v4 with the workaround + a comment in a moment.
-Emil
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 9 lines · Emil Velikov
Quoted 5 lines · Petri Latvala
It is _extremely_ likely that we (i915 CI) could sometimes run igt@i915_module_load@reload right before this test. Or igt@i915_selftest@live. When we do, there's no
/dev/dri/card0at the time of chmodding but is at the time of__drm_open_driver().If I understand you correctly, if a test which does rmmod/modprobe fails, the CI will still continue to run other tests.
It's worse than that. All subtests of i915_module_load except @reload leave the module unloaded also on _success_. i915_selftest likewise leaves the module unloaded. If they loaded the module back on success, running module loading tests back-to-back would do an additional module reload roundtrip.
Signature · 5 lines
Petri Latvala _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 9 lines · Petri Latvala
Quoted 7 lines · Emil Velikov
Quoted 5 lines · Petri Latvala
It is _extremely_ likely that we (i915 CI) could sometimes run igt@i915_module_load@reload right before this test. Or igt@i915_selftest@live. When we do, there's no
/dev/dri/card0at the time of chmodding but is at the time of__drm_open_driver().
Quoted 9 lines
Quoted 2 lines
If I understand you correctly, if a test which does rmmod/modprobe fails, the CI will still continue to run other tests.
It's worse than that. All subtests of
i915_module_loadexcept @reload leave the module unloaded also on _success_.i915_selftestlikewise leaves the module unloaded. If they loaded the module back on success, running module loading tests back-to-back would do an additional module reload roundtrip.
Ouch, this sounds pretty nasty....
Pretty much all other tests ensure the state is restored as original upon exit. So it would make sense to fix these by adding modprobe as a closing fixture.
Regardless, v4 [1] has the close(open(...)) workaround which should cater for this.
Thanks again for the time in explaining these IGT subtleties. -Emil
[1] https://lists.freedesktop.org/archives/igt-dev/2020-March/021081.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 1 line · Emil Velikov
Subject: [PATCH i-g-t v3] ts/core_setmaster: new test for drop/set master semantics
Forgot to ask: What is ts?
Signature · 5 lines
Petri Latvala _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev