diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-02-05 11:16:18 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-02-05 13:31:29 +0000 |
commit | ffbc59a3ef9b0d4347c43fd03681bbbd9d0e43d8 (patch) | |
tree | ea99431cf378ea193adeb567247f6dde715896d7 /lib/ioctl_wrappers.c | |
parent | e7faf33ec791b78b2bf1ebb81be228364c3439c4 (diff) |
lib: Silence a common debug message when creating a context
In context tests, we may create thousands of contexts, the noise from
each requirement passing drowning out the real information. Let's only
do the requirement test (to detect if contexts are meant to be supported
or plain broken) only on the error path.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/ioctl_wrappers.c')
-rw-r--r-- | lib/ioctl_wrappers.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index 6b9d00ae..f371bf07 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -771,12 +771,14 @@ int gem_madvise(int fd, uint32_t handle, int state) uint32_t gem_context_create(int fd) { struct drm_i915_gem_context_create create; - int ret; memset(&create, 0, sizeof(create)); - ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_CONTEXT_CREATE, &create); - igt_require(ret == 0 || (errno != ENODEV && errno != EINVAL)); - igt_assert(ret == 0); + if (drmIoctl(fd, DRM_IOCTL_I915_GEM_CONTEXT_CREATE, &create)) { + int err = -errno; + igt_skip_on(err == -ENODEV || errno == -EINVAL); + igt_assert_eq(err, 0); + } + igt_assert(create.ctx_id != 0); errno = 0; return create.ctx_id; |