tests/gem_ctx_bad_exec: Check the errno, too
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 5 Nov 2013 10:56:50 +0000 (11:56 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 5 Nov 2013 12:42:47 +0000 (13:42 +0100)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
tests/gem_ctx_bad_exec.c

index 3f6f34d..1c6aade 100644 (file)
@@ -101,12 +101,12 @@ igt_main
        igt_subtest("render")
                igt_assert(exec(fd, handle, I915_EXEC_RENDER, ctx_id) == 0);
        igt_subtest("bsd")
-               igt_assert(exec(fd, handle, I915_EXEC_BSD, ctx_id) != 0);
+               igt_assert(exec(fd, handle, I915_EXEC_BSD, ctx_id) != 0 && errno == ENOENT);
        igt_subtest("blt")
-               igt_assert(exec(fd, handle, I915_EXEC_BLT, ctx_id) != 0);
+               igt_assert(exec(fd, handle, I915_EXEC_BLT, ctx_id) != 0 && errno == ENOENT);
 #ifdef I915_EXEC_VEBOX
        igt_require(gem_has_vebox(fd));
        igt_subtest("vebox")
-               igt_assert(exec(fd, handle, I915_EXEC_VEBOX, ctx_id) != 0);
+               igt_assert(exec(fd, handle, I915_EXEC_VEBOX, ctx_id) != 0 && errno == ENOENT);
 #endif
 }