{"id":2231198,"url":"http://patchwork.ozlabs.org/api/patches/2231198/?format=json","web_url":"http://patchwork.ozlabs.org/project/ltp/patch/20260430112346.4054436-1-wakel@google.com/","project":{"id":59,"url":"http://patchwork.ozlabs.org/api/projects/59/?format=json","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":"<20260430112346.4054436-1-wakel@google.com>","list_archive_url":null,"date":"2026-04-30T11:23:46","name":"listmount04: Allow both EINVAL and EBADF for BEFORE_6_17_9 case","commit_ref":null,"pull_url":null,"state":"needs-review-ack","archived":false,"hash":"0d468f927c5a60f3fe45ff0362c3c63947e78ca7","submitter":{"id":92108,"url":"http://patchwork.ozlabs.org/api/people/92108/?format=json","name":"Wake Liu","email":"wakel@google.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/ltp/patch/20260430112346.4054436-1-wakel@google.com/mbox/","series":[{"id":502282,"url":"http://patchwork.ozlabs.org/api/series/502282/?format=json","web_url":"http://patchwork.ozlabs.org/project/ltp/list/?series=502282","date":"2026-04-30T11:23:46","name":"listmount04: Allow both EINVAL and EBADF for BEFORE_6_17_9 case","version":1,"mbox":"http://patchwork.ozlabs.org/series/502282/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2231198/comments/","check":"warning","checks":"http://patchwork.ozlabs.org/api/patches/2231198/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=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=Ojo66MAK;\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=JevaRbGT;\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 4g5sHz1pbXz1yGq\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 21:23:59 +1000 (AEST)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id 5B88A3E5347\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 13:23:56 +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))\n (No client certificate requested)\n by picard.linux.it (Postfix) with ESMTPS id CA06E3E2ACC\n for <ltp@lists.linux.it>; Thu, 30 Apr 2026 13:23:52 +0200 (CEST)","from mail-pj1-x104a.google.com (mail-pj1-x104a.google.com\n [IPv6:2607:f8b0:4864:20::104a])\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 4DA321000DB9\n for <ltp@lists.linux.it>; Thu, 30 Apr 2026 13:23:52 +0200 (CEST)","by mail-pj1-x104a.google.com with SMTP id\n 98e67ed59e1d1-362d9dd9a49so906938a91.0\n for <ltp@lists.linux.it>; Thu, 30 Apr 2026 04:23:52 -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=1777548236; h=date :\n mime-version : message-id : to : subject : list-id : list-unsubscribe\n : list-archive : list-post : list-help : list-subscribe : from :\n reply-to : cc : content-type : content-transfer-encoding : sender :\n from; bh=TygnfJazD1SdxWdFlQhL0hgiAS+W2s3cj3SXBGF/B/k=;\n b=Ojo66MAKPGMtfLDo099ze+nOjm142H/KssjsPTUSv6U2jy3N5VHEFNcFPeIGD8wY+Uy4K\n pFW5kwgSxRx5GVyUzkJgmZ/JrNvL2UO2lPaob0Vq0YtU09WUyuajl2/UbnehUQbC0W6F8Ql\n TIHbYkVI+qrk+F2F1Y4AmOpUBwXIN0c=","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=google.com; s=20251104; t=1777548231; x=1778153031; darn=lists.linux.it;\n h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject\n :date:message-id:reply-to;\n bh=wlAwfiI6N+SqRJnmPJyuySIBrQKB6L/zpKoIFGcQh+o=;\n b=JevaRbGT6lC/GiA4gq39V3bcfWWCy6o8OtjH6mAOivZMAEtKrowmzqQTi9uZaLMdN6\n tIxxGibcKiJnEmar2tuAgnfcFllKpo7FIfw9TKg/uS2piqDmB9iSk6l7ECm49lxL9cjm\n sRc67/8EecR21Oc+BLlEpC6Kj9dKqrnQS6HFVgfTwDqshLQYHhNE/JHQsHaCYrsBc/cd\n 3tbHTuzcPoIO144rLsDXgXQd0HEXoxdtjMNjNvqxX+l9CQSPDVLdxnCA/Jq7a6Q1tCcv\n hEw0IfbEZAyZpicnMFwHNcfDUcx3btEAkkloOddOtpV4kGy/aP7TiehVurUkxnl7bkif\n iIBQ=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777548231; x=1778153031;\n h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state\n :from:to:cc:subject:date:message-id:reply-to;\n bh=wlAwfiI6N+SqRJnmPJyuySIBrQKB6L/zpKoIFGcQh+o=;\n b=aPwWsPBUbHMedlOixetH3TPyHxBCLluQDwgzCWS8Cd1/RKW7D+NZMndj2BpbuBOmdw\n 9ev50rbKReRNytzXY68UQp3lshtXXiMFUSheHXZUsr8/F676nuyu+3MNQjvwV9YnMB7x\n ZsKGChcdckF+6r1ec2sHTuDmGBMLZegirhyb+UL/RJxmdOZhHy8p999wJ8DNoMlJnHms\n yQpi2/i90p4UhjwdCq2Ky4EN4bx9hGyIVC6lhaHju2OHqQZ+BEwEslwjxdwGviaQ9Ox9\n Mkvu6yhWbJVJvnLJ6rVaOZ9AHGklPEHmblJ6o/W3SxLxzzf+zXeU2cp8Sk+ntvQTK355\n gI5Q==","X-Gm-Message-State":"AOJu0YyIBYf1WzJSmqiwZ0SPQYpiWsLmNXDNPjIqSqga2hzrfeKJ5YkU\n MqD1o4hkL8LoICnP2wa6HwJ9E1rnsxEK9uVWZTzDhhnvVRqXgpp93owOX6wi5ANN38zBHOO3mRb\n qYe9CpzJ4P0AXdq7A/onx2dbddINSCEjtYInrX4f1LHlAaBaEvpBQMoaD7dnYrMeVzP7diM2+dn\n Ywcc34XS2zg2naP/jZpkBJK9n+RQ==","X-Received":"from pfbik4.prod.google.com\n ([2002:a05:6a00:8d04:b0:82f:a6d1:a709])\n (user=wakel job=prod-delivery.src-stubby-dispatcher) by\n 2002:a05:6a20:7f9d:b0:39b:ba95:b14c\n with SMTP id adf61e73a8af0-3a3cf632a70mr2932970637.24.1777548230321; Thu, 30\n Apr 2026 04:23:50 -0700 (PDT)","Date":"Thu, 30 Apr 2026 19:23:46 +0800","Mime-Version":"1.0","X-Mailer":"git-send-email 2.54.0.545.g6539524ca2-goog","Message-ID":"<20260430112346.4054436-1-wakel@google.com>","To":"ltp@lists.linux.it","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] listmount04: Allow both EINVAL and EBADF for\n BEFORE_6_17_9 case","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":"Wake Liu <wakel@google.com>","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":"On some LTS kernels (like 6.12.y or 6.6.y), the bug fix\ncommit 78f0e33cd6c9 (\"fs/namespace: correctly handle errors returned\nby grab_requested_mnt_ns\") was backported.\n\nThe backport changes the behavior of listmount() for kernels\nbefore 6.17.9, returning EBADF instead of EINVAL when invalid\nmnt_id_req.spare is provided.\n\nUpdate the run() function to accept both EINVAL and EBADF when the\nexpected errno is EINVAL on a kernel version before 6.17.9.\n\nChange-Id: If5b138e64b7c3d8434eea180dd6adc845db44f42\nSigned-off-by: Wake Liu <wakel@google.com>\n---\n testcases/kernel/syscalls/listmount/listmount04.c | 13 ++++++++++---\n 1 file changed, 10 insertions(+), 3 deletions(-)","diff":"diff --git a/testcases/kernel/syscalls/listmount/listmount04.c b/testcases/kernel/syscalls/listmount/listmount04.c\nindex 919f4c854..ee15ff99c 100644\n--- a/testcases/kernel/syscalls/listmount/listmount04.c\n+++ b/testcases/kernel/syscalls/listmount/listmount04.c\n@@ -152,9 +152,16 @@ static void run(unsigned int n)\n \t\treq->mnt_ns_fd = tc->spare;\n \t}\n \n-\tTST_EXP_FAIL(tst_syscall(__NR_listmount, req, tc->mnt_ids,\n-\t\ttc->nr_mnt_ids, tc->flags), tc->exp_errno,\n-\t\t\"%s\", tc->msg);\n+\tif (tc->exp_errno == EINVAL && tc->kver == BEFORE_6_17_9) {\n+\t\tint exp_errs[] = {EINVAL, EBADF};\n+\t\tTST_EXP_FAIL_ARR(tst_syscall(__NR_listmount, req, tc->mnt_ids,\n+\t\t\ttc->nr_mnt_ids, tc->flags), exp_errs, 2,\n+\t\t\t\"%s\", tc->msg);\n+\t} else {\n+\t\tTST_EXP_FAIL(tst_syscall(__NR_listmount, req, tc->mnt_ids,\n+\t\t\ttc->nr_mnt_ids, tc->flags), tc->exp_errno,\n+\t\t\t\"%s\", tc->msg);\n+\t}\n }\n \n static void setup(void)\n","prefixes":[]}