diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-19 11:09:25 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-19 11:09:25 +0200 |
commit | 8dbd1fb9d4ecdd686dac13fb64f7af02480ea849 (patch) | |
tree | a011c42d9a552b8b02e7210aeefa04a4547b8389 /tests/gem_ctx_create.c | |
parent | 9ad062d0b30f307cd5045ba03eeb7d2fa90487b0 (diff) |
lib/drmtest: igt_skip when drm_get_card fails
Also add printf support to igt_skip to make sure there's always a
reason why we fail a testcase.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_ctx_create.c')
-rw-r--r-- | tests/gem_ctx_create.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/gem_ctx_create.c b/tests/gem_ctx_create.c index f451910f..f22522b8 100644 --- a/tests/gem_ctx_create.c +++ b/tests/gem_ctx_create.c @@ -51,9 +51,8 @@ int main(int argc, char *argv[]) ret = drmIoctl(fd, CONTEXT_CREATE_IOCTL, &create); if (ret != 0 && (errno == ENODEV || errno == EINVAL)) { - printf("Kernel is too old, or contexts not supported: %s\n", - strerror(errno)); - igt_skip(); + igt_skip("Kernel is too old, or contexts not supported: %s\n", + strerror(errno)); } else if (ret != 0) { fprintf(stderr, "%s\n", strerror(errno)); igt_fail(1); |