[igt-dev] [PATCH i-g-t] kms_pipe_crc_basic: Skip when hitting -EIO

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Thu Aug 2 13:53:14 UTC 2018


-EIO is returned when the crtc is not active, in which case we skip the test
because the parsing of the parameter in crtc-0/crc/control is not done.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Reported-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/kms_pipe_crc_basic.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index 920eb6e06d37..852f1697274c 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -49,8 +49,10 @@ static struct {
 static void test_bad_source(data_t *data)
 {
 	errno = 0;
-	if (igt_sysfs_set(data->debugfs, "crtc-0/crc/control", "foo"))
+	if (igt_sysfs_set(data->debugfs, "crtc-0/crc/control", "foo")) {
 		igt_assert(openat(data->debugfs, "crtc-0/crc/data", O_WRONLY) == -1);
+		igt_skip_on(errno == EIO);
+	}
 
 	igt_assert_eq(errno, EINVAL);
 }
-- 
2.18.0



More information about the igt-dev mailing list