[LTP] [PATCH 3/3] eventfd01: Handle no AIO support

Richard Palethorpe rpalethorpe@suse.com
Wed Sep 30 16:50:09 CEST 2020


Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
 testcases/kernel/syscalls/eventfd/eventfd01.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/testcases/kernel/syscalls/eventfd/eventfd01.c b/testcases/kernel/syscalls/eventfd/eventfd01.c
index e4f9c804a..4d888910b 100644
--- a/testcases/kernel/syscalls/eventfd/eventfd01.c
+++ b/testcases/kernel/syscalls/eventfd/eventfd01.c
@@ -510,6 +510,11 @@ static int trigger_eventfd_overflow(int evfd, int *fd, io_context_t * ctx)
 	ret = io_setup(16, ctx);
 	if (ret < 0) {
 		errno = -ret;
+		if (errno == ENOSYS) {
+			tst_brkm(TCONF | TERRNO, cleanup,
+				 "io_setup(): AIO not supported by kernel");
+		}
+
 		tst_resm(TINFO | TERRNO, "io_setup error");
 		return -1;
 	}
-- 
2.28.0



More information about the ltp mailing list