[LTP] [PATCH V4 1/1] syscall: Add io_uring test

Vikas Kumar vikas.kumar2@arm.com
Mon May 18 06:33:44 CEST 2020


On 15/05/20 9:38 am, Viresh Kumar wrote:

On 14-05-20, 22:58, Vikas Kumar wrote:


Added Linux asynchronous I/O API Test for io_uring_setup(),
io_uring_register() and io_uring_enter().
This test will check io_uring api basic operation.

Signed-off-by: Vikas Kumar <vikas.kumar2@arm.com><mailto:vikas.kumar2@arm.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz><mailto:chrubis@suse.cz>



Please don't do this unless someone gave you this explicitly.


Sure I will remove it in next patch set its my mistake.

Thank you Viresh, Petr and Cyril for correcting my mistake.




diff --git a/testcases/kernel/syscalls/io_uring/io_uring01.c b/testcases/kernel/syscalls/io_uring/io_uring01.c
+int setup_io_uring_test(struct submitter *s)
+{
+       struct io_sq_ring *sring = &s->sq_ring;
+       struct io_cq_ring *cring = &s->cq_ring;
+       struct io_uring_params p;
+       void *ptr;
+
+       memset(&p, 0, sizeof(p));
+       s->ring_fd = io_uring_setup(QUEUE_DEPTH, &p);
+       if (s->ring_fd == -1) {
+               tst_res(TFAIL | TTERRNO, "io_uring setup return error");
+               return 1;
+       }
+
+       //submission queue ring buffer mapping



You need to follow kernel coding guidelines everywhere in the code
here and so no such comments. Try to run checkpatch on this file with
--strict option and you will see the problems..

This API is new and you also need to implement something like
fsopen_supported_by_kernel().

I didn't do in depth reviews though..

I will implement io_uring_supported_by_kernel() and checkpatch with --strict option and send In next patch.


struct io_sq_ring, struct io_cq_ring and struct submitter



Cyril: These are local structure although derived from kernel structure so it can be local in this file in place of lapi/io_uring.h



IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200518/ed930870/attachment.htm>


More information about the ltp mailing list