Re: [LTP] [PATCH] eventfd01: should to check ret in overflow_poll_test()

Subrata Modak
2010-05-07T05:46:53Z

On Thu, 2010-05-06 at 11:01 -0700, Garrett Cooper wrote:
> On Thu, May 6, 2010 at 2:25 AM, Shi Weihua <shiwh@cn.fujitsu.com> wrote:
> > We should to check the return value of trigger_eventfd_overflow()
> > in overflow_poll_test().
> >
> > Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com>
> > ---
> > diff --git a/testcases/kernel/syscalls/eventfd/eventfd01.c b/testcases/kernel/syscalls/eventfd/eventfd01.c
> > index 83eb86e..ce55746 100644
> > --- a/testcases/kernel/syscalls/eventfd/eventfd01.c
> > +++ b/testcases/kernel/syscalls/eventfd/eventfd01.c
> > @@ -602,7 +602,7 @@ static void overflow_poll_test(int evfd)
> > int ret;
> >
> > ret = trigger_eventfd_overflow(evfd, &fd, &ctx);
> > - if (fd == -1) {
> > + if (ret == -1) {
> > tst_resm(TBROK, "error triggering eventfd overflow");
> > return;
> > }
>
> Acked-by: Garrett Cooper <yanegomi@gmail.com>

Thanks. Just checked in.

Regards--
Subrata