All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Petri Latvala <petri.latvala@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Accept missing FBC debugfs files
Date: Thu, 25 Nov 2021 12:09:25 +0200	[thread overview]
Message-ID: <YZ9g1Zvk++/p9hnv@intel.com> (raw)
In-Reply-To: <YZ9egohEQkiod7dW@platvala-desk.ger.corp.intel.com>

On Thu, Nov 25, 2021 at 11:59:30AM +0200, Petri Latvala wrote:
> On Thu, Nov 25, 2021 at 11:50:06AM +0200, Ville Syrjälä wrote:
> > On Wed, Nov 24, 2021 at 05:25:06PM +0200, Petri Latvala wrote:
> > > On Wed, Nov 24, 2021 at 05:12:45PM +0200, Ville Syrjala wrote:
> > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > 
> > > > With multiple FBC instances becoming a thing at some point
> > > > the current plan is to go with separate debugfs files for
> > > > each FBC instance. Which also means that if there is no
> > > > FBC there will be no debugfs files either. Adapt the test
> > > > to tolerate such conditions.
> > > > 
> > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > ---
> > > >  tests/i915/kms_frontbuffer_tracking.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/tests/i915/kms_frontbuffer_tracking.c b/tests/i915/kms_frontbuffer_tracking.c
> > > > index d6a884926c48..532bfbb9b481 100644
> > > > --- a/tests/i915/kms_frontbuffer_tracking.c
> > > > +++ b/tests/i915/kms_frontbuffer_tracking.c
> > > > @@ -724,7 +724,7 @@ static void __debugfs_read(const char *param, char *buf, int len)
> > > >  {
> > > >  	len = igt_debugfs_simple_read(drm.debugfs, param, buf, len);
> > > >  	if (len < 0)
> > > > -		igt_assert_eq(len, -ENODEV);
> > > > +		igt_assert(len == -ENOENT || len == -ENODEV);
> > > 
> > > If this fires, we now lose the information on what the error
> > > was. Although we automatically print errno in that case, is the error
> > > in there?
> > 
> > Not quite sure what you're asking here. But at least igt_assert() will
> > still print the errno here, if that's what you're asking.
> 
> igt_assert_eq prints the value of "len" if it's not -ENODEV,
> igt_assert doesn't. What I'm asking is whether igt_debugfs_simple_read
> leaves the error it returns in errno. I could check but ECOFFEE.

Yes, errno seems to be preserved.

Quick check of the code agrees. Well, except for the case of close()
failing after read() failed, which would clobber the errno from read().
But close() failing would be pretty nuts.

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2021-11-25 10:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24 15:12 [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Accept missing FBC debugfs files Ville Syrjala
2021-11-24 15:25 ` Petri Latvala
2021-11-25  9:50   ` Ville Syrjälä
2021-11-25  9:59     ` Petri Latvala
2021-11-25 10:09       ` Ville Syrjälä [this message]
2021-11-25 10:24         ` Petri Latvala
2021-11-24 16:42 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-11-24 18:23 ` [igt-dev] ✓ Fi.CI.IGT: " 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=YZ9g1Zvk++/p9hnv@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=petri.latvala@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.