Skip to contentSkip to conversation

syscalls/io_uring: Add .needs_kconfigs

PATCH zhaogongyi via ltp 2 participants 2 messages Sep 15, 2022

lore
Share & tools
lore
#0 lore raw

Hi!

The test broken on my system that kernel version is 5.10, and report:

io_uring01.c:82: TFAIL: io_uring_setup() failed: EOPNOTSUPP (95)

Maybe we can add checking of kconfig to report TCONF at first.

Quoted 55 lines

Hi!

Quoted 1 line

Add .needs_kconfigs for io_uring01.c/io_uring02.c.

We do call io_uring_supported_by_kernel() in the setup() of these tests so this shouldn't be needed at all. What is the problem you are trying to fix?

Quoted 42 lines
---
 testcases/kernel/syscalls/io_uring/io_uring01.c | 4 ++++
testcases/kernel/syscalls/io_uring/io_uring02.c | 4 ++++
 2 files changed, 8 insertions(+)
testcases/kernel/syscalls/io_uring/io_uring01.c +4 -0
index 70151bb85..cb1cabcb7 100644
@@ -261,6 +261,10 @@ static struct tst_test test = {
 	.test = run,
 	.needs_tmpdir = 1,
 	.tcnt = ARRAY_SIZE(tcases),
+	.needs_kconfigs = (const char *const[]){
+		"CONFIG_IO_URING=y",
+		NULL
+	},
 	.bufs = (struct tst_buffers []) {
 		{&iov, .iov_sizes = (int[]){BLOCK_SZ, -1}},
 		{}
testcases/kernel/syscalls/io_uring/io_uring02.c +4 -1
index c5c770074..c7ea87ae5 100644
@@ -255,6 +255,10 @@ static struct tst_test test = {
 		TST_CAP(TST_CAP_REQ, CAP_SYS_CHROOT),
 		{}
 	},
+	.needs_kconfigs = (const char *const[]){
+		"CONFIG_IO_URING=y",
+		NULL
+	},
 	.tags = (const struct tst_tag[]) {
 		{"linux-git", "9392a27d88b9"},
 		{"linux-git", "ff002b30181d"},
--

2.17.1

Quoted 2 lines

--
Mailing list info: https://lists.linux.it/listinfo/ltp

--
Cyril Hrubis
[email protected]

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

Hi!

Quoted 5 lines

The test broken on my system that kernel version is 5.10, and report:

io_uring01.c:82: TFAIL: io_uring_setup() failed: EOPNOTSUPP (95)

Maybe we can add checking of kconfig to report TCONF at first.

I would avoid checking kconfig as long as we can just check return values and errno, see my other reply.

Signature · 5 lines
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp