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

Garrett Cooper
2010-05-06T18:03:24Z

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>