All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] igt: Correct the return value for drm short_buffer read
@ 2014-12-23  7:52 Xiong Zhang
  2014-12-23  9:52 ` Chris Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Xiong Zhang @ 2014-12-23  7:52 UTC (permalink / raw)
  To: intel-gfx

After i915 commit:
commit bd008e5b2953186fc0c6633a885ade95e7043800
Author: Chris Wilson <chris@chris-wilson.co.uk>
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@intel.com>
---
 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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] igt: Correct the return value for drm short_buffer read
  2014-12-23  7:52 [PATCH] igt: Correct the return value for drm short_buffer read Xiong Zhang
@ 2014-12-23  9:52 ` Chris Wilson
  2014-12-23 10:14   ` Zhang, Xiong Y
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2014-12-23  9:52 UTC (permalink / raw)
  To: Xiong Zhang; +Cc: intel-gfx

On Tue, Dec 23, 2014 at 03:52:11PM +0800, Xiong Zhang wrote:
> After i915 commit:
> commit bd008e5b2953186fc0c6633a885ade95e7043800
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> 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.

No, it is not.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] igt: Correct the return value for drm short_buffer read
  2014-12-23  9:52 ` Chris Wilson
@ 2014-12-23 10:14   ` Zhang, Xiong Y
  2014-12-23 11:31     ` Chris Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Zhang, Xiong Y @ 2014-12-23 10:14 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

> -----Original Message-----
> From: Chris Wilson [mailto:chris@chris-wilson.co.uk]
> Sent: Tuesday, December 23, 2014 5:53 PM
> To: Zhang, Xiong Y
> Cc: intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH] igt: Correct the return value for drm
> short_buffer read
> 
> On Tue, Dec 23, 2014 at 03:52:11PM +0800, Xiong Zhang wrote:
> > After i915 commit:
> > commit bd008e5b2953186fc0c6633a885ade95e7043800
> > Author: Chris Wilson <chris@chris-wilson.co.uk>
> > 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.
> 
> No, it is not.
> -Chris
Without this patch, system fail in short-buffer-block and short-buffer-nonblock subtest.
With this patch, these two subtest could pass.
> 
> --
> Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] igt: Correct the return value for drm short_buffer read
  2014-12-23 10:14   ` Zhang, Xiong Y
@ 2014-12-23 11:31     ` Chris Wilson
  2014-12-26  1:16       ` Zhang, Xiong Y
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2014-12-23 11:31 UTC (permalink / raw)
  To: Zhang, Xiong Y; +Cc: intel-gfx

On Tue, Dec 23, 2014 at 10:14:15AM +0000, Zhang, Xiong Y wrote:
> > -----Original Message-----
> > From: Chris Wilson [mailto:chris@chris-wilson.co.uk]
> > Sent: Tuesday, December 23, 2014 5:53 PM
> > To: Zhang, Xiong Y
> > Cc: intel-gfx@lists.freedesktop.org
> > Subject: Re: [Intel-gfx] [PATCH] igt: Correct the return value for drm
> > short_buffer read
> > 
> > On Tue, Dec 23, 2014 at 03:52:11PM +0800, Xiong Zhang wrote:
> > > After i915 commit:
> > > commit bd008e5b2953186fc0c6633a885ade95e7043800
> > > Author: Chris Wilson <chris@chris-wilson.co.uk>
> > > 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.
> > 
> > No, it is not.
> > -Chris
> Without this patch, system fail in short-buffer-block and short-buffer-nonblock subtest.
> With this patch, these two subtest could pass.

That's the point of the test, the kernel behaviour is wrong. There is a
patch to fix the kernel.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] igt: Correct the return value for drm short_buffer read
  2014-12-23 11:31     ` Chris Wilson
@ 2014-12-26  1:16       ` Zhang, Xiong Y
  2014-12-26 11:22         ` Chris Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Zhang, Xiong Y @ 2014-12-26  1:16 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

> -----Original Message-----
> From: Chris Wilson [mailto:chris@chris-wilson.co.uk]
> Sent: Tuesday, December 23, 2014 7:31 PM
> To: Zhang, Xiong Y
> Cc: intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH] igt: Correct the return value for drm
> short_buffer read
> 
> On Tue, Dec 23, 2014 at 10:14:15AM +0000, Zhang, Xiong Y wrote:
> > > -----Original Message-----
> > > From: Chris Wilson [mailto:chris@chris-wilson.co.uk]
> > > Sent: Tuesday, December 23, 2014 5:53 PM
> > > To: Zhang, Xiong Y
> > > Cc: intel-gfx@lists.freedesktop.org
> > > Subject: Re: [Intel-gfx] [PATCH] igt: Correct the return value for
> > > drm short_buffer read
> > >
> > > On Tue, Dec 23, 2014 at 03:52:11PM +0800, Xiong Zhang wrote:
> > > > After i915 commit:
> > > > commit bd008e5b2953186fc0c6633a885ade95e7043800
> > > > Author: Chris Wilson <chris@chris-wilson.co.uk>
> > > > 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.
> > >
> > > No, it is not.
> > > -Chris
> > Without this patch, system fail in short-buffer-block and
> short-buffer-nonblock subtest.
> > With this patch, these two subtest could pass.
> 
> That's the point of the test, the kernel behaviour is wrong. There is a patch to fix
> the kernel.
> -Chris
[Zhang, Xiong Y] Oh, I know it. Thanks.
So could you send this patch to fix it ?
> 
> --
> Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] igt: Correct the return value for drm short_buffer read
  2014-12-26  1:16       ` Zhang, Xiong Y
@ 2014-12-26 11:22         ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2014-12-26 11:22 UTC (permalink / raw)
  To: Zhang, Xiong Y; +Cc: intel-gfx

On Fri, Dec 26, 2014 at 01:16:06AM +0000, Zhang, Xiong Y wrote:
> > -----Original Message-----
> > From: Chris Wilson [mailto:chris@chris-wilson.co.uk]
> > Sent: Tuesday, December 23, 2014 7:31 PM
> > To: Zhang, Xiong Y
> > Cc: intel-gfx@lists.freedesktop.org
> > Subject: Re: [Intel-gfx] [PATCH] igt: Correct the return value for drm
> > short_buffer read
> > 
> > On Tue, Dec 23, 2014 at 10:14:15AM +0000, Zhang, Xiong Y wrote:
> > > > -----Original Message-----
> > > > From: Chris Wilson [mailto:chris@chris-wilson.co.uk]
> > > > Sent: Tuesday, December 23, 2014 5:53 PM
> > > > To: Zhang, Xiong Y
> > > > Cc: intel-gfx@lists.freedesktop.org
> > > > Subject: Re: [Intel-gfx] [PATCH] igt: Correct the return value for
> > > > drm short_buffer read
> > > >
> > > > On Tue, Dec 23, 2014 at 03:52:11PM +0800, Xiong Zhang wrote:
> > > > > After i915 commit:
> > > > > commit bd008e5b2953186fc0c6633a885ade95e7043800
> > > > > Author: Chris Wilson <chris@chris-wilson.co.uk>
> > > > > 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.
> > > >
> > > > No, it is not.
> > > > -Chris
> > > Without this patch, system fail in short-buffer-block and
> > short-buffer-nonblock subtest.
> > > With this patch, these two subtest could pass.
> > 
> > That's the point of the test, the kernel behaviour is wrong. There is a patch to fix
> > the kernel.
> > -Chris
> [Zhang, Xiong Y] Oh, I know it. Thanks.
> So could you send this patch to fix it ?

http://patchwork.freedesktop.org/patch/38174/

Daniel wanted the igt test first...
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-12-26 11:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-23  7:52 [PATCH] igt: Correct the return value for drm short_buffer read Xiong Zhang
2014-12-23  9:52 ` Chris Wilson
2014-12-23 10:14   ` Zhang, Xiong Y
2014-12-23 11:31     ` Chris Wilson
2014-12-26  1:16       ` Zhang, Xiong Y
2014-12-26 11:22         ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.