Skip to contentSkip to conversation

Make force work with multiple drivers available

PATCH In review Rodrigo Siqueira 3 participants 5 messages Jan 11, 2019 – Jan 14, 2019 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make force work with multiple drivers available

The force option allows users to specify which driver they want that IGT uses. Nonetheless, if the user has two or more loaded drivers in his system, the force option will not work as expected because IGT will take the first driver found at /dev/dri. This problem can be reproduced in a QEMU VM that using Bochs and VKMS. This patch handles this scenario by ensuring that IGT uses the forced module specified via IGT_FORCE_DRIVER.

---
 lib/drmtest.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
lib/drmtest.c +8 -4
index 35914c50..7c124ac6 100644
@@ -250,10 +250,8 @@ static int open_device(const char *name, unsigned int chipset)
 		goto err;
 
 	forced = forced_driver();
-	if (forced && chipset == DRIVER_ANY && !strcmp(forced, dev_name)) {
-		igt_debug("Force option used: Using driver %s\n", dev_name);
-		return fd;
-	}
+	if (forced && chipset == DRIVER_ANY && strcmp(forced, dev_name))
+		goto err;
 
 	for (int start = 0, end = ARRAY_SIZE(modules) - 1; start < end; ){
 		int mid = start + (end - start) / 2;
@@ -277,6 +275,12 @@ err:
 
 static int __search_and_open(const char *base, int offset, unsigned int chipset)
 {
+	const char *forced;
+
+	forced = forced_driver();
+	if (forced)
+		igt_info("Force option used: Using driver %s\n", forced);
+
 	for (int i = 0; i < 16; i++) {
 		char name[80];
 		int fd;
Signature · 5 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 Make force work with multiple drivers available

== Series Details ==

== Series Details ==

Series: Make force work with multiple drivers available
URL : https://patchwork.freedesktop.org/series/55059/
State : success

== Summary ==

CI Bug Log - changes from IGT_4761 -> IGTPW_2221
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_basic@userptr:
- fi-kbl-8809g: PASS -> DMESG-WARN [fdo#108965]

* igt@i915_selftest@live_hangcheck:
- fi-apl-guc: PASS -> DMESG-FAIL [fdo#109228]

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

[fdo#108915]: https://bugs.freedesktop.org/show_bug.cgi?id=108915
[fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
[fdo#109228]: https://bugs.freedesktop.org/show_bug.cgi?id=109228
[fdo#109241]: https://bugs.freedesktop.org/show_bug.cgi?id=109241
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278

Participating hosts (45 -> 43)
------------------------------

Additional (3): fi-icl-y fi-byt-n2820 fi-snb-2520m
Missing (5): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-bdw-samus

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

* IGT: IGT_4761 -> IGTPW_2221

CI_DRM_5402: bfde6b780f9b2a5ee0dc3535917c42d1e5234a3f @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2221: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2221/
IGT_4761: e7fb96af70605a6a8fa4838c5ca7c132c8b5e942 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

#2 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for Make force work with multiple drivers available

In reply to Rodrigo Siqueira
== Series Details ==

== Series Details ==

Series: Make force work with multiple drivers available
URL : https://patchwork.freedesktop.org/series/55059/
State : failure

== Summary ==

CI Bug Log - changes from IGT_4761_full -> IGTPW_2221_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_2221_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_2221_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://patchwork.freedesktop.org/api/1.0/series/55059/revisions/1/mbox/

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

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

### IGT changes ###

#### Possible regressions ####

* igt@gem_userptr_blits@readonly-unsync:
- shard-apl: PASS -> TIMEOUT

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_isolation@rcs0-s3:
- shard-kbl: PASS -> INCOMPLETE [fdo#103665]

* igt@gem_exec_schedule@pi-ringfull-vebox:
- shard-glk: NOTRUN -> FAIL [fdo#103158]

* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
- shard-kbl: PASS -> DMESG-WARN [fdo#107956]

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

* igt@kms_cursor_crc@cursor-256x85-sliding:
- shard-kbl: PASS -> FAIL [fdo#103232]
- shard-glk: PASS -> FAIL [fdo#103232]

* igt@kms_flip@2x-modeset-vs-vblank-race-interruptible:
- shard-glk: PASS -> FAIL [fdo#103060]

* igt@kms_flip@modeset-vs-vblank-race-interruptible:
- shard-hsw: PASS -> DMESG-WARN [fdo#102614]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-move:
- shard-kbl: PASS -> FAIL [fdo#103167] +1

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-onoff:
- shard-glk: PASS -> FAIL [fdo#103167] +4

* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-kbl: PASS -> DMESG-WARN [fdo#108566]

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

* igt@kms_plane@plane-position-covered-pipe-a-planes:
- shard-kbl: PASS -> FAIL [fdo#103166]

* igt@kms_plane_alpha_blend@pipe-c-alpha-transparant-fb:
- shard-glk: NOTRUN -> FAIL [fdo#108145]

* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-max:
- shard-glk: PASS -> FAIL [fdo#108145]

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

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

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

#### Possible fixes ####

* igt@gem_userptr_blits@readonly-unsync:
- shard-glk: TIMEOUT [fdo#108887] -> PASS

* igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
- shard-glk: FAIL [fdo#108145] -> PASS

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

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

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

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-apl: FAIL [fdo#103167] -> PASS +3

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-move:
- shard-glk: FAIL [fdo#103167] -> PASS +4

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

* igt@kms_plane@plane-position-covered-pipe-b-planes:
- shard-kbl: FAIL [fdo#103166] -> PASS

* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
- shard-kbl: FAIL [fdo#108145] -> PASS
- shard-apl: FAIL [fdo#108145] -> PASS

* igt@kms_plane_multiple@atomic-pipe-b-tiling-none:
- shard-glk: FAIL [fdo#103166] -> PASS +6

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

* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-glk: DMESG-WARN [fdo#105763] / [fdo#106538] -> PASS

#### Warnings ####

* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-kbl: DMESG-WARN [fdo#105604] -> DMESG-FAIL [fdo#108950]

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

[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
[fdo#103158]: https://bugs.freedesktop.org/show_bug.cgi?id=103158
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#105604]: https://bugs.freedesktop.org/show_bug.cgi?id=105604
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#106538]: https://bugs.freedesktop.org/show_bug.cgi?id=106538
[fdo#107469]: https://bugs.freedesktop.org/show_bug.cgi?id=107469
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108887]: https://bugs.freedesktop.org/show_bug.cgi?id=108887
[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#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (7 -> 5)
------------------------------

Missing (2): shard-skl shard-iclb

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

* IGT: IGT_4761 -> IGTPW_2221

CI_DRM_5402: bfde6b780f9b2a5ee0dc3535917c42d1e5234a3f @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2221: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2221/
IGT_4761: e7fb96af70605a6a8fa4838c5ca7c132c8b5e942 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

Reviewed-by on v1 1/1
#3 lore raw
In reply to Rodrigo Siqueira
Quoted 17 lines · Rodrigo Siqueira

The force option allows users to specify which driver they want that IGT uses. Nonetheless, if the user has two or more loaded drivers in his system, the force option will not work as expected because IGT will take the first driver found at /dev/dri. This problem can be reproduced in a QEMU VM that using Bochs and VKMS. This patch handles this scenario by ensuring that IGT uses the forced module specified via IGT_FORCE_DRIVER.

---
 lib/drmtest.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
lib/drmtest.c +0 -0
index 35914c50..7c124ac6 100644

lib/drmtest.c static int open_device(const char *name, unsigned int chipset) · line 254

Quoted 9 lines
lib/drmtest.c +2 -4
@@ -250,10 +250,8 @@ static int open_device(const char *name, unsigned int chipset)
 		goto err;
 
 	forced = forced_driver();
-	if (forced && chipset == DRIVER_ANY && !strcmp(forced, dev_name)) {
-		igt_debug("Force option used: Using driver %s\n", dev_name);
-		return fd;
-	}
+	if (forced && chipset == DRIVER_ANY && strcmp(forced, dev_name))
+		goto err;

Yep, an obvious logic error by me.

and merging this momentarily.
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#4 lore raw
Quoted 31 lines · Petri Latvala
Quoted 17 lines · Rodrigo Siqueira

The force option allows users to specify which driver they want that IGT uses. Nonetheless, if the user has two or more loaded drivers in his system, the force option will not work as expected because IGT will take the first driver found at /dev/dri. This problem can be reproduced in a QEMU VM that using Bochs and VKMS. This patch handles this scenario by ensuring that IGT uses the forced module specified via IGT_FORCE_DRIVER.

---
 lib/drmtest.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
lib/drmtest.c +0 -0
index 35914c50..7c124ac6 100644

lib/drmtest.c static int open_device(const char *name, unsigned int chipset) · line 254

Quoted 9 lines
lib/drmtest.c +2 -4
@@ -250,10 +250,8 @@ static int open_device(const char *name, unsigned int chipset)
 		goto err;
 
 	forced = forced_driver();
-	if (forced && chipset == DRIVER_ANY && !strcmp(forced, dev_name)) {
-		igt_debug("Force option used: Using driver %s\n", dev_name);
-		return fd;
-	}
+	if (forced && chipset == DRIVER_ANY && strcmp(forced, dev_name))
+		goto err;

Yep, an obvious logic error by me.

Quoted 3 lines

and merging this momentarily.

Thanks for the review and merging :)
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev