From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6BD2C5518F for ; Fri, 20 Feb 2026 10:49:13 +0000 (UTC) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 29A023D0818 for ; Fri, 20 Feb 2026 11:49:12 +0100 (CET) Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [IPv6:2001:4b78:1:20::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 651093C015A for ; Fri, 20 Feb 2026 11:48:54 +0100 (CET) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 70F2B1A009BF for ; Fri, 20 Feb 2026 11:48:52 +0100 (CET) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E0C073E6D5; Fri, 20 Feb 2026 10:48:51 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C3BB53EA65; Fri, 20 Feb 2026 10:48:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 2f4eLxM8mGkUMgAAD6G6ig (envelope-from ); Fri, 20 Feb 2026 10:48:51 +0000 Date: Fri, 20 Feb 2026 11:48:53 +0100 From: Cyril Hrubis To: Jan Polensky Message-ID: References: <20260219163030.69022-1-japo@linux.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20260219163030.69022-1-japo@linux.ibm.com> X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: E0C073E6D5 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Virus-Scanned: clamav-milter 1.0.9 at in-3.smtp.seeweb.it X-Virus-Status: Clean Subject: Re: [LTP] [PATCH v2 1/1] [STAGING] ioctl_pidfd06: accept EREMOTE/ESRCH for PIDFD_GET_INFO across pidns X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux Test Project Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-bounces+ltp=archiver.kernel.org@lists.linux.it Sender: "ltp" Hi! > PIDFD_GET_INFO semantics changed for pidfds referring to tasks without a PID > in the caller's current pid namespace (commit ab89060fbc92e ("pidfs: return > -EREMOTE when PIDFD_GET_INFO is called on another ns")). > > Accept both errnos to keep the test working on kernels with and without the > change (including backports). > > Signed-off-by: Jan Polensky > --- > testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c b/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c > index 751281bacb74..6b4bc3191e37 100644 > --- a/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c > +++ b/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c > @@ -14,6 +14,7 @@ > > static struct tst_clone_args *args; > static struct pidfd_info *info; > +static const int exp_errnos[] = {EREMOTE, ESRCH}; > > static void run(void) > { > @@ -41,7 +42,8 @@ static void run(void) > args->exit_signal = SIGCHLD; > I would be stricter for new kernels, we do not want the new value reverted back by an accident. So what about: static int err_nr = ARRAY_SIZE(exp_errnos); static void setup(void) { ... if (tst_kvercmp(9, 19, 0) >= 0) err_nr = 1; ... } > if (!SAFE_CLONE(args)) { > - TST_EXP_FAIL(ioctl(pidfd, PIDFD_GET_INFO, info), ESRCH); > + TST_EXP_FAIL_ARR(ioctl(pidfd, PIDFD_GET_INFO, info), exp_errnos, > + ARRAY_SIZE(exp_errnos)); ^ err_nr > exit(0); > } > > -- > 2.53.0 > -- Cyril Hrubis chrubis@suse.cz -- Mailing list info: https://lists.linux.it/listinfo/ltp