* [LTP] [PATCH 1/3] io_setup01: Handle no AIO support in kernel
@ 2020-09-30 14:50 Richard Palethorpe
2020-09-30 14:50 ` [LTP] [PATCH 2/3] io_pgetevents{01,02}: Handle no AIO support Richard Palethorpe
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Richard Palethorpe @ 2020-09-30 14:50 UTC (permalink / raw)
To: ltp
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
Here are 3 more tests modified to check for ENOSYS. There are other
tests which still don't check, but they appear to be only listed under
the AIO runtest files.
testcases/kernel/syscalls/io_setup/io_setup01.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/testcases/kernel/syscalls/io_setup/io_setup01.c b/testcases/kernel/syscalls/io_setup/io_setup01.c
index 4693f8fbb..28aee7831 100644
--- a/testcases/kernel/syscalls/io_setup/io_setup01.c
+++ b/testcases/kernel/syscalls/io_setup/io_setup01.c
@@ -53,6 +53,8 @@ static void verify_success(unsigned int nr, io_context_t *ctx, int init_val)
memset(ctx, init_val, sizeof(*ctx));
TEST(io_setup(nr, ctx));
+ if (TST_RET == -ENOSYS)
+ tst_brk(TCONF | TRERRNO, "io_setup(): AIO not supported by kernel");
if (TST_RET != 0) {
tst_res(TFAIL, "io_setup() failed unexpectedly with %li (%s)",
TST_RET, tst_strerrno(-TST_RET));
--
2.28.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [LTP] [PATCH 2/3] io_pgetevents{01,02}: Handle no AIO support
2020-09-30 14:50 [LTP] [PATCH 1/3] io_setup01: Handle no AIO support in kernel Richard Palethorpe
@ 2020-09-30 14:50 ` Richard Palethorpe
2020-09-30 14:50 ` [LTP] [PATCH 3/3] eventfd01: " Richard Palethorpe
2020-09-30 15:11 ` [LTP] [PATCH 1/3] io_setup01: Handle no AIO support in kernel Cyril Hrubis
2 siblings, 0 replies; 4+ messages in thread
From: Richard Palethorpe @ 2020-09-30 14:50 UTC (permalink / raw)
To: ltp
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
testcases/kernel/syscalls/io_pgetevents/io_pgetevents01.c | 8 +++++---
testcases/kernel/syscalls/io_pgetevents/io_pgetevents02.c | 8 +++++---
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/testcases/kernel/syscalls/io_pgetevents/io_pgetevents01.c b/testcases/kernel/syscalls/io_pgetevents/io_pgetevents01.c
index 2a1aad8d9..a0b56d814 100644
--- a/testcases/kernel/syscalls/io_pgetevents/io_pgetevents01.c
+++ b/testcases/kernel/syscalls/io_pgetevents/io_pgetevents01.c
@@ -51,9 +51,11 @@ static void run(void)
fd = SAFE_OPEN("io_pgetevents_file", O_RDWR | O_CREAT, 0644);
io_prep_pwrite(&cb, fd, data, 4096, 0);
- ret = io_setup(1, &ctx);
- if (ret < 0)
- tst_brk(TBROK | TERRNO, "io_setup() failed");
+ TEST(io_setup(1, &ctx));
+ if (TST_RET == -ENOSYS)
+ tst_brk(TCONF | TRERRNO, "io_setup(): AIO not supported by kernel");
+ if (TST_RET < 0)
+ tst_brk(TBROK | TRERRNO, "io_setup() failed");
ret = io_submit(ctx, 1, cbs);
if (ret != 1)
diff --git a/testcases/kernel/syscalls/io_pgetevents/io_pgetevents02.c b/testcases/kernel/syscalls/io_pgetevents/io_pgetevents02.c
index 28afdb4a0..af71e17fe 100644
--- a/testcases/kernel/syscalls/io_pgetevents/io_pgetevents02.c
+++ b/testcases/kernel/syscalls/io_pgetevents/io_pgetevents02.c
@@ -65,9 +65,11 @@ static void setup(void)
fd = SAFE_OPEN("io_pgetevents_file", O_RDWR | O_CREAT, 0644);
io_prep_pwrite(&cb, fd, data, 4096, 0);
- ret = io_setup(1, &ctx);
- if (ret < 0)
- tst_brk(TBROK | TERRNO, "io_setup() failed");
+ TEST(io_setup(1, &ctx));
+ if (TST_RET == -ENOSYS)
+ tst_brk(TCONF | TRERRNO, "io_setup(): AIO not supported by kernel");
+ if (TST_RET < 0)
+ tst_brk(TBROK | TRERRNO, "io_setup() failed");
ctx_initialized = 1;
--
2.28.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [LTP] [PATCH 3/3] eventfd01: Handle no AIO support
2020-09-30 14:50 [LTP] [PATCH 1/3] io_setup01: Handle no AIO support in kernel Richard Palethorpe
2020-09-30 14:50 ` [LTP] [PATCH 2/3] io_pgetevents{01,02}: Handle no AIO support Richard Palethorpe
@ 2020-09-30 14:50 ` Richard Palethorpe
2020-09-30 15:11 ` [LTP] [PATCH 1/3] io_setup01: Handle no AIO support in kernel Cyril Hrubis
2 siblings, 0 replies; 4+ messages in thread
From: Richard Palethorpe @ 2020-09-30 14:50 UTC (permalink / raw)
To: ltp
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [LTP] [PATCH 1/3] io_setup01: Handle no AIO support in kernel
2020-09-30 14:50 [LTP] [PATCH 1/3] io_setup01: Handle no AIO support in kernel Richard Palethorpe
2020-09-30 14:50 ` [LTP] [PATCH 2/3] io_pgetevents{01,02}: Handle no AIO support Richard Palethorpe
2020-09-30 14:50 ` [LTP] [PATCH 3/3] eventfd01: " Richard Palethorpe
@ 2020-09-30 15:11 ` Cyril Hrubis
2 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2020-09-30 15:11 UTC (permalink / raw)
To: ltp
Hi!
Patchset pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-30 15:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-30 14:50 [LTP] [PATCH 1/3] io_setup01: Handle no AIO support in kernel Richard Palethorpe
2020-09-30 14:50 ` [LTP] [PATCH 2/3] io_pgetevents{01,02}: Handle no AIO support Richard Palethorpe
2020-09-30 14:50 ` [LTP] [PATCH 3/3] eventfd01: " Richard Palethorpe
2020-09-30 15:11 ` [LTP] [PATCH 1/3] io_setup01: Handle no AIO support in kernel Cyril Hrubis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.