diff mbox series

[1/2] syscalls/io_uring: Add .needs_kconfigs

Message ID 20220915062715.233884-2-zhaogongyi@huawei.com
State Changes Requested
Headers show
Series Optimize io_uring related testcases | expand

Commit Message

Zhao Gongyi Sept. 15, 2022, 6:27 a.m. UTC
Add .needs_kconfigs for io_uring01.c/io_uring02.c.

Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
---
 testcases/kernel/syscalls/io_uring/io_uring01.c | 4 ++++
 testcases/kernel/syscalls/io_uring/io_uring02.c | 4 ++++
 2 files changed, 8 insertions(+)

--
2.17.1

Comments

Cyril Hrubis Sept. 15, 2022, 9:49 a.m. UTC | #1
Hi!
> 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?

> Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
> ---
>  testcases/kernel/syscalls/io_uring/io_uring01.c | 4 ++++
>  testcases/kernel/syscalls/io_uring/io_uring02.c | 4 ++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/testcases/kernel/syscalls/io_uring/io_uring01.c b/testcases/kernel/syscalls/io_uring/io_uring01.c
> index 70151bb85..cb1cabcb7 100644
> --- a/testcases/kernel/syscalls/io_uring/io_uring01.c
> +++ b/testcases/kernel/syscalls/io_uring/io_uring01.c
> @@ -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}},
>  		{}
> diff --git a/testcases/kernel/syscalls/io_uring/io_uring02.c b/testcases/kernel/syscalls/io_uring/io_uring02.c
> index c5c770074..c7ea87ae5 100644
> --- a/testcases/kernel/syscalls/io_uring/io_uring02.c
> +++ b/testcases/kernel/syscalls/io_uring/io_uring02.c
> @@ -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
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp
diff mbox series

Patch

diff --git a/testcases/kernel/syscalls/io_uring/io_uring01.c b/testcases/kernel/syscalls/io_uring/io_uring01.c
index 70151bb85..cb1cabcb7 100644
--- a/testcases/kernel/syscalls/io_uring/io_uring01.c
+++ b/testcases/kernel/syscalls/io_uring/io_uring01.c
@@ -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}},
 		{}
diff --git a/testcases/kernel/syscalls/io_uring/io_uring02.c b/testcases/kernel/syscalls/io_uring/io_uring02.c
index c5c770074..c7ea87ae5 100644
--- a/testcases/kernel/syscalls/io_uring/io_uring02.c
+++ b/testcases/kernel/syscalls/io_uring/io_uring02.c
@@ -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"},