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@xxxxxxxxx> > >> --- > >> 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@xxxxxxxxxxxxxxx> > > > > 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@xxxxxxxxxxxxxxx https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4585/fi-kbl-x1275/igt@kms_pipe_crc_basic@xxxxxxxxxxxxxxx https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4585/fi-kbl-guc/igt@kms_pipe_crc_basic@xxxxxxxxxxxxxxx -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx