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

Shi Weihua
2010-05-06T09:26:08Z

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;
}