Skip to contentSkip to conversation

tests/core_auth: Merge getclient subtests

PATCH In review Daniel Vetter 3 participants 5 messages Jan 23, 2019 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/core_auth: Merge getclient subtests

Emil has another auth test which could use the check_auth function, so best to merge them all.

We need a subtest group and put the tests which need to fully control who's master and how many open drm fd there are first.

---
 tests/Makefile.sources       |   1 -
 tests/core_auth.c            |  75 +++++++++++++++++++++++---
 tests/core_get_client_auth.c | 102 -----------------------------------
 tests/meson.build            |   1 -
 4 files changed, 68 insertions(+), 111 deletions(-)
 delete mode 100644 tests/core_get_client_auth.c
tests/Makefile.sources +0 -1
index 0de5154c5f4b..1de7762fda95 100644
@@ -13,7 +13,6 @@ AMDGPU_TESTS = \
 
 TESTS_progs = \
 	core_auth \
-	core_get_client_auth \
 	core_getclient \
 	core_getstats \
 	core_getversion \
tests/core_auth.c +68 -7

89 lines not on this page · raw message

tests/core_get_client_auth.c deleted +0 -102

102 lines not on this page · raw message

tests/meson.build +0 -1
index b8a6e61b3404..6a23811f4f58 100644
@@ -1,6 +1,5 @@
 test_progs = [
 	'core_auth',
-	'core_get_client_auth',
 	'core_getclient',
 	'core_getstats',
 	'core_getversion',
Signature · 6 lines
2.20.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for tests/core_auth: Merge getclient subtests

== Series Details ==

== Series Details ==

Series: tests/core_auth: Merge getclient subtests
URL : https://patchwork.freedesktop.org/series/55634/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5469 -> IGTPW_2279
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/55634/revisions/1/mbox/

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live_execlists:
- fi-apl-guc: PASS -> INCOMPLETE [fdo#103927]

* igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362]

#### Possible fixes ####

* igt@kms_busy@basic-flip-b:
- fi-gdg-551: FAIL [fdo#103182] -> PASS

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

[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271

Participating hosts (44 -> 40)
------------------------------

Additional (1): fi-hsw-peppy
Missing (5): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-icl-y

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

* IGT: IGT_4785 -> IGTPW_2279

CI_DRM_5469: 388cbc6121c1bd3d9846789bfef0a3e08c346461 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2279: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2279/
IGT_4785: 70749c70926f12043d3408b160606e1e6238ed3a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Testlist changes ==

+igt@core_auth@getclient-master-drop
+igt@core_auth@getclient-simple
-igt@core_get_client_auth@master-drop
-igt@core_get_client_auth@simple

== Logs ==

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

#2 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for tests/core_auth: Merge getclient subtests

In reply to Daniel Vetter
== Series Details ==

== Series Details ==

Series: tests/core_auth: Merge getclient subtests
URL : https://patchwork.freedesktop.org/series/55634/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5469_full -> IGTPW_2279_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/55634/revisions/1/mbox/

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_softpin@softpin:
- shard-apl: PASS -> INCOMPLETE [fdo#103927]

* igt@kms_available_modes_crc@available_mode_test_crc:
- shard-apl: PASS -> FAIL [fdo#106641]

* igt@kms_busy@extended-pageflip-hang-newfb-render-b:
- shard-apl: PASS -> DMESG-WARN [fdo#107956]

* igt@kms_cursor_crc@cursor-256x256-random:
- shard-glk: PASS -> FAIL [fdo#103232] +1

* igt@kms_cursor_crc@cursor-64x21-sliding:
- shard-apl: PASS -> FAIL [fdo#103232] +1
- shard-kbl: PASS -> FAIL [fdo#103232]

* igt@kms_draw_crc@draw-method-xrgb8888-mmap-wc-ytiled:
- shard-glk: PASS -> FAIL [fdo#103184]

* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
- shard-glk: PASS -> FAIL [fdo#105363]

* igt@kms_plane_multiple@atomic-pipe-c-tiling-x:
- shard-glk: PASS -> FAIL [fdo#103166] +1

* igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
- shard-apl: PASS -> FAIL [fdo#103166] +3
- shard-kbl: PASS -> FAIL [fdo#103166] +1

* igt@kms_setmode@basic:
- shard-apl: PASS -> FAIL [fdo#99912]

#### Possible fixes ####

* igt@kms_color@pipe-c-legacy-gamma:
- shard-apl: FAIL [fdo#104782] -> PASS

* igt@kms_cursor_crc@cursor-128x42-random:
- shard-glk: FAIL [fdo#103232] -> PASS +2

* igt@kms_cursor_crc@cursor-256x85-sliding:
- shard-apl: FAIL [fdo#103232] -> PASS +5

* igt@kms_cursor_crc@cursor-64x64-dpms:
- shard-kbl: FAIL [fdo#103232] -> PASS +2

* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-glk: FAIL [fdo#105363] -> PASS

* igt@kms_plane@pixel-format-pipe-b-planes-source-clamping:
- shard-glk: FAIL [fdo#108948] -> PASS

* igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
- shard-glk: FAIL [fdo#108145] -> PASS +1

* igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
- shard-apl: FAIL [fdo#103166] -> PASS

* igt@kms_plane_multiple@atomic-pipe-a-tiling-yf:
- shard-glk: FAIL [fdo#103166] -> PASS

* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-apl: DMESG-FAIL [fdo#108950] -> PASS

* igt@perf_pmu@rc6-runtime-pm-long:
- shard-kbl: FAIL [fdo#105010] -> PASS

* igt@sw_sync@sync_multi_consumer:
- shard-apl: INCOMPLETE [fdo#103927] -> PASS

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

[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103184]: https://bugs.freedesktop.org/show_bug.cgi?id=103184
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#106641]: https://bugs.freedesktop.org/show_bug.cgi?id=106641
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
[fdo#108950]: https://bugs.freedesktop.org/show_bug.cgi?id=108950
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (6 -> 4)
------------------------------

Missing (2): shard-skl shard-iclb

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

* IGT: IGT_4785 -> IGTPW_2279
* Piglit: piglit_4509 -> None

CI_DRM_5469: 388cbc6121c1bd3d9846789bfef0a3e08c346461 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2279: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2279/
IGT_4785: 70749c70926f12043d3408b160606e1e6238ed3a @ 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_2279/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Acked-by on v1 1/1
#3 lore raw
In reply to Daniel Vetter
Quoted 8 lines · Daniel Vetter

Emil has another auth test which could use the check_auth function, so best to merge them all.

We need a subtest group and put the tests which need to fully control who's master and how many open drm fd there are first.

Cc Emil Velikov <[email protected]>

Ack. on the idea. Pointing out some bits that seem off below. I would _not_ bother with any of them here, although they may be worth addressing at some point.

tests/core_auth.c igt_main · line 216

Quoted 11 lines
tests/core_auth.c +11 -0
+       igt_subtest("getclient-master-drop") {
+               int fd = drm_open_driver(DRIVER_ANY);
+               int fd2 = drm_open_driver(DRIVER_ANY);
+
+               igt_assert(check_auth(fd2) == true);
+
+               close(fd);
+
+               igt_assert(check_auth(fd2) == true);
+
+               close(fd2);

Either a comment is missing here, something seems wrong ... not sure.
- test is called "master-drop", yet we check the authentication being
"dropped".
- authentication is always set because we run as root
- two clients are present, yet we only ever check one of them
- there is no means to drop authentication for a given client - be
that userspace or in-kernel API

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

#4 lore raw
Quoted 27 lines · Emil Velikov
Quoted 8 lines · Daniel Vetter

Emil has another auth test which could use the check_auth function, so best to merge them all.

We need a subtest group and put the tests which need to fully control who's master and how many open drm fd there are first.

Cc Emil Velikov <[email protected]>

Ack. on the idea. Pointing out some bits that seem off below. I would _not_ bother with any of them here, although they may be worth addressing at some point.

Quoted 10 lines
tests/core_auth.c +10 -0
+       igt_subtest("getclient-master-drop") {
+               int fd = drm_open_driver(DRIVER_ANY);
+               int fd2 = drm_open_driver(DRIVER_ANY);
+
+               igt_assert(check_auth(fd2) == true);
+
+               close(fd);
+
+               igt_assert(check_auth(fd2) == true);
+
Quoted 8 lines
Quoted 1 line

+ close(fd2);

Either a comment is missing here, something seems wrong ... not sure.
- test is called "master-drop", yet we check the authentication being
"dropped".
- authentication is always set because we run as root
- two clients are present, yet we only ever check one of them
- there is no means to drop authentication for a given client - be
that userspace or in-kernel API

Took me a while to find this, since the igt commit references the wrong kernel commit, but this is all about:

commit 3cb01a980461506f9ec4e4e1dc2dab6314236fb7

Author: David Herrmann <[email protected]>
Date:   Tue Jul 22 17:12:26 2014 +0200

drm: don't de-authenticate clients on master-close

but yeah the testcase is pretty funky, and there's an obvious gap of opening the device as non-root and double-checking we're not authenticated - I started typing a patch for adding such a new subtest, hence my remarks in the other thread.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev