diff options
author | Mahesh Kumar <mahesh1.kumar@intel.com> | 2018-08-02 13:03:49 +0200 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2018-08-02 14:12:47 +0200 |
commit | f45685d3373f6d755bf3cb4100f148715d669379 (patch) | |
tree | 1d31465828da09804d652f53d8ea425ee2349dc7 /tests/kms_pipe_crc_basic.c | |
parent | 33f47ff4d64bd3996995dc5493deee26294e3aa3 (diff) |
tests/kms_pipe_crc_basic: expect setting bad source to fail, v2.
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>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> #v1
Changes since v1:
- Allow bad-source to succeed with current and future behavior. (mlankhorst)
- Test that errno is set to EINVAL.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
[mlankhorst: Modified test to work with both behaviors, as long as
errno is set to EINVAL]
Reviewed-by: Mahesh Kumar <mahesh1.kumar@intel.com>
Diffstat (limited to 'tests/kms_pipe_crc_basic.c')
-rw-r--r-- | tests/kms_pipe_crc_basic.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c index 235fdc38..920eb6e0 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); + + igt_assert_eq(errno, EINVAL); } #define N_CRCS 3 |