After i915 commit: commit bd008e5b2953186fc0c6633a885ade95e7043800 Author: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> Date: Tue Oct 7 14:13:51 2014 +0100 drm: Implement O_NONBLOCK support on /dev/dri/cardN the return value for drm short_buffer read is -1 and errno is EAGAIN. Signed-off-by: Xiong Zhang <xiong.y.zhang@xxxxxxxxx> --- tests/drm_read.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/drm_read.c b/tests/drm_read.c index 334f26a..a17d981 100644 --- a/tests/drm_read.c +++ b/tests/drm_read.c @@ -145,7 +145,8 @@ static void test_short_buffer(int in, int nonblock) alarm(3); - igt_assert_eq(read(fd, buffer, 4), 0); + igt_assert_eq(read(fd, buffer, 4), -1); + igt_assert_eq(errno, EAGAIN); igt_assert(read(fd, buffer, 40) > 0); igt_assert(read(fd, buffer, 40) > 0); -- 1.7.9.5 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx