Message ID | 1438717991-4743-1-git-send-email-paulo.r.zanoni@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Aug 04, 2015 at 04:53:11PM -0300, Paulo Zanoni wrote: > If the Kernel is too old, getparam will return -EINVAL. Just SKIP on > this case. Nope. Just replace do_ioctl() with drmIoctl. Better would be to actually do a gem_get_param(). -Chris
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) { /*
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@chris-wilson.co.uk> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> --- tests/gem_mmap_wc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)