All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Mahesh Kumar <mahesh1.kumar@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] tests/kms_pipe_crc_basic: expect setting bad source to fail
Date: Thu, 02 Aug 2018 14:03:09 +0100	[thread overview]
Message-ID: <153321498938.13234.10136091334596157126@skylake-alporthouse-com> (raw)
In-Reply-To: <387a425a-8177-84e8-5ae9-e884c28ad3d7@linux.intel.com>

Quoting Maarten Lankhorst (2018-08-02 11:42:32)
> Op 02-07-18 om 13:27 schreef Maarten Lankhorst:
> > Op 02-07-18 om 13:16 schreef Mahesh Kumar:
> >> Now crc-core framework verifies the source string passed by the user.
> >> So setting bad-source will fail. Expect file write to fail in bad-source
> >> subtest of kms_pipe_crc_basic.
> >>
> >> Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
> >> ---
> >>  tests/kms_pipe_crc_basic.c | 3 +--
> >>  1 file changed, 1 insertion(+), 2 deletions(-)
> >>
> >> diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
> >> index 235fdc38..2d4dfee8 100644
> >> --- a/tests/kms_pipe_crc_basic.c
> >> +++ b/tests/kms_pipe_crc_basic.c
> >> @@ -48,8 +48,7 @@ static struct {
> >>  
> >>  static void test_bad_source(data_t *data)
> >>  {
> >> -    igt_assert(igt_sysfs_set(data->debugfs, "crtc-0/crc/control", "foo"));
> >> -    igt_assert(openat(data->debugfs, "crtc-0/crc/data", O_WRONLY) == -1);
> >> +    igt_assert(!igt_sysfs_set(data->debugfs, "crtc-0/crc/control", "foo"));
> >>  }
> >>  
> >>  #define N_CRCS      3
> > New behavior makes more sense.
> >
> > Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> >
> > Do you have igt commit rights?
> >
> Any objections if we change this to allow both behaviors?
> 
> diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
> index 235fdc386ba2..91909fa42f2f 100644
> --- a/tests/kms_pipe_crc_basic.c
> +++ b/tests/kms_pipe_crc_basic.c
> @@ -48,8 +48,11 @@ static struct {
>  
>  static void test_bad_source(data_t *data)
>  {
> -       igt_assert(igt_sysfs_set(data->debugfs, "crtc-0/crc/control", "foo"));
> -       igt_assert(openat(data->debugfs, "crtc-0/crc/data", O_WRONLY) == -1);
> +       errno = 0;
> +       if (igt_sysfs_set(data->debugfs, "crtc-0/crc/control", "foo"))
> +               igt_assert(openat(data->debugfs, "crtc-0/crc/data", O_WRONLY) == -1);
> +       else
> +               igt_assert_eq(errno, EINVAL);

Current errno is EIO
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4585/fi-bsw-n3050/igt@kms_pipe_crc_basic@bad-source.html
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4585/fi-kbl-x1275/igt@kms_pipe_crc_basic@bad-source.html
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4585/fi-kbl-guc/igt@kms_pipe_crc_basic@bad-source.html
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-08-02 13:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-02 11:16 [PATCH i-g-t] tests/kms_pipe_crc_basic: expect setting bad source to fail Mahesh Kumar
2018-07-02 11:27 ` Maarten Lankhorst
2018-07-03  6:04   ` Kumar, Mahesh
2018-08-02 10:42   ` Maarten Lankhorst
2018-08-02 10:43     ` Maarten Lankhorst
2018-08-02 11:05       ` Kumar, Mahesh
2018-08-02 13:03     ` Chris Wilson [this message]
2018-08-02 13:53       ` Maarten Lankhorst
2018-07-02 15:43 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-08-02 11:41 ` ✓ Fi.CI.BAT: success for tests/kms_pipe_crc_basic: expect setting bad source to fail (rev2) Patchwork
2018-08-02 13:41 ` ✓ 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=153321498938.13234.10136091334596157126@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mahesh1.kumar@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.