Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2223963/?format=api
{ "id": 2223963, "url": "http://patchwork.ozlabs.org/api/patches/2223963/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ltp/patch/20260416125554.2920-1-always.starving0@gmail.com/", "project": { "id": 59, "url": "http://patchwork.ozlabs.org/api/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": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260416125554.2920-1-always.starving0@gmail.com>", "list_archive_url": null, "date": "2026-04-16T12:55:18", "name": "[v4] close02: add test for double close EBADF", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "ab12476d4734e6b59bab753e839be25e8158400c", "submitter": { "id": 92589, "url": "http://patchwork.ozlabs.org/api/people/92589/?format=api", "name": "Jinseok Kim", "email": "always.starving0@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/ltp/patch/20260416125554.2920-1-always.starving0@gmail.com/mbox/", "series": [ { "id": 500156, "url": "http://patchwork.ozlabs.org/api/series/500156/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ltp/list/?series=500156", "date": "2026-04-16T12:55:18", "name": "[v4] close02: add test for double close EBADF", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/500156/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2223963/comments/", "check": "success", "checks": "http://patchwork.ozlabs.org/api/patches/2223963/checks/", "tags": {}, "related": [], "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=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=cxEACefr;\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)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fxJ18291rz1yG9\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 22:56:28 +1000 (AEST)", "from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id 826C43E1685\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 14:56:25 +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 E83993E1685\n for <ltp@lists.linux.it>; Thu, 16 Apr 2026 14:56:22 +0200 (CEST)", "from mail-pg1-x543.google.com (mail-pg1-x543.google.com\n [IPv6:2607:f8b0:4864:20::543])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 A2DD2600873\n for <ltp@lists.linux.it>; Thu, 16 Apr 2026 14:56:19 +0200 (CEST)", "by mail-pg1-x543.google.com with SMTP id\n 41be03b00d2f7-c74f0c3fc16so2855588a12.2\n for <ltp@lists.linux.it>; Thu, 16 Apr 2026 05:56:19 -0700 (PDT)", "from localhost.localdomain ([211.196.223.197])\n by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82f738b399bsm3282778b3a.8.2026.04.16.05.56.16\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 16 Apr 2026 05:56:17 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1776344178; x=1776948978; darn=lists.linux.it;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=l9eEJKgB9g7s5Rq5JAJgz5oq9E/3l59wVg/oFVxPDec=;\n b=cxEACefrowWv0mUBCxpVb8cgadZ/U37wz1KSHTuYhnXyA52+wvrlA2NQaNmGcuqamE\n DnRUQjhWhSVH1xZ/jmT8U8rjOjEWr5woTQgQOdCuRcszCwt2Iyv0pEkfzXwUx0OvOfki\n ow/UZ+0kRvw3E6pFE1sqArblnAyu/fF7bp0ueyp+EugMnWCrKvEz3trZwydqVQrACzE2\n u9CnBLyXPtzEKEiSNk16yk23l6rUy5x+/+41G3GZ6nDQ0n1VJFBIVDG0vaCNftkS/Q0y\n beh20Ea4y5ypxdot6SlVcoVeTGzMPQLzx4hSBu3jlWbsqL2KYr3R/91+lKU8P2DjZSE7\n UVwA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776344178; x=1776948978;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=l9eEJKgB9g7s5Rq5JAJgz5oq9E/3l59wVg/oFVxPDec=;\n b=Ma7YK8m9nLZCMFZvJcjWeXI+yPM5Fdq56aozIzfIOwreqv0K33cXbZ4nmWium+nZKm\n tqE+4I6VvyqEtY0RT4Y4RD2kaxoBu8d7nGjhAdUh2nlmPNZKO8b7QSqng/jcf/s0bLlm\n C5mOJQU3HAf8q5rkDO+gvE03nLM4YsltEWif4+EG3Q24DE6dOTbZUg6+oWr93dsJ1QwX\n TJe3WYxlGBaDxgCdG7OViPfuNCxpRtApGrhFUIhp7mUjpIP626KvijaA/xWhT7uoMo7W\n 7uBdia8Jewz+w5SyHirCUQxsdhe/kcKlqtWPagQq5VUW4fTkNabByNjLEHyzzSnxigH5\n mmmQ==", "X-Gm-Message-State": "AOJu0YyMK08CVfTZW1LZWPAIUU6bTpA0qN6mPCphRyWxS7Y0Ua5uMtH8\n OzUI3YCVV40PP8s8ZUJJ4GeiDyF+eQrOJvOInm96g/bREqUimdTL8P+kZ0aeQIjbc2Ba", "X-Gm-Gg": "AeBDies4Tlv7K07KvGKt23ZmKRX3p9gBQRNsxj49ZKXfKlrQAV/f766OsBHKgn6peRy\n Y0Ft63aIoRfrcoePAuQaT97AIDwumKXYlBBGTGUgSRtG1TY/EsQJ9xL2RyDIT0PSNQ/mVg66H6y\n pqzsXqfCWYb0mm3LE/XVoSvKERVt7J5VO3E8Ew6rU6XOtusFTyrrzrLcofvigfntXsYU/IIs8U0\n czLo4ptNo4MCceKuHsTWpm83CF2mnkKqtiXOE+BAdfLXJ9Yot6xApa0ghekkBckrREHnQPoJYiM\n XyAN3K2/PheP97T1zvXXVddUrE/klrV3/Yo3U6ccXnWwvmRAZY74ZqjkYPVbOBXW2j0rqRRYSFQ\n L2S8OQuTagZOrlYe2lpPOsfnFWzbvM3oe3wsMau7dOVJKduPtegc5nfBz96dqNm3hfJYSYgs0MH\n 7jX1NQEdFukhxV0bPKJOe9wR9c0KaWwvWtPchctAyI9fIWTIR9Sn76tdo=", "X-Received": "by 2002:a05:6a20:7f89:b0:398:7855:3e33 with SMTP id\n adf61e73a8af0-39fe409bbc8mr29194554637.56.1776344177978;\n Thu, 16 Apr 2026 05:56:17 -0700 (PDT)", "From": "Jinseok Kim <always.starving0@gmail.com>", "To": "pvorel@suse.cz,\n\twangli.ahau@gmail.com", "Date": "Thu, 16 Apr 2026 21:55:18 +0900", "Message-ID": "<20260416125554.2920-1-always.starving0@gmail.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260413204519.GB153189@pevik>", "References": "<20260413204519.GB153189@pevik>", "MIME-Version": "1.0", "X-Spam-Status": "No, score=0.3 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,\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] close02: add test for double close EBADF", "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>", "Cc": "ltp@lists.linux.it", "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": "Verify that calling close() on an already closed file descriptor fails\nwith EBADF.\n\nThis test adds coverage for a common state transition case where a\npreviously valid file descriptor becomes invalid after close().\n\nSigned-off-by: Jinseok Kim <always.starving0@gmail.com>\n---\nChanges in v4:\n- Remove enum, add fd/expected errno in tcases, and move preparation\n to setup().\n- Link to v3: https://lore.kernel.org/ltp/20260413165457.1349-1-always.starving0@gmail.com\n\nChanges in v3:\n- Add O_RDWR flag to SAFE_OPEN\n- Link to v2: https://lore.kernel.org/ltp/20260411110405.7330-1-always.starving0@gmail.com\n\nChanges in v2:\n- Add additional test coverage to close02 instead of creating a separate\n close03 test.\n- Link to v1: https://lore.kernel.org/ltp/20260406133134.17238-2-always.starving0@gmail.com\n---\n testcases/kernel/syscalls/close/close02.c | 35 ++++++++++++++++++++---\n 1 file changed, 31 insertions(+), 4 deletions(-)\n\n--\n2.43.0", "diff": "diff --git a/testcases/kernel/syscalls/close/close02.c b/testcases/kernel/syscalls/close/close02.c\nindex 617c48237..1919a27fb 100644\n--- a/testcases/kernel/syscalls/close/close02.c\n+++ b/testcases/kernel/syscalls/close/close02.c\n@@ -5,17 +5,44 @@\n */\n\n /*\\\n- * Call close(-1) and expects it to return EBADF.\n+ * Verify :manpage:`close(2)` failure cases:\n+ *\n+ * 1) close(-1) returns EBADF.\n+ * 2) closing the same fd twice returns EBADF on the second call.\n */\n\n #include <errno.h>\n+#include <fcntl.h>\n+\n #include \"tst_test.h\"\n\n-static void run(void)\n+static struct tcase {\n+\tconst char *desc;\n+\tint fd;\n+\tint exp_errno;\n+} tcases[] = {\n+\t{ \"close(-1)\", -1, EBADF },\n+\t{ \"close same fd twice\", -1, EBADF },\n+};\n+\n+static void verify_close(unsigned int i)\n+{\n+\tstruct tcase *tc = &tcases[i];\n+\n+\tTST_EXP_FAIL(close(tc->fd), tc->exp_errno, \"%s\", tc->desc);\n+}\n+\n+static void setup(void)\n {\n-\tTST_EXP_FAIL(close(-1), EBADF);\n+\tint fd = SAFE_OPEN(\"close02\", O_CREAT | O_RDWR, 0600);\n+\n+\tSAFE_CLOSE(fd);\n+\ttcases[1].fd = fd;\n }\n\n static struct tst_test test = {\n-\t.test_all = run,\n+\t.needs_tmpdir = 1,\n+\t.setup = setup,\n+\t.tcnt = ARRAY_SIZE(tcases),\n+\t.test = verify_close,\n };\n", "prefixes": [ "v4" ] }