All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Stone <daniel@fooishbar.org>
To: Eric Anholt <eric@anholt.net>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH igt 4/9] igt/vc4_wait_bo: Add a test for VC4's wait-for-BO ioctl.
Date: Thu, 4 Feb 2016 15:22:33 +0000	[thread overview]
Message-ID: <CAPj87rOTXhUbvb5aK9X6ghnfLhAs1q8wfrBcOQBFz-Q-G5Yq4g@mail.gmail.com> (raw)
In-Reply-To: <1454535703-660-4-git-send-email-eric@anholt.net>

Hi,

On 3 February 2016 at 21:41, Eric Anholt <eric@anholt.net> wrote:
> +               ret = ioctl(fd, DRM_IOCTL_VC4_WAIT_BO, &arg);
> +               igt_assert(ret == -1 && errno == EINVAL);

A couple of nitpicks: all these should be either do_ioctl() for
success, or do_ioctl_err() for failure, which not only cuts down the
number of lines a bit, but also shows you the exact condition which
occurred (e.g. it'll show that errno was -EBUSY rather than expected
-EINVAL without having to round-trip through the reporter). Similarly,
all your igt_assert(x == y) should be igt_assert_eq(x, y), or any of
the igt_assert_{eq,neq} variants, e.g. _u32 for comparing uint32_t.
You can also use do_or_die(foo) as shorthand for igt_assert_eq(foo,
0).

With those addressed:
Reviewed-by: Daniel Stone <daniels@collabora.com>

Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-02-04 15:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 21:41 [PATCH igt 1/9] configure.ac: Test for libdrm_vc4 and build vc4 tests based on it Eric Anholt
2016-02-03 21:41 ` [PATCH igt 2/9] igt: Add support for DRIVER_VC4 flags on tests Eric Anholt
2016-02-03 21:41 ` [PATCH igt 3/9] igt/vc4_wait_seqno: Add a test for VC4's wait-for-seqno ioctl Eric Anholt
2016-02-03 21:41 ` [PATCH igt 4/9] igt/vc4_wait_bo: Add a test for VC4's wait-for-BO ioctl Eric Anholt
2016-02-04 15:22   ` Daniel Stone [this message]
2016-02-04 21:43     ` Eric Anholt
2016-02-03 21:41 ` [PATCH igt 5/9] igt: Add a helper function for getting a VC4 BO that's been drawn to Eric Anholt
2016-02-03 21:41 ` [PATCH igt 6/9] igt: Add a helper function for mapping VC4 BOs Eric Anholt
2016-02-03 21:41 ` [PATCH igt 7/9] igt: Add a helper function for creating " Eric Anholt
2016-02-03 21:41 ` [PATCH igt 8/9] igt/vc4_create_bo: Test various paths in BO creation Eric Anholt
2016-02-03 21:41 ` [PATCH igt 9/9] igt/vc4_wait_bo: Add tests with rendering performed Eric Anholt

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=CAPj87rOTXhUbvb5aK9X6ghnfLhAs1q8wfrBcOQBFz-Q-G5Yq4g@mail.gmail.com \
    --to=daniel@fooishbar.org \
    --cc=eric@anholt.net \
    --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 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.