[igt-dev] [PATCH i-g-t] tests/kms_color: Use igt_require more

Daniel Vetter
2019-04-03T13:50:49Z

Success is not the right status if the test does nothing. Fix that.

Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
tests/kms_color.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/kms_color.c b/tests/kms_color.c
index decf3c2a680e..d2352cf8a9ba 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -1135,8 +1135,7 @@ invalid_ctm_matrix_sizes(data_t *data)
igt_pipe_t *pipe = &display->pipes[0];
void *ptr;

- if (!igt_pipe_obj_has_prop(pipe, IGT_CRTC_CTM))
- return;
+ igt_require(igt_pipe_obj_has_prop(pipe, IGT_CRTC_CTM));

ptr = malloc(sizeof(struct _drm_color_ctm) * 4);

--
2.20.1