Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2222794/?format=api
{ "id": 2222794, "url": "http://patchwork.ozlabs.org/api/patches/2222794/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ltp/patch/20260413165457.1349-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": "<20260413165457.1349-1-always.starving0@gmail.com>", "list_archive_url": null, "date": "2026-04-13T16:52:57", "name": "[v3] close: add test for double close EBADF", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "530da3689e28a5a5a72402872a35a2588b161f00", "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/20260413165457.1349-1-always.starving0@gmail.com/mbox/", "series": [ { "id": 499731, "url": "http://patchwork.ozlabs.org/api/series/499731/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ltp/list/?series=499731", "date": "2026-04-13T16:52:57", "name": "[v3] close: add test for double close EBADF", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/499731/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2222794/comments/", "check": "success", "checks": "http://patchwork.ozlabs.org/api/patches/2222794/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=KNkH2n1N;\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 4fvYSL6Dmbz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 02:55:30 +1000 (AEST)", "from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id 45F6A3E2681\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 18:55:28 +0200 (CEST)", "from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [217.194.8.2])\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 E15313CD98D\n for <ltp@lists.linux.it>; Mon, 13 Apr 2026 18:55:24 +0200 (CEST)", "from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com\n [IPv6:2607:f8b0:4864:20::1042])\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-2.smtp.seeweb.it (Postfix) with ESMTPS id 5B50C6003BF\n for <ltp@lists.linux.it>; Mon, 13 Apr 2026 18:55:24 +0200 (CEST)", "by mail-pj1-x1042.google.com with SMTP id\n 98e67ed59e1d1-35da9c0c007so4193064a91.2\n for <ltp@lists.linux.it>; Mon, 13 Apr 2026 09:55:24 -0700 (PDT)", "from localhost.localdomain ([211.196.223.197])\n by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-35e3517f2a0sm20817930a91.17.2026.04.13.09.55.20\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 13 Apr 2026 09:55:21 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1776099323; x=1776704123; 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=g0FFlJz2ZE4fMIVCrBob0heKs3fJzd9eIwkyCmz0x7U=;\n b=KNkH2n1N9ecS1xRQBfXaJnHqAq7kaBxnW3f5RhgCrgw2KBPY21XmkkyjzIQ09mPUy0\n Bu2FwqzX5OKLw4MFxIHBQgGn9B5z+q8OR14lx0u0Hy9uWJOWAD+57RtX+h0oxfv4qZ1U\n Rlyw9jinX2GLaado7kEiU7yHizWkOUOcJr5Uxn50uyelkS9Uu3Ox99pX0BQMqHT78weK\n svNZUrt3eXy9Ri7unYkEQnv07AtukreSCGT0O+fN43nZhRx4deZT3pcZ0ZUBr5BTm/tm\n OKsgAycEMU8C57jK7N6UA47nNGCzV4ZmQbj0/dEXJdaqfUxNIvwYI3nNdbNhjriagDFS\n Bvgw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776099323; x=1776704123;\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=g0FFlJz2ZE4fMIVCrBob0heKs3fJzd9eIwkyCmz0x7U=;\n b=Kq25nvNbLT1NCtKh/HINwodSY8D4xk4BWRsn+5udytZjo+Ah0H6H5bpYKBkuYsPA+L\n NjDNxjfAWJ/AvnO/IY7LI9VzrZyaxhXXg9b/+KQoofspSxmixXz+ue0IY8vyAVeR0vrf\n 3tN5DrKnBNg1ad4OkoU/WFjp7EzP20sD986J5ZwGdStCCXovDJmNezRAGAmH3F6HUV9Y\n uBxIBDjFc0KWtlaCrOQLABiFUvRt3G0PbFEBV7ZtkH1jwNEK/54CXlhBofUjZ0BFuDEi\n 9qXlQqgF56iILpa93OOnTCwHT5TnWLzgiUjI8ev/C8soNDStPkf/+b4annuFVzwd9my+\n nDfA==", "X-Gm-Message-State": "AOJu0YwiCD815CByECVjv90BHnEGJc+Jv5nEPlpw49DFKoVc6re95VOe\n LcC3Ihi8nTVJQggz6UIFNYx2xUwegYVVdYCPMwDfaoZHlY6XXC/q16g=", "X-Gm-Gg": "AeBDiesWfpoJqclPMl7ZG6Tfp8jtvXciP89yj6D7nqYsDku9pneUOvsMN3vm1M5gyuo\n hrvmC1KXgo67z+6CTvGQ1RywmEaosXMGIEaO1uTo+TXXP/DrV3P2JNLz/Ijwkk021pCfsGKd+gj\n NM//vgj64uHD+FqY5bF8Crnwu5/s9uEOLKK2X3JkI7nGd5H/LIyGBOO78Kp2wD3BxqMr/qNgYwH\n PPBtg/NhJY41mCEd4xHOSj3AeuZ8X4zWt75n2mIYSoHZ3dyoBK3GbTJ2g2nCpsl19mYb2+SrSU4\n eAfkPJyjOsr92LokeNVNNC+pFyXT1506tphy6JIVBW9Eo/zbHp03/vNFI+PII2Lc/vO14sRAuiv\n R9zP9ZqWQ28X/tvg0z5gfLEgC4d2fiODU4j07wjmckfbEuG8ZHbk6KafiEEQfGBRxTa0KeH3zJk\n xFlMteHAbeLvF30+b4kBMEkWf8V3griENCJevnL8DulDez", "X-Received": "by 2002:a17:90b:1345:b0:35b:93d8:6aaa with SMTP id\n 98e67ed59e1d1-35e42840b1cmr15881865a91.19.1776099322683;\n Mon, 13 Apr 2026 09:55:22 -0700 (PDT)", "From": "Jinseok Kim <always.starving0@gmail.com>", "To": "wangli.ahau@gmail.com,\n\tpvorel@suse.cz", "Date": "Tue, 14 Apr 2026 01:52:57 +0900", "Message-ID": "<20260413165457.1349-1-always.starving0@gmail.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "\n <CAE1O6mgFhsT0XP33=8Ji5dJPS5d27Oz8A74wWckcDX0c4LVHxQ@mail.gmail.com>", "References": "\n <CAE1O6mgFhsT0XP33=8Ji5dJPS5d27Oz8A74wWckcDX0c4LVHxQ@mail.gmail.com>", "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,DMARC_PASS,FREEMAIL_ENVFROM_END_DIGIT,\n FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS shortcircuit=no\n autolearn=disabled version=4.0.1", "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on in-2.smtp.seeweb.it", "X-Virus-Scanned": "clamav-milter 1.0.9 at in-2.smtp.seeweb.it", "X-Virus-Status": "Clean", "Subject": "[LTP] [PATCH v3] close: 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 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 | 42 ++++++++++++++++++++---\n 1 file changed, 38 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..3b3c61b1e 100644\n--- a/testcases/kernel/syscalls/close/close02.c\n+++ b/testcases/kernel/syscalls/close/close02.c\n@@ -5,17 +5,51 @@\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+enum case_type {\n+\tINVALID_FD,\n+\tDOUBLE_CLOSE,\n+};\n+\n+static struct tcase {\n+\tconst char *desc;\n+\tenum case_type type;\n+} tcases[] = {\n+\t{ \"close(-1)\", INVALID_FD },\n+\t{ \"close same fd twice\", DOUBLE_CLOSE },\n+};\n+\n+static void verify_close(unsigned int i)\n {\n-\tTST_EXP_FAIL(close(-1), EBADF);\n+\tint fd;\n+\tstruct tcase *tc = &tcases[i];\n+\n+\tswitch (tc->type) {\n+\tcase INVALID_FD:\n+\t\tTST_EXP_FAIL(close(-1), EBADF, \"%s\", tc->desc);\n+\t\tbreak;\n+\n+\tcase DOUBLE_CLOSE:\n+\t\tfd = SAFE_OPEN(\"close02\", O_CREAT | O_RDWR, 0600);\n+\n+\t\tTST_EXP_PASS(close(fd), \"%s: first close()\", tc->desc);\n+\t\tTST_EXP_FAIL(close(fd), EBADF, \"%s: second close()\", tc->desc);\n+\t\tbreak;\n+\t}\n }\n\n static struct tst_test test = {\n-\t.test_all = run,\n+\t.needs_tmpdir = 1,\n+\t.tcnt = ARRAY_SIZE(tcases),\n+\t.test = verify_close,\n };\n", "prefixes": [ "v3" ] }