Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Petri Latvala <adrinael@adrinael.net>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] tests/i915_suspend: Free device list after *-without-i915 subtests
Date: Tue, 14 Feb 2023 08:15:25 +0200	[thread overview]
Message-ID: <Y+sm/Zr9LM8CK0IT@adrinael.net> (raw)
In-Reply-To: <20230213095139.c5gcznwdf4a5kpgo@zkempczy-mobl2>

On Mon, Feb 13, 2023 at 10:51:39AM +0100, Zbigniew Kempczyński wrote:
> On Fri, Feb 10, 2023 at 10:33:21PM +0100, Janusz Krzysztofik wrote:
> > On Thursday, 9 February 2023 20:32:31 CET Janusz Krzysztofik wrote:
> > > If any of *-without-i915 subtests fails or skips for any reason, it may
> > > leave the i915 module unloaded while keeping our device list populated
> > > with initially collected data.  In a follow up igt_fixture section we then
> > > try to reopen the device.  If the test has been executed with a device
> > > filter specified, an attempt to open the device finds a matching entry
> > > that belongs to the no longer existing device in that initially collected
> > > device list, fails to stat() it, concludes that's because of the device
> > > having been already open, and returns an error.
> > > 
> > > Fix this potentially confusing test result by freeing the potentially
> > > outdated device list before continuing with drm_open_driver().
> > 
> > Freeing device list occurred not safe if device scan was not performed before.  
> > I can see 3 potential solutions:
> > 1) force device rescan instead of free before calling drm_open_driver(),
> > 2) teach igt_device_free() to return immediately if the device list has not 
> >    been allocated,
> > 3) provide a has_device_list() helper for to be used if not sure before 
> >    calling igt_device_free().
> > 
> > Any preferences?
> 
> I would enforce rescan.
> 
> BTW I wonder how it can happen if runner is executing each subtest
> in new process so you're starting from scratch and rescan should be
> executed automatically.
> 
> Is is the case you're running few tests from the console?

For the record, igt_runner has --multiple-mode where multiple subtests
are executed in the same exec.


-- 
Petri Latvala

      parent reply	other threads:[~2023-02-14  6:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-09 19:32 [igt-dev] [PATCH i-g-t] tests/i915_suspend: Free device list after *-without-i915 subtests Janusz Krzysztofik
2023-02-09 21:03 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-02-10 14:02 ` [igt-dev] [PATCH i-g-t] " Kamil Konieczny
2023-02-10 14:21   ` Janusz Krzysztofik
2023-02-10 16:28     ` Kamil Konieczny
2023-02-10 15:30 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
2023-02-10 21:33 ` [igt-dev] [PATCH i-g-t] " Janusz Krzysztofik
2023-02-13  9:51   ` [igt-dev] [Intel-gfx] " Zbigniew Kempczyński
2023-02-13 10:10     ` Janusz Krzysztofik
2023-02-14  6:15     ` Petri Latvala [this message]

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=Y+sm/Zr9LM8CK0IT@adrinael.net \
    --to=adrinael@adrinael.net \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --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