mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-06 23:46:28 +00:00
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>
This commit is contained in:
parent
e7faf33ec7
commit
ffbc59a3ef
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user