This small series updates the io_uring tests and adds them to the morello_transitional_extended list.
This series depends on the following Morello Linux series: "Support io_uring for Purecap apps"
v2: - Remove changes to unused io_uring_sqe struct from the lapi header, and add a comment on why it's left unmodified - Remove the io_uring01 from relevant skip file - Update the io_uring dependency tag to "> morello-release-1.6.0" as it missed the boat
Review branch: https://git.morello-project.org/tudcre01/morello-linux-ltp/-/commits/morello...
Tudor Cretu (2): syscalls/io_uring: Align struct io_uring_sqe with new uABI runtest: Add io_uring tests to the extended PCuABI syscall list
include/lapi/io_uring.h | 4 ++++ runtest/morello_transitional_extended | 4 ++++ runtest/syscalls_morello_purecap_skip | 4 ---- testcases/kernel/syscalls/io_uring/io_uring01.c | 4 ++-- testcases/kernel/syscalls/io_uring/io_uring02.c | 6 +++--- 5 files changed, 13 insertions(+), 9 deletions(-)
The addr and user_data members of the io_uring_sqe struct can hold pointers in the PCuABI. Bring in support for capabilities and re-visit relevant testcases to take into account the io_uring_sqe struct's new published versions.
Signed-off-by: Tudor Cretu tudor.cretu@arm.com --- include/lapi/io_uring.h | 4 ++++ testcases/kernel/syscalls/io_uring/io_uring01.c | 4 ++-- testcases/kernel/syscalls/io_uring/io_uring02.c | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/include/lapi/io_uring.h b/include/lapi/io_uring.h index a63741a08..c69d7fd9b 100644 --- a/include/lapi/io_uring.h +++ b/include/lapi/io_uring.h @@ -22,6 +22,10 @@ #include <linux/io_uring.h> #endif
+/* + * Don't need to pull in the following uAPI structs for newer kernels as long as + * the uAPI header is included. + */ #ifndef IOSQE_FIXED_FILE
#ifndef __kernel_rwf_t diff --git a/testcases/kernel/syscalls/io_uring/io_uring01.c b/testcases/kernel/syscalls/io_uring/io_uring01.c index 70151bb85..744c7eca2 100644 --- a/testcases/kernel/syscalls/io_uring/io_uring01.c +++ b/testcases/kernel/syscalls/io_uring/io_uring01.c @@ -203,10 +203,10 @@ static int submit_to_uring_sq(struct submitter *s, struct tcase *tc) sqe->flags = 0; sqe->fd = fd; sqe->opcode = tc->enter_flags; - sqe->addr = (unsigned long)iov->iov_base; + sqe->addr = (uintptr_t)iov->iov_base; sqe->len = BLOCK_SZ; sqe->off = 0; - sqe->user_data = (unsigned long long)iov; + sqe->user_data = (uintptr_t)iov; sring->array[index] = index; tail = next_tail;
diff --git a/testcases/kernel/syscalls/io_uring/io_uring02.c b/testcases/kernel/syscalls/io_uring/io_uring02.c index c5c770074..026c52b1b 100644 --- a/testcases/kernel/syscalls/io_uring/io_uring02.c +++ b/testcases/kernel/syscalls/io_uring/io_uring02.c @@ -103,7 +103,7 @@ static void drain_fallback(void) sqe_ptr->opcode = IORING_OP_SENDMSG; sqe_ptr->flags = IOSQE_IO_DRAIN; sqe_ptr->fd = sockpair[0]; - sqe_ptr->addr = (__u64)&spam_header; + sqe_ptr->addr = (uintptr_t)&spam_header; sqe_ptr->user_data = SPAM_MARK; uring.sqr_array[tail & *uring.sqr_mask] = i; } @@ -113,7 +113,7 @@ static void drain_fallback(void) sqe_ptr->opcode = IORING_OP_SENDMSG; sqe_ptr->flags = IOSQE_IO_DRAIN; sqe_ptr->fd = sendsock; - sqe_ptr->addr = (__u64)&beef_header; + sqe_ptr->addr = (uintptr_t)&beef_header; sqe_ptr->user_data = BEEF_MARK; uring.sqr_array[tail & *uring.sqr_mask] = i; count = ++i; @@ -218,7 +218,7 @@ static void run(void) sqe_ptr->opcode = IORING_OP_SENDMSG; sqe_ptr->flags = IOSQE_ASYNC; sqe_ptr->fd = sendsock; - sqe_ptr->addr = (__u64)&beef_header; + sqe_ptr->addr = (uintptr_t)&beef_header; sqe_ptr->user_data = BEEF_MARK; uring.sqr_array[tail & *uring.sqr_mask] = 0; tail++;
Now that the io_uring tests pass (for both purecap and compat), add them to the extended Morello transitional syscalls list.
Signed-off-by: Tudor Cretu tudor.cretu@arm.com --- runtest/morello_transitional_extended | 4 ++++ runtest/syscalls_morello_purecap_skip | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/runtest/morello_transitional_extended b/runtest/morello_transitional_extended index 7c980f230..b350ebdaf 100644 --- a/runtest/morello_transitional_extended +++ b/runtest/morello_transitional_extended @@ -41,6 +41,10 @@ io_submit01 io_submit01 io_submit02 io_submit02 io_submit03 io_submit03
+#KERN - io_uring*: depends on Morello Linux kernel release > morello-release-1.6.0 +io_uring01 io_uring01 +io_uring02 io_uring02 + #KERN - keyctl*: depends on Morello Linux kernel release >= morello-release-1.5.0 keyctl01 keyctl01 keyctl02 keyctl02 diff --git a/runtest/syscalls_morello_purecap_skip b/runtest/syscalls_morello_purecap_skip index 4f60d9aff..e4d66ee1b 100644 --- a/runtest/syscalls_morello_purecap_skip +++ b/runtest/syscalls_morello_purecap_skip @@ -1,10 +1,6 @@ # This skip file contains all the tests skipped from the syscalls command file # for testing the PCuABI kernel in purecap.
-# io_uring is not currently supported in purecap, -# this test is expected to fail. -io_uring01 - # These tests share capabilities between proccesses through shared memory. # This is explicitly prevented by the PCuABI, so there's no point running them. process_vm_readv02
On 04/04/2023 18:12, Tudor Cretu wrote:
Now that the io_uring tests pass (for both purecap and compat), add them to the extended Morello transitional syscalls list.
Signed-off-by: Tudor Cretu tudor.cretu@arm.com
runtest/morello_transitional_extended | 4 ++++ runtest/syscalls_morello_purecap_skip | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-)
As discussed offline, we need to be careful with this patch as it depends on updated kernel headers, which need to be regenerated manually for the CI.
Patch 1 should be fine as it shouldn't break anything that is not already broken, so it could be merged separately if that makes sense.
Kevin
diff --git a/runtest/morello_transitional_extended b/runtest/morello_transitional_extended index 7c980f230..b350ebdaf 100644 --- a/runtest/morello_transitional_extended +++ b/runtest/morello_transitional_extended @@ -41,6 +41,10 @@ io_submit01 io_submit01 io_submit02 io_submit02 io_submit03 io_submit03 +#KERN - io_uring*: depends on Morello Linux kernel release > morello-release-1.6.0 +io_uring01 io_uring01 +io_uring02 io_uring02
#KERN - keyctl*: depends on Morello Linux kernel release >= morello-release-1.5.0 keyctl01 keyctl01 keyctl02 keyctl02 diff --git a/runtest/syscalls_morello_purecap_skip b/runtest/syscalls_morello_purecap_skip index 4f60d9aff..e4d66ee1b 100644 --- a/runtest/syscalls_morello_purecap_skip +++ b/runtest/syscalls_morello_purecap_skip @@ -1,10 +1,6 @@ # This skip file contains all the tests skipped from the syscalls command file # for testing the PCuABI kernel in purecap. -# io_uring is not currently supported in purecap, -# this test is expected to fail. -io_uring01
# These tests share capabilities between proccesses through shared memory. # This is explicitly prevented by the PCuABI, so there's no point running them. process_vm_readv02
Landed on next. Thanks!
--- BR B.
On Tue, Apr 04, 2023 at 05:12:35PM +0100, Tudor Cretu wrote:
This small series updates the io_uring tests and adds them to the morello_transitional_extended list.
This series depends on the following Morello Linux series: "Support io_uring for Purecap apps"
v2:
- Remove changes to unused io_uring_sqe struct from the lapi header, and add a comment on why it's left unmodified
- Remove the io_uring01 from relevant skip file
- Update the io_uring dependency tag to "> morello-release-1.6.0" as it missed the boat
Review branch: https://git.morello-project.org/tudcre01/morello-linux-ltp/-/commits/morello...
Tudor Cretu (2): syscalls/io_uring: Align struct io_uring_sqe with new uABI runtest: Add io_uring tests to the extended PCuABI syscall list
include/lapi/io_uring.h | 4 ++++ runtest/morello_transitional_extended | 4 ++++ runtest/syscalls_morello_purecap_skip | 4 ---- testcases/kernel/syscalls/io_uring/io_uring01.c | 4 ++-- testcases/kernel/syscalls/io_uring/io_uring02.c | 6 +++--- 5 files changed, 13 insertions(+), 9 deletions(-)
-- 2.34.1
linux-morello-ltp mailing list -- linux-morello-ltp@op-lists.linaro.org To unsubscribe send an email to linux-morello-ltp-leave@op-lists.linaro.org
linux-morello-ltp@op-lists.linaro.org