Skip to contentSkip to conversation

io_submit01: Handle missing AIO support

PATCH New Richard Palethorpe 2 participants 2 messages Sep 29, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 io_submit01: Handle missing AIO support

---
 testcases/kernel/syscalls/io_submit/io_submit01.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
testcases/kernel/syscalls/io_submit/io_submit01.c +5 -5
index afa077c59..bbbbc9101 100644
@@ -66,11 +66,11 @@ static struct tcase {
 
 static void setup(void)
 {
-	int rval;
-
-	rval = io_setup(1, &ctx);
-	if (rval)
-		tst_brk(TBROK | TERRNO, "io_setup() returned %d", rval);
+	TEST(io_setup(1, &ctx));
+	if (TST_RET == -ENOSYS)
+		tst_brk(TCONF | TRERRNO, "io_setup(): AIO not supported by kernel");
+	else if (TST_RET)
+		tst_brk(TBROK | TRERRNO, "io_setup() failed");
 
 	io_prep_pread(&inv_fd_iocb, -1, buf, sizeof(buf), 0);
 
Signature · 1 line
2.28.0
#1 lore raw

PATCH 1/1 io_submit01: Handle missing AIO support

Hi Richard,

thanks, merged!

Kind regards,
Petr