Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "José Expósito" <jose.exposito89@gmail.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org,
	"Louis Chauvet" <louis.chauvet@bootlin.com>,
	"Mark Yacoub" <markyacoub@google.com>,
	"Juha-Pekka Heikkila" <juhapekka.heikkila@gmail.com>,
	"Juha-Pekka Heikkila" <juha-pekka.heikkila@intel.com>,
	"Karthik B S" <karthik.b.s@intel.com>,
	"Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Subject: Re: [PATCH i-g-t 0/1] Fix drm_open_driver() with IGT_FORCE_DRIVER and DRIVER_ANY
Date: Thu, 16 Oct 2025 19:48:30 +0200	[thread overview]
Message-ID: <aPEv7ppyJ9Mocr_6@fedora> (raw)
In-Reply-To: <20251016160544.122657-1-kamil.konieczny@linux.intel.com>

Hey Kamil,

On Thu, Oct 16, 2025 at 06:05:42PM +0200, Kamil Konieczny wrote:
> With recent addition of VKMS it was discovered that
> IGT_FORCE_DRIVER didn't help with testing on Virtual Machines.
> Imho when user sets forced driver than DRIVER_ANY should allow
> testing this driver even if it will cause skips or fails.
> 
> I tested this with the help of vgem driver, normal run without
> any env vars:
> 
> $ sudo build/tests/core_getversion --r basic
> IGT-Version: 2.2-NO-GIT (x86_64) (Linux: 6.14.0-33-generic x86_64)
> Using IGT_SRANDOM=1760622038 for randomisation
> Opened device: /dev/dri/card0
> Starting subtest: basic
> 0: i915 v1.6 0 Intel Graphics
> Subtest basic: SUCCESS (0.000s)
> 
> Now run with forced driver fails due to no fd opened:
> 
> $ sudo IGT_FORCE_DRIVER=vgem build/tests/core_getversion --r basic
> ...
> (core_getversion:28545) CRITICAL: Test assertion failure function __igt_unique____real_main84, file ../tests/core_getversion.c:91:
> (core_getversion:28545) CRITICAL: Failed assertion: fd >= 0
> (core_getversion:28545) CRITICAL: Last errno: 2, No such file or directory
> (core_getversion:28545) CRITICAL: file descriptor fd failed
> (core_getversion:28545) igt_core-INFO: Stack trace:
> (core_getversion:28545) igt_core-INFO:   #0 ../lib/igt_core.c:2075 __igt_fail_assert()
> (core_getversion:28545) igt_core-INFO:   #1 ../tests/core_getversion.c:106 __igt_unique____real_main84()
> (core_getversion:28545) igt_core-INFO:   #2 ../tests/core_getversion.c:84 main()
> (core_getversion:28545) igt_core-INFO:   #3 ../sysdeps/nptl/libc_start_call_main.h:74 __libc_start_call_main()
> (core_getversion:28545) igt_core-INFO:   #4 ../csu/libc-start.c:128 __libc_start_main@@GLIBC_2.34()
> (core_getversion:28545) igt_core-INFO:   #5 [_start+0x25]
> ****  END  ****
> Subtest basic: FAIL (0.000s)
> 
> After a proposed fix:
> 
> $ sudo IGT_FORCE_DRIVER=vgem build/tests/core_getversion --r basic
> IGT-Version: 2.2-NO-GIT (x86_64) (Linux: 6.14.0-33-generic x86_64)
> Using IGT_SRANDOM=1760622054 for randomisation
> Opened device: /dev/dri/card1
> Starting subtest: basic
> 0: vgem v1.0 0 Virtual GEM provider
> Subtest basic: SUCCESS (0.000s)

I tested this with VKMS both for a test that is selecting DRIVER_ANY (kms_plane.c)
and for a test that uses "drm_load_module(DRIVER_VKMS)" (vkms_configfs.c) and in
both cases I was able to force VKMS using IGT_FORCE_DRIVER="vkms".

I also tried to set IGT_FORCE_DRIVER to a valid driver in my system (i915) and to
a random value ("foo") and both cases are correctly handled.

Tested-by: José Expósito <jose.exposito89@gmail.com>

Thanks!
 
> Cc: Louis Chauvet <louis.chauvet@bootlin.com>
> Cc: Mark Yacoub <markyacoub@google.com>
> Cc: José Expósito <jose.exposito89@gmail.com>
> Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> Cc: Juha-Pekka Heikkila <juha-pekka.heikkila@intel.com>
> Cc: Karthik B S <karthik.b.s@intel.com>
> Cc: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
> 
> Kamil Konieczny (1):
>   lib/drmtest: Fix device opening with DRIVER_ANY
> 
>  lib/drmtest.c | 25 ++++++++++++++++++-------
>  1 file changed, 18 insertions(+), 7 deletions(-)
> 
> -- 
> 2.51.0
> 

  parent reply	other threads:[~2025-10-16 17:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16 16:05 [PATCH i-g-t 0/1] Fix drm_open_driver() with IGT_FORCE_DRIVER and DRIVER_ANY Kamil Konieczny
2025-10-16 16:05 ` [PATCH i-g-t 1/1] lib/drmtest: Fix device opening with DRIVER_ANY Kamil Konieczny
2025-10-16 17:48 ` José Expósito [this message]
2025-10-17  2:58 ` ✗ i915.CI.BAT: failure for Fix drm_open_driver() with IGT_FORCE_DRIVER and DRIVER_ANY Patchwork
2025-10-20  8:40   ` Kamil Konieczny
2025-10-17  3:01 ` ✓ Xe.CI.BAT: success " Patchwork
2025-10-18  1:05 ` ✗ Xe.CI.Full: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aPEv7ppyJ9Mocr_6@fedora \
    --to=jose.exposito89@gmail.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juha-pekka.heikkila@intel.com \
    --cc=juhapekka.heikkila@gmail.com \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=karthik.b.s@intel.com \
    --cc=louis.chauvet@bootlin.com \
    --cc=markyacoub@google.com \
    --cc=zbigniew.kempczynski@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox