public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: Lyude <lyude@redhat.com>
Cc: igt-dev@lists.freedesktop.org, nouveau@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 1/4] lib/igt_core: Add igt_require_fd()
Date: Wed, 18 Mar 2020 10:12:18 +0200	[thread overview]
Message-ID: <20200318081218.GI9497@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20200318010047.237024-2-lyude@redhat.com>

On Tue, Mar 17, 2020 at 09:00:44PM -0400, Lyude wrote:
> From: Lyude Paul <lyude@redhat.com>
> 
> Like igt_assert_fd(), but using igt_require() instead
> 
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> ---
>  lib/igt_core.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/lib/igt_core.h b/lib/igt_core.h
> index fae5f59e..b66336cf 100644
> --- a/lib/igt_core.h
> +++ b/lib/igt_core.h
> @@ -1008,6 +1008,18 @@ void igt_describe_f(const char *fmt, ...);
>  	else igt_debug("Test requirement passed: %s\n", #expr); \
>  } while (0)
>  
> +/**
> + * igt_require_fd:
> + * @fd: file descriptor
> + *
> + * Skips (sub-) test if the given file descriptor is invalid.
> + *
> + * Like igt_require(), but displays the values being compared on failure instead
> + * of simply printing the stringified expression..

igt_assert_fd has this documentation comment, but that's mistakenly
copypasted from igt_assert_eq and pals. Let's not propagate the
copypaste error further.


-- 
Petri Latvala


> + */
> +#define igt_require_fd(fd) \
> +	igt_require_f(fd >= 0, "file descriptor " #fd " failed\n");
> +
>  /**
>   * igt_skip_on_f:
>   * @expr: condition to test
> -- 
> 2.24.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2020-03-18  8:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18  1:00 [igt-dev] [PATCH i-g-t 0/4] Add nouveau-crc tests Lyude
2020-03-18  1:00 ` [igt-dev] [PATCH i-g-t 1/4] lib/igt_core: Add igt_require_fd() Lyude
2020-03-18  8:12   ` Petri Latvala [this message]
2020-03-18  1:00 ` [igt-dev] [PATCH i-g-t 2/4] lib/igt_debugfs: Add igt_debugfs_pipe_dir() Lyude
2020-03-18  1:00 ` [igt-dev] [PATCH i-g-t 3/4] lib/igt_kms: Hook up connector dithering prop Lyude
2020-03-18  1:00 ` [igt-dev] [PATCH i-g-t 4/4] tests: Add nouveau-crc tests Lyude
2020-03-18  8:19   ` Petri Latvala
2020-03-18  1:47 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
2020-03-18  2:05 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2020-03-18  8:32 ` [igt-dev] ✗ 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=20200318081218.GI9497@platvala-desk.ger.corp.intel.com \
    --to=petri.latvala@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=lyude@redhat.com \
    --cc=nouveau@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