On 4/8/24 15:24, Pavel Begunkov wrote:
Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx>
---
test/send-zerocopy.c | 166 +++++++++++++++++++++++++++----------------
1 file changed, 106 insertions(+), 60 deletions(-)
diff --git a/test/send-zerocopy.c b/test/send-zerocopy.c
index bfb15d2..4699cf6 100644
--- a/test/send-zerocopy.c
+++ b/test/send-zerocopy.c
@@ -769,12 +769,69 @@ static int test_invalid_zc(int fds[2])
return 0;
}
-int main(int argc, char *argv[])
+static int run_basic_tests(void)
{
struct sockaddr_storage addr;
- struct io_uring ring;
- int i, ret, sp[2];
+ int ret, i, sp[2];
+
+ /* create TCP IPv6 pair */
+ ret = create_socketpair_ip(&addr, &sp[0], &sp[1], true, true, false, true);
+ if (ret) {
+ fprintf(stderr, "sock prep failed %d\n", ret);
+ return -1;
+ }
+
+ for (i = 0; i < 2; i++) {
+ struct io_uring ring;
+ unsigned ring_flags = 0;
+
+ if (i & 1)
+ ring_flags |= IORING_SETUP_DEFER_TASKRUN;
That's not right, it's missing SINGLE_ISSUER and then skips the
test. I'll resend
--
Pavel Begunkov