[Intel-gfx] [PATCH igt] tests/gem_mmap_wc: SKIP if the Kernel is too old for the getparam flag
Paulo Zanoni
paulo.r.zanoni at intel.com
Tue Aug 4 12:53:11 PDT 2015
If the Kernel is too old, getparam will return -EINVAL. Just SKIP on
this case.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89739
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
---
tests/gem_mmap_wc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/gem_mmap_wc.c b/tests/gem_mmap_wc.c
index 6e43465..f9d001a 100644
--- a/tests/gem_mmap_wc.c
+++ b/tests/gem_mmap_wc.c
@@ -93,6 +93,7 @@ test_invalid_flags(int fd)
struct local_i915_gem_mmap_v2 arg;
uint64_t flag = I915_MMAP_WC;
int val = -1;
+ int rc;
memset(&arg, 0, sizeof(arg));
arg.handle = gem_create(fd, 4096);
@@ -104,7 +105,9 @@ test_invalid_flags(int fd)
gp.value = &val;
/* Do we have the new mmap_ioctl? */
- do_ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
+ rc = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
+ igt_skip_on(rc == -1 && errno == EINVAL);
+ igt_assert(rc == 0);
if (val >= 1) {
/*
--
2.4.6
More information about the Intel-gfx
mailing list