Skip to contentSkip to conversation

ts/core_setmaster: new test for drop/set master semantics

PATCH Superseded Emil Velikov 3 participants 12 messages Feb 19, 2020 – Feb 25, 2020 Arm/Amlogic Meson SoC support

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 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

---
 tests/Makefile.sources |   1 +
 tests/core_setmaster.c | 182 +++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   1 +
 3 files changed, 184 insertions(+)
 create mode 100644 tests/core_setmaster.c
tests/Makefile.sources +1 -0
index b87d6333..5da36a91 100644
@@ -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 +182 -0

182 lines not on this page · raw message

tests/meson.build +1 -0
index fa0103e3..d8fb9f3e 100644
@@ -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
#1 lore raw

[igt-dev] ✗ GitLab.Pipeline: failure for ts/core_setmaster: new test for drop/set master semantics (rev2)

== Series Details ==

== Series Details ==

Series: ts/core_setmaster: new test for drop/set master semantics (rev2)
URL : https://patchwork.freedesktop.org/series/73650/
State : failure

== Summary ==

ERROR! This series introduces new undocumented tests:

core_setmaster@master-drop-set-root
core_setmaster@master-drop-set-shared-fd
core_setmaster@master-drop-set-user

Can you document them as per the requirement in the [CONTRIBUTING.md]?

[Documentation] has more details on how to do this.

Here are few examples:
https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/0316695d03aa46108296b27f3982ec93200c7a6e
https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/443cc658e1e6b492ee17bf4f4d891029eb7a205d

Thanks in advance!

[CONTRIBUTING.md]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/blob/master/CONTRIBUTING.md#L19
[Documentation]: https://drm.pages.freedesktop.org/igt-gpu-tools/igt-gpu-tools-Core.html#igt-describe

Other than that, pipeline status: SUCCESS.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/110362 for the overview.

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/110362
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for ts/core_setmaster: new test for drop/set master semantics (rev2)

In reply to Emil Velikov
== Series Details ==

== Series Details ==

Series: ts/core_setmaster: new test for drop/set master semantics (rev2)
URL : https://patchwork.freedesktop.org/series/73650/
State : success

== Summary ==

CI Bug Log - changes from IGT_5451 -> IGTPW_4186
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/index.html

Known issues
------------

Here are the changes found in IGTPW_4186 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live_gem_contexts:
- fi-ivb-3770: [PASS][1] -> [DMESG-FAIL][2] ([i915#722])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/fi-ivb-3770/igt@i915_selftest@live_gem_contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/fi-ivb-3770/igt@i915_selftest@live_gem_contexts.html

#### Possible fixes ####

* igt@gem_close_race@basic-threads:
- fi-hsw-peppy: [INCOMPLETE][3] ([i915#694] / [i915#816]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/fi-hsw-peppy/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/fi-hsw-peppy/igt@[email protected]

* igt@i915_selftest@live_gtt:
- fi-icl-guc: [TIMEOUT][5] ([fdo#112271]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/fi-icl-guc/igt@i915_selftest@live_gtt.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/fi-icl-guc/igt@i915_selftest@live_gtt.html

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#112126]: https://bugs.freedesktop.org/show_bug.cgi?id=112126
[fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#722]: https://gitlab.freedesktop.org/drm/intel/issues/722
[i915#816]: https://gitlab.freedesktop.org/drm/intel/issues/816

Participating hosts (52 -> 46)
------------------------------

Additional (1): fi-kbl-7560u
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_5451 -> IGTPW_4186

CI-20190529: 20190529
CI_DRM_7965: e2896d5957301e0411d7048e724d4dc5c96450ea @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4186: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/index.html
IGT_5451: 1c42f971d37a066da3e588783611ab08d5afbded @ 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_4186/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw
In reply to Emil Velikov

HI all,

Quoted 8 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 fd

Quoted 5 lines

Currently the second subtest will fail, with kernel patch to address that has been submitted.

v2: Add to the autotools build

I've addressed the "igt_describe" issues, but will postpone v3 until there's feedback on the patch.
Not a huge fan of spamming the CI ;-)

Aside: from a quick grep about 10% of the existing subtests have a igt_describe section.
Guess we should bribe someone to address that, otherwise people are bound to skip igt_describe all the time.

Thanks
Emil
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#4 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for ts/core_setmaster: new test for drop/set master semantics (rev2)

In reply to Emil Velikov
== Series Details ==

== Series Details ==

Series: ts/core_setmaster: new test for drop/set master semantics (rev2)
URL : https://patchwork.freedesktop.org/series/73650/
State : success

== Summary ==

CI Bug Log - changes from IGT_5451_full -> IGTPW_4186_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/index.html

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in IGTPW_4186_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_4186/shard-iclb1/igt@[email protected]
- shard-kbl: NOTRUN -> [FAIL][2]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-kbl6/igt@[email protected]
- shard-snb: NOTRUN -> [FAIL][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-snb1/igt@[email protected]
- shard-tglb: NOTRUN -> [FAIL][4]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-tglb5/igt@[email protected]
- shard-apl: NOTRUN -> [FAIL][5]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-apl7/igt@[email protected]
- shard-glk: NOTRUN -> [FAIL][6]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-glk4/igt@[email protected]
- shard-hsw: NOTRUN -> [FAIL][7]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-hsw1/igt@[email protected]

New tests
---------

New tests have been introduced between IGT_5451_full and IGTPW_4186_full:

### New IGT tests (3) ###

* igt@core_setmaster@master-drop-set-root:
- Statuses : 7 pass(s)
- Exec time: [0.00, 0.01] s

* igt@core_setmaster@master-drop-set-shared-fd:
- Statuses : 7 pass(s)
- Exec time: [0.01, 0.04] s

* igt@core_setmaster@master-drop-set-user:
- Statuses : 7 fail(s)
- Exec time: [0.02, 0.04] s

Known issues
------------

Here are the changes found in IGTPW_4186_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_isolation@rcs0-s3:
- shard-kbl: [PASS][8] -> [INCOMPLETE][9] ([fdo#103665])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-kbl2/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-kbl2/igt@[email protected]

* igt@gem_exec_schedule@pi-distinct-iova-bsd:
- shard-iclb: [PASS][10] -> [SKIP][11] ([i915#677]) +1 similar issue
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-iclb6/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-iclb4/igt@[email protected]

* igt@gem_exec_schedule@pi-ringfull-bsd:
- shard-iclb: [PASS][12] -> [SKIP][13] ([fdo#112146]) +6 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-iclb8/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-iclb4/igt@[email protected]

* igt@gem_partial_pwrite_pread@write-uncached:
- shard-hsw: [PASS][14] -> [FAIL][15] ([i915#694])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-hsw6/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-hsw2/igt@[email protected]

* igt@gem_workarounds@suspend-resume-context:
- shard-apl: [PASS][16] -> [DMESG-WARN][17] ([i915#180]) +5 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-apl3/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-apl1/igt@[email protected]

* igt@i915_suspend@sysfs-reader:
- shard-kbl: [PASS][18] -> [DMESG-WARN][19] ([i915#180]) +1 similar issue
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-kbl6/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-kbl7/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-256x85-onscreen:
- shard-apl: [PASS][20] -> [FAIL][21] ([i915#54])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-apl7/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-apl1/igt@[email protected]

* igt@kms_cursor_legacy@2x-flip-vs-cursor-atomic:
- shard-glk: [PASS][22] -> [FAIL][23] ([i915#72])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-glk5/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-glk2/igt@[email protected]

* igt@kms_flip@dpms-vs-vblank-race:
- shard-hsw: [PASS][24] -> [INCOMPLETE][25] ([CI#80] / [i915#61])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-hsw8/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-hsw5/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-pwrite:
- shard-tglb: [PASS][26] -> [SKIP][27] ([i915#668])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-tglb6/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-tglb1/igt@[email protected]

* igt@kms_psr@psr2_sprite_mmap_gtt:
- shard-iclb: [PASS][28] -> [SKIP][29] ([fdo#109441]) +1 similar issue
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-iclb8/igt@kms_psr@psr2_sprite_mmap_gtt.html

* igt@perf_pmu@busy-no-semaphores-vcs1:
- shard-iclb: [PASS][30] -> [SKIP][31] ([fdo#112080]) +9 similar issues
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-iclb4/igt@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-iclb8/igt@[email protected]

* igt@prime_vgem@fence-wait-bsd2:
- shard-iclb: [PASS][32] -> [SKIP][33] ([fdo#109276]) +21 similar issues
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-iclb1/igt@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-iclb3/igt@[email protected]

#### Possible fixes ####

* igt@gem_busy@busy-vcs1:
- shard-iclb: [SKIP][34] ([fdo#112080]) -> [PASS][35] +18 similar issues
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-iclb8/igt@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-iclb4/igt@[email protected]

* {igt@gem_ctx_persistence@close-replace-race}:
- shard-tglb: [INCOMPLETE][36] -> [PASS][37]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-tglb3/igt@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-tglb3/igt@[email protected]
- shard-iclb: [INCOMPLETE][38] -> [PASS][39]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-iclb8/igt@[email protected]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-iclb1/igt@[email protected]

* igt@gem_exec_balancer@bonded-slice:
- shard-kbl: [FAIL][40] -> [PASS][41]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-kbl4/igt@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-kbl4/igt@[email protected]

* igt@gem_exec_balancer@smoke:
- shard-iclb: [SKIP][42] ([fdo#110854]) -> [PASS][43]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-iclb6/igt@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-iclb4/igt@[email protected]

* {igt@gem_exec_schedule@implicit-read-write-bsd1}:
- shard-iclb: [SKIP][44] ([fdo#109276] / [i915#677]) -> [PASS][45] +1 similar issue
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-iclb8/igt@[email protected]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-iclb2/igt@[email protected]

* {igt@gem_exec_schedule@implicit-write-read-bsd}:
- shard-iclb: [SKIP][46] ([i915#677]) -> [PASS][47]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-iclb1/igt@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-iclb7/igt@[email protected]

* igt@gem_exec_schedule@in-order-bsd:
- shard-iclb: [SKIP][48] ([fdo#112146]) -> [PASS][49] +4 similar issues
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-iclb4/igt@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-iclb5/igt@[email protected]

* igt@gem_exec_schedule@promotion-bsd1:
- shard-iclb: [SKIP][50] ([fdo#109276]) -> [PASS][51] +21 similar issues
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-iclb5/igt@[email protected]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-iclb4/igt@[email protected]

* igt@gem_tiled_blits@interruptible:
- shard-hsw: [FAIL][52] ([i915#694]) -> [PASS][53]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-hsw5/igt@[email protected]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-hsw5/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-suspend:
- shard-apl: [DMESG-WARN][54] ([i915#180]) -> [PASS][55] +2 similar issues
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-apl4/igt@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-apl3/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank:
- shard-kbl: [FAIL][56] ([i915#79]) -> [PASS][57]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-kbl2/igt@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-kbl6/igt@[email protected]

* igt@kms_plane@pixel-format-pipe-b-planes:
- shard-snb: [DMESG-WARN][58] ([i915#478]) -> [PASS][59]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-snb4/igt@[email protected]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-snb1/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-y:
- shard-glk: [FAIL][60] ([i915#899]) -> [PASS][61]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-glk9/igt@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-glk6/igt@[email protected]

* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [SKIP][62] ([fdo#109441]) -> [PASS][63] +2 similar issues
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-iclb7/igt@kms_psr@psr2_sprite_plane_move.html
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html

* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-kbl: [DMESG-WARN][64] ([i915#180]) -> [PASS][65] +4 similar issues
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-kbl6/igt@[email protected]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-kbl2/igt@[email protected]

* igt@perf@gen12-mi-rpc:
- shard-tglb: [TIMEOUT][66] ([fdo#112271] / [i915#1085]) -> [PASS][67]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-tglb1/igt@[email protected]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-tglb7/igt@[email protected]

* igt@prime_mmap_coherency@ioctl-errors:
- shard-hsw: [FAIL][68] ([i915#831]) -> [PASS][69]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-hsw7/igt@[email protected]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-hsw7/igt@[email protected]

#### Warnings ####

* igt@gem_ctx_isolation@vcs1-nonpriv:
- shard-iclb: [SKIP][70] ([fdo#112080]) -> [FAIL][71] ([IGT#28])
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-iclb3/igt@[email protected]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-iclb4/igt@[email protected]

* igt@i915_pm_dc@dc6-dpms:
- shard-tglb: [FAIL][72] ([i915#454]) -> [SKIP][73] ([i915#468])
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-tglb1/igt@[email protected]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-tglb2/igt@[email protected]

* igt@i915_pm_dc@dc6-psr:
- shard-tglb: [SKIP][74] ([i915#468]) -> [FAIL][75] ([i915#454])
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-tglb2/igt@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-tglb7/igt@[email protected]

* igt@i915_pm_rpm@fences-dpms:
- shard-snb: [SKIP][76] ([fdo#109271]) -> [INCOMPLETE][77] ([i915#82])
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5451/shard-snb2/igt@[email protected]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/shard-snb4/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[CI#80]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/80
[IGT#28]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/28
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[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#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
[i915#1085]: https://gitlab.freedesktop.org/drm/intel/issues/1085
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
[i915#478]: https://gitlab.freedesktop.org/drm/intel/issues/478
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#58]: https://gitlab.freedesktop.org/drm/intel/issues/58
[i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
[i915#668]: https://gitlab.freedesktop.org/drm/intel/issues/668
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
[i915#831]: https://gitlab.freedesktop.org/drm/intel/issues/831
[i915#899]: https://gitlab.freedesktop.org/drm/intel/issues/899
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133

Participating hosts (8 -> 8)
------------------------------

No changes in participating hosts

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_5451 -> IGTPW_4186

CI-20190529: 20190529
CI_DRM_7965: e2896d5957301e0411d7048e724d4dc5c96450ea @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4186: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/index.html
IGT_5451: 1c42f971d37a066da3e588783611ab08d5afbded @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#5 lore raw

Re: [igt-dev] ✓ Fi.CI.IGT: success for ts/core_setmaster: new test for drop/set master semantics (rev2)

Hi all

Quoted 24 lines · Patchwork

== Series Details ==

Series: ts/core_setmaster: new test for drop/set master semantics (rev2)
URL : https://patchwork.freedesktop.org/series/73650/
State : success

== Summary ==

CI Bug Log - changes from IGT_5451_full -> IGTPW_4186_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4186/index.html

Possible new issues
-------------------

Quoted 7 lines

Here are the unknown changes that may have been introduced in IGTPW_4186_full:

### IGT changes ###

#### Possible regressions ####

* {igt@core_setmaster@master-drop-set-user} (NEW):

For anyone wondering, the failure is expected as outlined in the commit message. The patch to address the issue can be found on the dri-devel mailing list[1].

Feedback and review is highly appreciated. For both the IGT test and DRM patch.

Thanks
Emil

[1] https://lists.freedesktop.org/archives/dri-devel/2020-February/255718.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#6 lore raw
In reply to Emil Velikov
Quoted 86 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 fd

Currently the second subtest will fail, with kernel patch to address that has been submitted.

v2: Add to the autotools build

---
 tests/Makefile.sources |   1 +
 tests/core_setmaster.c | 182 +++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   1 +
 3 files changed, 184 insertions(+)
 create mode 100644 tests/core_setmaster.c
tests/Makefile.sources +1 -0
index b87d6333..5da36a91 100644
@@ -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 +48 -0
new file mode 100644
index 00000000..2447c077
@@ -0,0 +1,182 @@
+/*
+ * 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 58

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);
+
+	/* Double-check if open has failed */
+	igt_assert_neq(master, -1);

Just use drm_open_driver(). For sure you don't want to produce a 'FAIL' when running on a system without GPU drivers. 'SKIP' is correct for that case.

Same goes for the other __drm_open_driver() call.

Quoted 39 lines
tests/core_setmaster.c new file +39 -0
+
+	/* 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);
+
+	/* If we have SYS_CAP_ADMIN we're in the textbook best-case scenario.
+	 *
+	 * Otherwise newer kernels allow the application to drop/revoke its
+	 * master capability and request it again later.
+	 *
+	 * In this case, we address two types of issues:
+	 * - the application no longer need suid-root (or equivalent) which
+	 * was otherwise required _solely_ for these two ioctls
+	 * - plenty of applications ignore (or discard) the result of the
+	 * calls all together.
+	 */
+	igt_assert_eq(drmDropMaster(master), 0);
+	igt_assert_eq(drmSetMaster(master), 0);
+
+	close(master);
+}
+
+static unsigned tweak_perm(uint8_t *saved_perm, unsigned max_perm, bool save)
+{
+	char path[256];
+	struct stat st;
+	unsigned i;
+
+	for (i = 0; i < max_perm; i++) {
+		snprintf(path, sizeof(path), "/dev/dri/card%u", i);
+
+		/* Existing userspace assumes there's no gaps, do the same. */
+		if (stat(path, &st) != 0)
+			break;
+
+		if (save) {
+			/* Save and toggle */

tests/core_setmaster.c line 107

Quoted 10 lines
tests/core_setmaster.c new file +10 -0
+			saved_perm[i] = st.st_mode & (S_IROTH | S_IWOTH);
+			st.st_mode |= S_IROTH | S_IWOTH;
+		} else {
+			/* Clear and restore */
+			st.st_mode &= ~(S_IROTH | S_IWOTH);
+			st.st_mode |= saved_perm[i];
+		}
+
+		/* In the extremely unlikely case of this failing, there't not
+		 * much we can do.

We can igt_require that it works though. chmod failing means we get a false 'FAIL' from the test.

Restoring failure leaves the system to a state that is going to scare people with the extra perms...

Quoted 26 lines
tests/core_setmaster.c new file +26 -0
+		 */
+		chmod(path, st.st_mode);
+	}
+	return i;
+}
+
+
+igt_main
+{
+	igt_subtest("master-drop-set-root") {
+		check_drop_set();
+	}
+
+
+	igt_subtest("master-drop-set-user") {
+		uint8_t saved_perm[255];
+		unsigned num;
+
+		/* Upon dropping root we end up as random user, which
+		 * a) is not in the video group, and
+		 * b) lacks logind ACL, thus
+		 * any open() fill fail.
+		 *
+		 * As such, save the state of original other rw permissions
+		 * and toggle them on.
+		 */

tests/core_setmaster.c line 143

Quoted 10 lines
tests/core_setmaster.c new file +10 -0
+		num = tweak_perm(saved_perm, ARRAY_SIZE(saved_perm), true);
+
+		igt_fork(child, 1) {
+			igt_drop_root();
+			check_drop_set();
+		}
+		igt_waitchildren();
+
+		/* Restore the orignal permissions */
+		tweak_perm(saved_perm, num, false);

If the test fails we never restore the permissions with this flow. I suppose this would be the best (but still ugly) way to make that happen:

igt_fixture {
tweak_perm(...)
}

igt_subtest("master-drop-set-user") {
...
}

igt_fixture {
tweak_perm(saved);
}

Wrapping all that in an igt_subtest_group not required but could be used to communicate to human readers that this is the subtest these two fixtures are for.

Signature · 5 lines
Petri Latvala
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#7 lore raw
Quoted 3 lines · Petri Latvala

Wrapping all that in an igt_subtest_group not required but could be used to communicate to human readers that this is the subtest these two fixtures are for.

Correction, it is required if you use igt_require with chmod().

Signature · 5 lines
Petri Latvala
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#8 lore raw
In reply to Petri Latvala

Hi Petri,

Thank you for having a look.

Quoted 4 lines · Petri Latvala
Quoted 4 lines
tests/core_setmaster.c new file +4 -0
+static void check_drop_set(void)
+{
+     int master;
+
Quoted 9 lines

tests/core_setmaster.c line 58

Quoted 4 lines
tests/core_setmaster.c new file +4 -0
+     master = __drm_open_driver(DRIVER_ANY);
+
+     /* Double-check if open has failed */
+     igt_assert_neq(master, -1);

Just use drm_open_driver(). For sure you don't want to produce a 'FAIL' when running on a system without GPU drivers. 'SKIP' is correct for that case.

This sounds very strange. Why would anyone run IGT if they lack _any_ GPU drivers.
If I'm running GPU tests and my GPU doesn't show up for any reason, I'd expect a hard failure.

Even if we ignore that, a quick look around shows that there are multiple tests that will happily pass -1 to forward.
If anything, the only way to trigger this is my dropping the chown() calls.

Hmm ... actually using an igt_skip with drop_root root-less case seems to be broken.
How about we follow other tests and remove the check?

Quoted 29 lines
Quoted 15 lines
tests/core_setmaster.c new file +15 -0
+static unsigned tweak_perm(uint8_t *saved_perm, unsigned max_perm, bool save)
+{
+     char path[256];
+     struct stat st;
+     unsigned i;
+
+     for (i = 0; i < max_perm; i++) {
+             snprintf(path, sizeof(path), "/dev/dri/card%u", i);
+
+             /* Existing userspace assumes there's no gaps, do the same. */
+             if (stat(path, &st) != 0)
+                     break;
+
+             if (save) {
+                     /* Save and toggle */

tests/core_setmaster.c line 107

Quoted 10 lines
tests/core_setmaster.c new file +10 -0
+                     saved_perm[i] = st.st_mode & (S_IROTH | S_IWOTH);
+                     st.st_mode |= S_IROTH | S_IWOTH;
+             } else {
+                     /* Clear and restore */
+                     st.st_mode &= ~(S_IROTH | S_IWOTH);
+                     st.st_mode |= saved_perm[i];
+             }
+
+             /* In the extremely unlikely case of this failing, there't not
+              * much we can do.

We can igt_require that it works though. chmod failing means we get a false 'FAIL' from the test.

Quoted 3 lines

Restoring failure leaves the system to a state that is going to scare people with the extra perms...

AFAICT igt_require will effectively become "igt_skip" on failure.

Thus if it triggers during restore we end up with partially restored attributes. If it happens during the toggle state, even with the fixture approach below, we will end up with garbage in saved_perm or the length variable. And using that data for restore will be bad.

IMHO there isn't any reason this will ever fail... I was super paranoid as I wrote the comment.
It makes more sense to drop the misleading comment.

What do you think?

Quoted 35 lines
Quoted 12 lines
tests/core_setmaster.c new file +12 -0
+     igt_subtest("master-drop-set-user") {
+             uint8_t saved_perm[255];
+             unsigned num;
+
+             /* Upon dropping root we end up as random user, which
+              * a) is not in the video group, and
+              * b) lacks logind ACL, thus
+              * any open() fill fail.
+              *
+              * As such, save the state of original other rw permissions
+              * and toggle them on.
+              */

tests/core_setmaster.c line 143

Quoted 10 lines
tests/core_setmaster.c new file +10 -0
+             num = tweak_perm(saved_perm, ARRAY_SIZE(saved_perm), true);
+
+             igt_fork(child, 1) {
+                     igt_drop_root();
+                     check_drop_set();
+             }
+             igt_waitchildren();
+
+             /* Restore the orignal permissions */
+             tweak_perm(saved_perm, num, false);

If the test fails we never restore the permissions with this flow. I suppose this would be the best (but still ugly) way to make that happen:

igt_fixture {
   tweak_perm(...)
}

igt_subtest("master-drop-set-user") {
...
}

Quoted 8 lines

igt_fixture {
tweak_perm(saved);
}

Wrapping all that in an igt_subtest_group not required but could be used to communicate to human readers that this is the subtest these two fixtures are for.

Indeed this way the permissions are restored on failure - how did I miss that. Added the fixtures, small comment and a subtest_group.

Let me know how if you agree with my suggestions, and I'll send out v3.

Thanks
Emil
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#9 lore raw
Quoted 19 lines · Emil Velikov

Hi Petri,

Thank you for having a look.

Quoted 4 lines · Petri Latvala
Quoted 4 lines
tests/core_setmaster.c new file +4 -0
+static void check_drop_set(void)
+{
+     int master;
+
Quoted 9 lines

tests/core_setmaster.c line 58

Quoted 4 lines
tests/core_setmaster.c new file +4 -0
+     master = __drm_open_driver(DRIVER_ANY);
+
+     /* Double-check if open has failed */
+     igt_assert_neq(master, -1);

Just use drm_open_driver(). For sure you don't want to produce a 'FAIL' when running on a system without GPU drivers. 'SKIP' is correct for that case.

Quoted 2 lines

This sounds very strange. Why would anyone run IGT if they lack _any_ GPU drivers.

Accidentally, by breaking the driver module loading.

Quoted 2 lines

If I'm running GPU tests and my GPU doesn't show up for any reason, I'd expect a hard failure.

Sure, some kind of a notification for that case is desired. However the correct notification for that is a SKIP result. Granted, for DRIVER_ANY open call the story is a bit more far-fetched, but consider this:

If you get a FAIL from this test, you want to be able to say "I got that because handling master in kernel is broken". If you can't open a driver, you can't tell that kernel is broken. The only thing you can tell is: You can't test the feature. SKIP is exactly that: Can't test this.

Quoted 4 lines

Even if we ignore that, a quick look around shows that there are multiple tests that will happily pass -1 to forward.
If anything, the only way to trigger this is my dropping the chown() calls.

Which tests would those be? The only ones I can spot are ones that want to test "can we still load the driver after doing $badthing".

Notice that drm_open_driver() stops testing if the open fails so it cannot pass -1 along.

Signature · 5 lines
Petri Latvala
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#10 lore raw
Quoted 34 lines · Petri Latvala
Quoted 19 lines · Emil Velikov

Hi Petri,

Thank you for having a look.

Quoted 4 lines · Petri Latvala
Quoted 4 lines
tests/core_setmaster.c new file +4 -0
+static void check_drop_set(void)
+{
+     int master;
+
Quoted 9 lines

tests/core_setmaster.c line 58

Quoted 4 lines
tests/core_setmaster.c new file +4 -0
+     master = __drm_open_driver(DRIVER_ANY);
+
+     /* Double-check if open has failed */
+     igt_assert_neq(master, -1);

Just use drm_open_driver(). For sure you don't want to produce a 'FAIL' when running on a system without GPU drivers. 'SKIP' is correct for that case.

Quoted 2 lines

This sounds very strange. Why would anyone run IGT if they lack _any_ GPU drivers.

Accidentally, by breaking the driver module loading.

Quoted 2 lines

If I'm running GPU tests and my GPU doesn't show up for any reason, I'd expect a hard failure.

Sure, some kind of a notification for that case is desired. However the correct notification for that is a SKIP result. Granted, for DRIVER_ANY open call the story is a bit more far-fetched, but consider this:

Quoted 6 lines

If you get a FAIL from this test, you want to be able to say "I got that because handling master in kernel is broken". If you can't open a driver, you can't tell that kernel is broken. The only thing you can tell is: You can't test the feature. SKIP is exactly that: Can't test this.

"If you can't open a driver, you can't tell that kernel is broken." Pretty sure that failing to load a DRM driver classifies as broken ;-)

Although I see the goal here: Ensuring _only_ a particular corner-case is reported [as broken] by the individual test.
IMHO this is valid yet, it only ensures the test summary isn't plagued with FAIL but with SKIP instead.

Personally le coupe de grace against igt_require/igt_skip is that ig_drop_root + igt_skip seems to be _busted_.
So in the case of this failing, we'll end up with a garbled state + misleading trace.

While I appreciate the overall sentiment, with igt_assert() we are left in more obvious and manageable stage.

Quoted 9 lines
Quoted 5 lines

Even if we ignore that, a quick look around shows that there are multiple tests that will happily pass -1 to forward.
If anything, the only way to trigger this is my dropping the chown() calls.

Which tests would those be? The only ones I can spot are ones that want to test "can we still load the driver after doing $badthing".

Git grep shows ~20 hits, from which I cannot see anyone that does a "bad thing".

Looking at gem_sanitycheck() - it will result in mislabelled error. While gem_exec_store() will report failure (due to igt_fork_hang_detector) is the open fail. Others like drm_open_driver_render() will barf misleading message about sysfs, when attempting gem_quiescent_gpu().

As a Tl;Dr: the igt_require() isn't enforced everywhere - rightfully so IMHO.

Does this make sense or you'd prefer the igt_require() regardless?

Thanks
Emil
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#11 lore raw
Quoted 35 lines · Emil Velikov
Quoted 34 lines · Petri Latvala
Quoted 19 lines · Emil Velikov

Hi Petri,

Thank you for having a look.

Quoted 4 lines · Petri Latvala
Quoted 4 lines
tests/core_setmaster.c new file +4 -0
+static void check_drop_set(void)
+{
+     int master;
+
Quoted 9 lines

tests/core_setmaster.c line 58

Quoted 4 lines
tests/core_setmaster.c new file +4 -0
+     master = __drm_open_driver(DRIVER_ANY);
+
+     /* Double-check if open has failed */
+     igt_assert_neq(master, -1);

Just use drm_open_driver(). For sure you don't want to produce a 'FAIL' when running on a system without GPU drivers. 'SKIP' is correct for that case.

Quoted 2 lines

This sounds very strange. Why would anyone run IGT if they lack _any_ GPU drivers.

Accidentally, by breaking the driver module loading.

Quoted 2 lines

If I'm running GPU tests and my GPU doesn't show up for any reason, I'd expect a hard failure.

Sure, some kind of a notification for that case is desired. However the correct notification for that is a SKIP result. Granted, for DRIVER_ANY open call the story is a bit more far-fetched, but consider this:

Quoted 8 lines
Quoted 6 lines

If you get a FAIL from this test, you want to be able to say "I got that because handling master in kernel is broken". If you can't open a driver, you can't tell that kernel is broken. The only thing you can tell is: You can't test the feature. SKIP is exactly that: Can't test this.

"If you can't open a driver, you can't tell that kernel is broken." Pretty sure that failing to load a DRM driver classifies as broken ;-)

Fair point, so let me rephrase that to "-- in the way tested". :P

Quoted 6 lines

Although I see the goal here: Ensuring _only_ a particular corner-case is reported [as broken] by the individual test.
IMHO this is valid yet, it only ensures the test summary isn't plagued with FAIL but with SKIP instead.

Quoted 7 lines

Personally le coupe de grace against igt_require/igt_skip is that ig_drop_root + igt_skip seems to be _busted_.
So in the case of this failing, we'll end up with a garbled state + misleading trace.

While I appreciate the overall sentiment, with igt_assert() we are left in more obvious and manageable stage.

Reading the code again, a good argument can be made that your __drm_open_driver() is testing if you can still open the driver as non-root. If that's the goal, igt_assert is proper. If on the other hand __drm_open_driver() is "just setup to test the real goal", then igt_require.

If the code is written with the chmod() calls being in igt_fixture blocks around the subtest, I don't see how it can be busted either way. The state is the same both ways, we stop testing. The only difference is the subtest result.

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines

Even if we ignore that, a quick look around shows that there are multiple tests that will happily pass -1 to forward.
If anything, the only way to trigger this is my dropping the chown() calls.

Quoted 8 lines
Quoted 3 lines

Which tests would those be? The only ones I can spot are ones that want to test "can we still load the driver after doing $badthing".

Git grep shows ~20 hits, from which I cannot see anyone that does a "bad thing".

Looking at gem_sanitycheck() - it will result in mislabelled error. While gem_exec_store() will report failure (due to igt_fork_hang_detector) is the open fail.

gem_sanitycheck() sure could use some extra help for human readers. Currently it makes the tradeoff of checking for open failure and misbehaving reloaded driver with the same code, forcing human log reading to know that EBADF means open() failed.

gem_exec_store() is only called if gem_sanitycheck() succeeds. Sure, a repeated __drm_open_driver() could fail there, but hey. At least something complains then.

Quoted 3 lines

Others like
drm_open_driver_render() will barf misleading message about sysfs, when attempting gem_quiescent_gpu().

That cannot call gem_quiescent_gpu() if open failed.

Signature · 5 lines
Petri Latvala
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev