Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v2] lib/igt_sysfs: Let igt_sysfs_read|write return -errno
Date: Thu, 7 Dec 2017 22:00:48 +0100	[thread overview]
Message-ID: <20171207210048.molvmgmlwsqlkrwp@phenom.ffwll.local> (raw)
In-Reply-To: <151266597612.25422.976799780542827210@mail.alporthouse.com>

On Thu, Dec 07, 2017 at 04:59:36PM +0000, Chris Wilson wrote:
> Quoting Michal Wajdeczko (2017-12-07 16:52:46)
> > In some cases debugfs or sysfs may return errors that we
> > want to check. Return -errno from helper functions to make
> > asserts easier.
> > 
> > v2: don't forget about EOF ret=0 (Chris)
> >     small re-write (Michal)
> > 
> > Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> 
> Just tests/drv_hangman.c needs to fixed to use
> igt_require(sysfs >= 0);

Isn't the usual igt pattern that igt_foo never fails, and __igt_foo gives
you the error code? But I guess we can do that later on in follow-ups.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-12-07 21:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 16:52 [PATCH i-g-t v2] lib/igt_sysfs: Let igt_sysfs_read|write return -errno Michal Wajdeczko
2017-12-07 16:59 ` Chris Wilson
2017-12-07 21:00   ` Daniel Vetter [this message]
2017-12-13 14:16     ` Michal Wajdeczko
2017-12-15 11:28   ` Chris Wilson
2017-12-07 19:26 ` ✓ Fi.CI.BAT: success for lib/igt_sysfs: Let igt_sysfs_read|write return -errno (rev2) Patchwork
2017-12-07 23:00 ` ✗ Fi.CI.IGT: 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=20171207210048.molvmgmlwsqlkrwp@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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