get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2223750/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2223750,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2223750/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/ltp/patch/20260416062302.15804-1-sachinp@linux.ibm.com/",
    "project": {
        "id": 59,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/59/?format=api",
        "name": "Linux Test Project development",
        "link_name": "ltp",
        "list_id": "ltp.lists.linux.it",
        "list_email": "ltp@lists.linux.it",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260416062302.15804-1-sachinp@linux.ibm.com>",
    "date": "2026-04-16T06:23:02",
    "name": "[v4] io_uring: Add test for READV and WRITEV operations",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "b021d46dda3fe3456667ca036f49fa3a938e9a70",
    "submitter": {
        "id": 83212,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/83212/?format=api",
        "name": "Sachin Sant",
        "email": "sachinp@linux.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/ltp/patch/20260416062302.15804-1-sachinp@linux.ibm.com/mbox/",
    "series": [
        {
            "id": 500082,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/500082/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/ltp/list/?series=500082",
            "date": "2026-04-16T06:23:02",
            "name": "[v4] io_uring: Add test for READV and WRITEV operations",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/500082/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2223750/comments/",
    "check": "warning",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223750/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "ltp@lists.linux.it"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "ltp@picard.linux.it"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=JwSHv39a;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it\n (client-ip=2001:1418:10:5::2; helo=picard.linux.it;\n envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fx7HR2N0Jz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 16:23:15 +1000 (AEST)",
            "from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id 4802E3E2635\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 08:23:13 +0200 (CEST)",
            "from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it\n [IPv6:2001:4b78:1:20::5])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (secp384r1))\n (No client certificate requested)\n by picard.linux.it (Postfix) with ESMTPS id 6BD153CAFD1\n for <ltp@lists.linux.it>; Thu, 16 Apr 2026 08:23:10 +0200 (CEST)",
            "from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n [148.163.156.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 5F2D9600742\n for <ltp@lists.linux.it>; Thu, 16 Apr 2026 08:23:09 +0200 (CEST)",
            "from pps.filterd (m0360083.ppops.net [127.0.0.1])\n by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63FHUmtn2130784\n for <ltp@lists.linux.it>; Thu, 16 Apr 2026 06:23:07 GMT",
            "from ppma11.dal12v.mail.ibm.com\n (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219])\n by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4dh89nm0dp-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)\n for <ltp@lists.linux.it>; Thu, 16 Apr 2026 06:23:06 +0000 (GMT)",
            "from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1])\n by ppma11.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id\n 63G2iYlG003379\n for <ltp@lists.linux.it>; Thu, 16 Apr 2026 06:23:06 GMT",
            "from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230])\n by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 4djbh938e2-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)\n for <ltp@lists.linux.it>; Thu, 16 Apr 2026 06:23:06 +0000",
            "from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com\n [10.20.54.100])\n by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 63G6N4US31588796\n (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)\n for <ltp@lists.linux.it>; Thu, 16 Apr 2026 06:23:04 GMT",
            "from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 5399E20043\n for <ltp@lists.linux.it>; Thu, 16 Apr 2026 06:23:04 +0000 (GMT)",
            "from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id A158A20040\n for <ltp@lists.linux.it>; Thu, 16 Apr 2026 06:23:03 +0000 (GMT)",
            "from localhost.localdomain (unknown [9.43.69.136])\n by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP\n for <ltp@lists.linux.it>; Thu, 16 Apr 2026 06:23:03 +0000 (GMT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=\n content-transfer-encoding:date:from:message-id:mime-version\n :subject:to; s=pp1; bh=I8a3z9fVE4aEIOukIM3XKHEamKdcN8Nh6Bj8671wn\n 88=; b=JwSHv39aGn/qSEdS95AQTkv5yrqo3avVRgILWC0ZPxG8Ld/b7dXICzMra\n soQ2Al2CB9oISyLtIU7jEaOcpcTYeccmzGjJh7l6yLqsn6ZNwEOIR1yOiUVTgIEg\n KIrA9AuAEAIjnhy9FsZYyjg6kLPRcvYyT6WLEsF/kD1oW3rPy/q+7uR4ykO2ZDIc\n fTzofbnuguRTxidfZptc5pORv2q331xdh9R0NS6UfaM/lCw4I2C5kwATbn/FV04a\n OGTezTwNGsMKsG6x8wFyZZz9Vz86/Yt85AzqLoZ/tbuEwYB1wjO2Vx9Dt882CBko\n i5KZz9d90QGwVxUqvA7KT56bT1wYQ==",
        "From": "Sachin Sant <sachinp@linux.ibm.com>",
        "To": "ltp@lists.linux.it",
        "Date": "Thu, 16 Apr 2026 11:53:02 +0530",
        "Message-Id": "<20260416062302.15804-1-sachinp@linux.ibm.com>",
        "X-Mailer": "git-send-email 2.39.1",
        "MIME-Version": "1.0",
        "X-TM-AS-GCONF": "00",
        "X-Proofpoint-GUID": "uPWDA3LTATqn2DZHzfKqKrzuepKOauHP",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDE2MDA1NyBTYWx0ZWRfX104w52WgTKh+\n Sc0Uc5cfq/EGZ/p+uiCY9OP/SSZWT/HADq/U+6A3KPhK30gvdO9A2LoxqKi5GjqKgfX43BkzcPL\n SqYpVURmMT4SQYf+8Mu/nhmvbsaM9D/r7Gy3mZCNvt409Q6rECSury49YKzw+0dVUWb5S2OQ1F5\n 15GMBsJRjuNghUmhs0kIsRPvfzwFFFFIsIJAvQVv2XH06oegUiYgux7u7Qy2R0VbtL1zC43D420\n BVekbgqz3k4lhGU7eMcLNR0liP48Iknj7t5PYS8J93nEP1fCCd6QIUkl7w7i7KbniNUPxlKrCWa\n TJI2FHdNjaP4TnJ1DpiNQq7/JIDEdI3iemh6gI92lmRpFaZ1DJ+ay3WhemvmJ0Fxw5LTFKFdAA1\n Y2ZvqPf4b+ZExbTcmOakK0SrF/EsZpock+GqYC59XCNL3HvYjPdW9kO0hDHVNeh8WqFryT1ege6\n jNG1cE4ZhFYYxqcPhbA==",
        "X-Proofpoint-ORIG-GUID": "uPWDA3LTATqn2DZHzfKqKrzuepKOauHP",
        "X-Authority-Analysis": "v=2.4 cv=FY4HAp+6 c=1 sm=1 tr=0 ts=69e0804b cx=c_pps\n a=aDMHemPKRhS1OARIsFnwRA==:117 a=aDMHemPKRhS1OARIsFnwRA==:17\n a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22\n a=iQ6ETzBq9ecOQQE5vZCe:22 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8\n a=p1uXUT2nn1jiVixas2kA:9",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-16_01,2026-04-13_04,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n adultscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 spamscore=0\n lowpriorityscore=0 suspectscore=0 clxscore=1015 malwarescore=0 phishscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604070000 definitions=main-2604160057",
        "X-Spam-Status": "No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=disabled version=4.0.1",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on in-5.smtp.seeweb.it",
        "X-Virus-Scanned": "clamav-milter 1.0.9 at in-5.smtp.seeweb.it",
        "X-Virus-Status": "Clean",
        "Subject": "[LTP] [PATCH v4] io_uring: Add test for READV and WRITEV operations",
        "X-BeenThere": "ltp@lists.linux.it",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Linux Test Project <ltp.lists.linux.it>",
        "List-Unsubscribe": "<https://lists.linux.it/options/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=unsubscribe>",
        "List-Archive": "<http://lists.linux.it/pipermail/ltp/>",
        "List-Post": "<mailto:ltp@lists.linux.it>",
        "List-Help": "<mailto:ltp-request@lists.linux.it?subject=help>",
        "List-Subscribe": "<https://lists.linux.it/listinfo/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it",
        "Sender": "\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"
    },
    "content": "Add a test to validate vectored read and write operations using io_uring.\n\n1. IORING_OP_WRITEV - Writing data using multiple buffers (scatter)\n2. IORING_OP_READV - Reading data into multiple buffers (gather)\n3. Data integrity verification across multiple iovecs\n4. Edge cases with different iovec configurations including zero\n   buffer length\n\nAdditionally merge io_uring_init_buffer_pattern() into unified\ninit_iovec_buffers() function that supports both rotating and\nsimple character patterns\n\nSigned-off-by: Sachin Sant <sachinp@linux.ibm.com>\n---\nV4 changes:\n- Updated commit message to remove references to non-existent function\n- Removed extra blank line before test_writev_readv()\n- Link to v3 https://lore.kernel.org/ltp/20260416042531.81093-1-sachinp@linux.ibm.com/T/\n\nV3 changes (2/3 io_uring04 only):\n- 1/3 and 3/3 from the patch series already merged.\n- Merged prepare_read_buffers() and clear_iovec_buffers() into\nsingle clear_iovec_buffers() function\n- Merged io_uring_init_buffer_pattern() into unified\ninit_iovec_buffers() function that supports both rotating and\nsimple character patterns\n- Removed io_uring_init_buffer_pattern() from io_uring_common.h as it's\nonly used in io_uring04.c\n- Link to V2: https://lore.kernel.org/ltp/b4653e3f-ac9b-4a24-8d3f-51677c488e8c@linux.ibm.com/T/\n\nV2 changes:\n- Use guarded buffer(including iovec) allocation\n- Move setup/cleanup code from run to appropriate path\n- Add a function to map the OP to the enum name\n- Define and use generic cleanup functions\n- Add a buffer size 0 in the middle of the iovec\n- Simplify setup_io_uring_test to use common code.\n- Link to V1: https://lore.kernel.org/ltp/20260320124742.75946-1-sachinp@linux.ibm.com/T/#t\n\nChanges after RFC patch series:\n- Addressed review comments\n- Refactored io_uring01 test to use common code\n- Removed git tags\n- Link to RFC: https://lore.kernel.org/ltp/20260318110328.52031-1-sachinp@linux.ibm.com/T/#t\n\n---\n runtest/syscalls                              |   1 +\n testcases/kernel/syscalls/io_uring/.gitignore |   1 +\n .../kernel/syscalls/io_uring/io_uring04.c     | 221 ++++++++++++++++++\n .../syscalls/io_uring/io_uring_common.h       |  13 --\n 4 files changed, 223 insertions(+), 13 deletions(-)\n create mode 100644 testcases/kernel/syscalls/io_uring/io_uring04.c",
    "diff": "diff --git a/runtest/syscalls b/runtest/syscalls\nindex 5025b259f..aa7a91d97 100644\n--- a/runtest/syscalls\n+++ b/runtest/syscalls\n@@ -1901,6 +1901,7 @@ membarrier01 membarrier01\n io_uring01 io_uring01\n io_uring02 io_uring02\n io_uring03 io_uring03\n+io_uring04 io_uring04\n \n # Tests below may cause kernel memory leak\n perf_event_open03 perf_event_open03\ndiff --git a/testcases/kernel/syscalls/io_uring/.gitignore b/testcases/kernel/syscalls/io_uring/.gitignore\nindex 9382ae413..36cd24662 100644\n--- a/testcases/kernel/syscalls/io_uring/.gitignore\n+++ b/testcases/kernel/syscalls/io_uring/.gitignore\n@@ -1,3 +1,4 @@\n /io_uring01\n /io_uring02\n /io_uring03\n+/io_uring04\ndiff --git a/testcases/kernel/syscalls/io_uring/io_uring04.c b/testcases/kernel/syscalls/io_uring/io_uring04.c\nnew file mode 100644\nindex 000000000..7ff0b194f\n--- /dev/null\n+++ b/testcases/kernel/syscalls/io_uring/io_uring04.c\n@@ -0,0 +1,221 @@\n+// SPDX-License-Identifier: GPL-2.0-or-later\n+/*\n+ * Copyright (C) 2026 IBM\n+ * Author: Sachin Sant <sachinp@linux.ibm.com>\n+ */\n+/*\\\n+ * Test IORING_OP_READV and IORING_OP_WRITEV operations.\n+ *\n+ * This test validates vectored read and write operations using io_uring.\n+ * It tests:\n+ * 1. IORING_OP_WRITEV - Writing data using multiple buffers (scatter)\n+ * 2. IORING_OP_READV - Reading data into multiple buffers (gather)\n+ * 3. Data integrity verification across multiple iovecs\n+ * 4. Edge cases with different iovec configurations\n+ */\n+\n+#include \"io_uring_common.h\"\n+\n+#define TEST_FILE \"io_uring_test_file\"\n+#define QUEUE_DEPTH 2\n+#define NUM_VECS 4\n+#define VEC_SIZE 1024\n+#define VAR_BUF1_SIZE 512\n+#define VAR_BUF2_SIZE 1024\n+#define VAR_BUF3_SIZE 256\n+\n+static struct iovec *write_iovs, *read_iovs;\n+static struct iovec *var_write_iovs, *var_read_iovs;\n+static struct io_uring_submit s;\n+static sigset_t sig;\n+\n+/*\n+ * Initialize iovec buffers with pattern\n+ * @iovs: array of iovec structures\n+ * @nvecs: number of iovecs\n+ * @base_char: base character for pattern\n+ * @use_rotating: if true, use rotating pattern; if false, use simple repeat\n+ */\n+static void init_iovec_buffers(struct iovec *iovs, int nvecs,\n+\t\t\t\tchar base_char, int use_rotating)\n+{\n+\tint i;\n+\tsize_t j;\n+\tchar *buf;\n+\n+\tfor (i = 0; i < nvecs; i++) {\n+\t\tif (iovs[i].iov_len == 0)\n+\t\t\tcontinue;\n+\n+\t\tbuf = (char *)iovs[i].iov_base;\n+\t\tif (use_rotating) {\n+\t\t\t/* Each vector has a different rotating pattern */\n+\t\t\tfor (j = 0; j < iovs[i].iov_len; j++)\n+\t\t\t\tbuf[j] = base_char + i + (j % 26);\n+\t\t} else {\n+\t\t\tfor (j = 0; j < iovs[i].iov_len; j++)\n+\t\t\t\tbuf[j] = base_char + i;\n+\t\t}\n+\t}\n+}\n+\n+static void clear_iovec_buffers(struct iovec *iovs, int nvecs)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < nvecs; i++)\n+\t\tmemset(iovs[i].iov_base, 0, iovs[i].iov_len);\n+}\n+\n+static void verify_iovec_data(struct iovec *write_iovs, struct iovec *read_iovs,\n+\t\t\t      int nvecs, const char *test_name)\n+{\n+\tint i;\n+\tsize_t j;\n+\n+\tfor (i = 0; i < nvecs; i++) {\n+\t\tif (write_iovs[i].iov_len != read_iovs[i].iov_len) {\n+\t\t\ttst_res(TFAIL, \"%s: iovec %d length mismatch: write=%zu read=%zu\",\n+\t\t\t\ttest_name, i, write_iovs[i].iov_len, read_iovs[i].iov_len);\n+\t\t\treturn;\n+\t\t}\n+\n+\t\tif (memcmp(write_iovs[i].iov_base, read_iovs[i].iov_base,\n+\t\t\t   write_iovs[i].iov_len) != 0) {\n+\t\t\ttst_res(TFAIL, \"%s: data mismatch in vector %d\", test_name, i);\n+\t\t\tfor (j = 0; j < write_iovs[i].iov_len && j < 64; j++) {\n+\t\t\t\tchar *wbuf = (char *)write_iovs[i].iov_base;\n+\t\t\t\tchar *rbuf = (char *)read_iovs[i].iov_base;\n+\t\t\t\tif (wbuf[j] != rbuf[j]) {\n+\t\t\t\t\ttst_res(TINFO, \"Vector %d: first mismatch at \"\n+\t\t\t\t\t\t\"offset %zu: wrote 0x%02x, read 0x%02x\",\n+\t\t\t\t\t\ti, j, wbuf[j], rbuf[j]);\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t\treturn;\n+\t\t}\n+\t}\n+\n+\ttst_res(TPASS, \"%s: data integrity verified across %d vectors\",\n+\t\ttest_name, nvecs);\n+}\n+\n+static void test_writev_readv(void)\n+{\n+\tint fd;\n+\tint total_size = NUM_VECS * VEC_SIZE;\n+\n+\ttst_res(TINFO, \"Testing IORING_OP_WRITEV and IORING_OP_READV\");\n+\n+\tfd = SAFE_OPEN(TEST_FILE, O_RDWR | O_CREAT | O_TRUNC, 0644);\n+\n+\ttst_res(TINFO, \"Writing %d bytes using %d vectors\", total_size, NUM_VECS);\n+\tio_uring_do_vec_io_op(&s, fd, IORING_OP_WRITEV, write_iovs, NUM_VECS,\n+\t\t\t      0, total_size, &sig);\n+\n+\tSAFE_FSYNC(fd);\n+\n+\ttst_res(TINFO, \"Reading %d bytes using %d vectors\", total_size, NUM_VECS);\n+\tio_uring_do_vec_io_op(&s, fd, IORING_OP_READV, read_iovs, NUM_VECS,\n+\t\t\t      0, total_size, &sig);\n+\n+\tverify_iovec_data(write_iovs, read_iovs, NUM_VECS, \"Basic vectored I/O\");\n+\n+\tSAFE_CLOSE(fd);\n+}\n+\n+static void test_partial_vectors(void)\n+{\n+\tint fd;\n+\tint half_size = 2 * VEC_SIZE;\n+\n+\ttst_res(TINFO, \"Testing partial vector operations\");\n+\n+\tfd = SAFE_OPEN(TEST_FILE, O_RDWR | O_CREAT | O_TRUNC, 0644);\n+\n+\t/* Write first half using first 2 vectors at offset 0 */\n+\tio_uring_do_vec_io_op(&s, fd, IORING_OP_WRITEV, write_iovs, 2, 0,\n+\t\t\t      half_size, &sig);\n+\n+\t/* Write second half using next 2 vectors at offset half_size */\n+\tio_uring_do_vec_io_op(&s, fd, IORING_OP_WRITEV, &write_iovs[2], 2,\n+\t\t\t      half_size, half_size, &sig);\n+\n+\tSAFE_FSYNC(fd);\n+\n+\t/* Read back entire file using all 4 vectors */\n+\tio_uring_do_vec_io_op(&s, fd, IORING_OP_READV, read_iovs, NUM_VECS, 0,\n+\t\t\t      NUM_VECS * VEC_SIZE, &sig);\n+\n+\tverify_iovec_data(write_iovs, read_iovs, NUM_VECS, \"Partial vector I/O\");\n+\n+\tSAFE_CLOSE(fd);\n+}\n+\n+static void test_varying_sizes(void)\n+{\n+\tint fd;\n+\tint expected_size = VAR_BUF1_SIZE + VAR_BUF2_SIZE + VAR_BUF3_SIZE;\n+\n+\ttst_res(TINFO, \"Testing vectors with varying sizes including zero-length buffer\");\n+\n+\tinit_iovec_buffers(var_write_iovs, 4, 'X', 0);\n+\n+\tclear_iovec_buffers(var_read_iovs, 4);\n+\n+\tfd = SAFE_OPEN(TEST_FILE, O_RDWR | O_CREAT | O_TRUNC, 0644);\n+\n+\tio_uring_do_vec_io_op(&s, fd, IORING_OP_WRITEV, var_write_iovs, 4, 0,\n+\t\t\t      expected_size, &sig);\n+\n+\tSAFE_FSYNC(fd);\n+\n+\tio_uring_do_vec_io_op(&s, fd, IORING_OP_READV, var_read_iovs, 4, 0,\n+\t\t\t      expected_size, &sig);\n+\n+\tverify_iovec_data(var_write_iovs, var_read_iovs, 4, \"Varying size vector I/O with zero-length buffer\");\n+\n+\tSAFE_CLOSE(fd);\n+}\n+\n+static void run(void)\n+{\n+\ttest_writev_readv();\n+\ttest_partial_vectors();\n+\ttest_varying_sizes();\n+}\n+\n+static void setup(void)\n+{\n+\tio_uring_setup_supported_by_kernel();\n+\tsigemptyset(&sig);\n+\tmemset(&s, 0, sizeof(s));\n+\tio_uring_setup_queue(&s, QUEUE_DEPTH, 0);\n+\tinit_iovec_buffers(write_iovs, NUM_VECS, 'A', 1);\n+\tclear_iovec_buffers(read_iovs, NUM_VECS);\n+}\n+\n+static void cleanup(void)\n+{\n+\tio_uring_cleanup_queue(&s, QUEUE_DEPTH);\n+}\n+\n+static struct tst_test test = {\n+\t.test_all = run,\n+\t.setup = setup,\n+\t.cleanup = cleanup,\n+\t.needs_tmpdir = 1,\n+\t.bufs = (struct tst_buffers []) {\n+\t\t{&write_iovs, .iov_sizes = (int[]){VEC_SIZE, VEC_SIZE, VEC_SIZE, VEC_SIZE, -1}},\n+\t\t{&read_iovs, .iov_sizes = (int[]){VEC_SIZE, VEC_SIZE, VEC_SIZE, VEC_SIZE, -1}},\n+\t\t{&var_write_iovs, .iov_sizes = (int[]){VAR_BUF1_SIZE, 0, VAR_BUF2_SIZE, VAR_BUF3_SIZE, -1}},\n+\t\t{&var_read_iovs, .iov_sizes = (int[]){VAR_BUF1_SIZE, 0, VAR_BUF2_SIZE, VAR_BUF3_SIZE, -1}},\n+\t\t{}\n+\t},\n+\t.save_restore = (const struct tst_path_val[]) {\n+\t\t{\"/proc/sys/kernel/io_uring_disabled\", \"0\",\n+\t\t\tTST_SR_SKIP_MISSING | TST_SR_TCONF_RO},\n+\t\t{}\n+\t}\n+};\ndiff --git a/testcases/kernel/syscalls/io_uring/io_uring_common.h b/testcases/kernel/syscalls/io_uring/io_uring_common.h\nindex aa31339fb..7816b55dc 100644\n--- a/testcases/kernel/syscalls/io_uring/io_uring_common.h\n+++ b/testcases/kernel/syscalls/io_uring/io_uring_common.h\n@@ -230,19 +230,6 @@ static inline void io_uring_wait_cqe(struct io_uring_submit *s,\n \t*cring->head = head + 1;\n }\n \n-/*\n- * Initialize buffer with a repeating character pattern\n- * Useful for creating test data with predictable patterns\n- */\n-static inline void io_uring_init_buffer_pattern(char *buf, size_t size,\n-\t\t\t\t\t\tchar pattern)\n-{\n-\tsize_t i;\n-\n-\tfor (i = 0; i < size; i++)\n-\t\tbuf[i] = pattern;\n-}\n-\n /*\n  * Submit and wait for a non-vectored I/O operation\n  * Combines io_uring_submit_sqe() and io_uring_wait_cqe() with result reporting\n",
    "prefixes": [
        "v4"
    ]
}