From 395abcda8865c75087dc0463190407c6f00d9961 Mon Sep 17 00:00:00 2001 From: José Roberto de Souza Date: Fri, 12 Oct 2018 14:28:26 -0700 Subject: lib: Skip tests that require fb modifiers when KMS is disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When KMS is disabled, drmGetCap() for DRM_CAP_ADDFB2_MODIFIERS() will return -1 and set errno as EOPNOTSUPP, the current assert was only checking for a sucess result or invalid argument causing prime_vgem@basic-fence-flip test to fail when KMS is disabled. Cc: Chris Wilson Signed-off-by: José Roberto de Souza Reviewed-by: Chris Wilson Signed-off-by: Rodrigo Vivi --- lib/ioctl_wrappers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ioctl_wrappers.c') diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index 0929c43f..bda9a764 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -1661,7 +1661,7 @@ void igt_require_fb_modifiers(int fd) int ret; ret = drmGetCap(fd, DRM_CAP_ADDFB2_MODIFIERS, &cap_modifiers); - igt_assert(ret == 0 || errno == EINVAL); + igt_assert(ret == 0 || errno == EINVAL || errno == EOPNOTSUPP); has_modifiers = ret == 0 && cap_modifiers == 1; cap_modifiers_tested = true; } -- cgit v1.2.3