Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2230059/?format=api
{ "id": 2230059, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2230059/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ltp/patch/20260429062650.3191021-1-wakel@google.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": "<20260429062650.3191021-1-wakel@google.com>", "date": "2026-04-29T06:26:50", "name": "[v3] syscalls/file_attr01: Dynamically expect EOPNOTSUPP on tmpfs without xattr", "commit_ref": null, "pull_url": null, "state": "needs-review-ack", "archived": false, "hash": "e3680cad2a9f98a51108c3fe31a4a8ad299c8b78", "submitter": { "id": 92108, "url": "http://patchwork.ozlabs.org/api/1.1/people/92108/?format=api", "name": "Wake Liu", "email": "wakel@google.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/ltp/patch/20260429062650.3191021-1-wakel@google.com/mbox/", "series": [ { "id": 501997, "url": "http://patchwork.ozlabs.org/api/1.1/series/501997/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ltp/list/?series=501997", "date": "2026-04-29T06:26:50", "name": "[v3] syscalls/file_attr01: Dynamically expect EOPNOTSUPP on tmpfs without xattr", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/501997/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2230059/comments/", "check": "success", "checks": "http://patchwork.ozlabs.org/api/patches/2230059/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=pass (1024-bit key;\n unprotected) header.d=lists.linux.it header.i=@lists.linux.it\n header.a=rsa-sha256 header.s=picard header.b=AXeTK2td;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256\n header.s=20251104 header.b=aedIpJSp;\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 4g56lw3GhPz1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 16:27:07 +1000 (AEST)", "from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id 13B803E252C\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 08:27:05 +0200 (CEST)", "from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [217.194.8.4])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n (No client certificate requested)\n by picard.linux.it (Postfix) with ESMTPS id EE4133CA6DC\n for <ltp@lists.linux.it>; Wed, 29 Apr 2026 08:26:59 +0200 (CEST)", "from mail-pg1-x54a.google.com (mail-pg1-x54a.google.com\n [IPv6:2607:f8b0:4864:20::54a])\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-4.smtp.seeweb.it (Postfix) with ESMTPS id 429891000952\n for <ltp@lists.linux.it>; Wed, 29 Apr 2026 08:26:58 +0200 (CEST)", "by mail-pg1-x54a.google.com with SMTP id\n 41be03b00d2f7-c797efdaa9cso6284607a12.3\n for <ltp@lists.linux.it>; Tue, 28 Apr 2026 23:26:58 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=lists.linux.it;\n i=@lists.linux.it; q=dns/txt; s=picard; t=1777444025; h=date :\n in-reply-to : mime-version : references : message-id : to : subject :\n list-id : list-unsubscribe : list-archive : list-post : list-help :\n list-subscribe : from : reply-to : cc : content-type :\n content-transfer-encoding : sender : from;\n bh=a6EDP+m1ubLRJN/rlNgXd1u+eoz7TDyI1MwoMWir2WQ=;\n b=AXeTK2tddDHiO/Is7Ot0g0pebtVi6EC8pxVRoxx7nxGsHNpbXviZRDe63uC7TKa//jCSW\n MyU4ON7kXmmJH3EYti5I224i/8BSTmFCa6diYrduriDEQKY19MfcC1L7ChQNb+Xls/kO8y/\n a62YBdISOgO2TX0dPkveZ8r86IPR5ZY=", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=google.com; s=20251104; t=1777444016; x=1778048816; darn=lists.linux.it;\n h=cc:to:from:subject:message-id:references:mime-version:in-reply-to\n :date:from:to:cc:subject:date:message-id:reply-to;\n bh=0EaZ2p93hTcMiCDCweOIyt7SHftoE42c/rXFKiXEj84=;\n b=aedIpJSpVLzER58pzvyksLwWJ7EPQ6ms2UtoAU37nNS/f5oxYiSBBZlFgZQhWyWU/P\n NK26OyqLchvyYhflZTjsHCaHpi3dODimmqx7c1i5222Q3NXupbXmU2/4k3yqoCAcqSl2\n uBBFybCoFAXY++WKPMKxxzFDClE3HUNow+wpGCC5akahpgrMpjd4O0mEptb+foHCLw2E\n 5cUAqCCNOgEXhf8DQ3YO/p07Zw3goBYbw/G0GmX6Abiap0ivtZYn55QpMI9VzPRFheh2\n l6WQ4YUOoICWt75mGh8wO0gGg3yjGFcJzXfw5r1R2AaxiOBhf2XA9w7j+Nb86+P2zZwX\n iMCQ==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777444016; x=1778048816;\n h=cc:to:from:subject:message-id:references:mime-version:in-reply-to\n :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n bh=0EaZ2p93hTcMiCDCweOIyt7SHftoE42c/rXFKiXEj84=;\n b=bz2KnYwDHxvjQTm9dfZ1hSQpGh49wGO09ybC3sk/j8k8o04Gek0ClSy0/RUJx7kjY1\n axJz3EuIcTvdaTL3hetAIKy8FVXuNjn+uvaYqHDyhev5o5B9YTZhgdJyCLfJx4fwmn9P\n 5udbQlUJe0cnaLbaQBrOmuuhmzMWyF9ancV7xc0KK67gizP0U6HtcHw6NPGc8mQ9KPt8\n a3dB9OtdWdxlsTWqFoZ/FEFGERUvHc3xcpunW8ovqR8oZTNlU4rMJNQVx7quaor7ESkR\n 5I+o1ndLUVTJJNwCFElTR9csk5XJ3b96e5t4shhPiZ36mCevUc08iiqA4F8D0aHgpaFZ\n SZEQ==", "X-Gm-Message-State": "AOJu0Yzaz5g1J0np5hd4IYNsxc58LG5ulVDkb2JQKkyo4CCZpfPtOZya\n y6aEtZ1ZfvfH5blb5o2DSDJWcNAwLx9suY4tTpIJazRIuh6ZeJ1HYfaSmqm9zGff+patwyQVS1/\n i5w==", "X-Received": "from pghk16.prod.google.com ([2002:a63:f010:0:b0:c73:cc95:c0d7])\n (user=wakel job=prod-delivery.src-stubby-dispatcher) by\n 2002:a05:6a20:728c:b0:3a0:bc61:62e4\n with SMTP id adf61e73a8af0-3a39c352c76mr7198638637.53.1777444016145; Tue, 28\n Apr 2026 23:26:56 -0700 (PDT)", "Date": "Wed, 29 Apr 2026 14:26:50 +0800", "In-Reply-To": "<aeDpBp_TNCJYCDzG@yuki.lan>", "Mime-Version": "1.0", "References": "<aeDpBp_TNCJYCDzG@yuki.lan>", "X-Mailer": "git-send-email 2.54.0.545.g6539524ca2-goog", "Message-ID": "<20260429062650.3191021-1-wakel@google.com>", "To": "chrubis@suse.cz", "X-Spam-Status": "No, score=-7.4 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL\n shortcircuit=no autolearn=disabled version=4.0.1", "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on in-4.smtp.seeweb.it", "X-Virus-Scanned": "clamav-milter 1.0.9 at in-4.smtp.seeweb.it", "X-Virus-Status": "Clean", "Subject": "[LTP] [PATCH v3] syscalls/file_attr01: Dynamically expect\n EOPNOTSUPP on tmpfs without xattr", "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>", "From": "Wake Liu via ltp <ltp@lists.linux.it>", "Reply-To": "Wake Liu <wakel@google.com>", "Cc": "wakel@google.com, 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": "From: Wake Liu via ltp <ltp@lists.linux.it>\n\nThe syscalls file_getattr and file_setattr return EOPNOTSUPP instead of\nEFAULT when the ufattr argument is NULL on tmpfs without xattr support\n(CONFIG_TMPFS_XATTR=n). This is because the kernel checks for the\nfilesystem operation support before dereferencing the user pointer.\n\nThis patch adds a runtime check for CONFIG_TMPFS_XATTR when testing\non tmpfs, ensuring the correct errno is expected based on the kernel\nconfiguration. This prevents hiding potential kernel bugs where\nEOPNOTSUPP might be returned even when xattr is supported.\n\nChanges in v3:\n- Moved tst_kconfig_check() to setup() to avoid parsing the kernel\n config in each iteration of run(), as suggested by Cyril Hrubis.\n\nChanges in v2:\n- Replaced the TST_EXP_FAIL_ARR approach with a dynamic check in run().\n- Included tst_kconfig.h and used tst_kconfig_check() to verify\n CONFIG_TMPFS_XATTR status.\n- Expected EOPNOTSUPP only on tmpfs when xattr support is missing,\n otherwise default to EFAULT.\n\nSigned-off-by: Wake Liu <wakel@google.com>\n---\n testcases/kernel/syscalls/file_attr/file_attr01.c | 15 +++++++++++++--\n 1 file changed, 13 insertions(+), 2 deletions(-)", "diff": "diff --git a/testcases/kernel/syscalls/file_attr/file_attr01.c b/testcases/kernel/syscalls/file_attr/file_attr01.c\nindex c9c9288a1..419d54c36 100644\n--- a/testcases/kernel/syscalls/file_attr/file_attr01.c\n+++ b/testcases/kernel/syscalls/file_attr/file_attr01.c\n@@ -18,6 +18,7 @@\n \n #include <string.h>\n #include \"tst_test.h\"\n+#include \"tst_kconfig.h\"\n #include \"lapi/fs.h\"\n #include \"lapi/fcntl.h\"\n \n@@ -35,6 +36,7 @@ static size_t small_usize;\n static size_t valid_usize;\n static size_t big_usize;\n static struct file_attr *valid_file_attr;\n+static int missing_tmpfs_xattr;\n \n static struct tcase {\n \tint *dfd;\n@@ -115,20 +117,24 @@ static struct tcase {\n static void run(unsigned int i)\n {\n \tstruct tcase *tc = &tcases[i];\n+\tint exp_errno = tc->exp_errno;\n+\n+\tif (tc->ufattr == (struct file_attr **)(&null_ptr) && missing_tmpfs_xattr)\n+\t\texp_errno = EOPNOTSUPP;\n \n \tif (tst_variant) {\n \t\tTST_EXP_FAIL(file_getattr(\n \t\t\t*tc->dfd, *tc->filename,\n \t\t\t*tc->ufattr, *tc->usize,\n \t\t\ttc->at_flags),\n-\t\t\ttc->exp_errno,\n+\t\t\texp_errno,\n \t\t\t\"%s\", tc->msg);\n \t} else {\n \t\tTST_EXP_FAIL(file_setattr(\n \t\t\t*tc->dfd, *tc->filename,\n \t\t\t*tc->ufattr, *tc->usize,\n \t\t\ttc->at_flags),\n-\t\t\ttc->exp_errno,\n+\t\t\texp_errno,\n \t\t\t\"%s\", tc->msg);\n \t}\n }\n@@ -144,6 +150,11 @@ static void setup(void)\n \tvalid_usize = FILE_ATTR_SIZE_LATEST;\n \tsmall_usize = FILE_ATTR_SIZE_VER0 - 1;\n \tbig_usize = SAFE_SYSCONF(_SC_PAGESIZE) + 100;\n+\n+\tif (!strcmp(tst_device->fs_type, \"tmpfs\")) {\n+\t\tconst char *const kconfig[] = {\"CONFIG_TMPFS_XATTR=y\", NULL};\n+\t\tmissing_tmpfs_xattr = tst_kconfig_check(kconfig);\n+\t}\n }\n \n static void cleanup(void)\n", "prefixes": [ "v3" ] }