All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 0/6] ioctl_pidfd testing suite
Date: Tue, 1 Jul 2025 13:40:50 +0200	[thread overview]
Message-ID: <aGPJQi0L5iD_w1tF@yuki.lan> (raw)
In-Reply-To: <4df2c4de-46ee-48d0-b451-fc7f4f74eac8@suse.com>

Hi!
> > I guess that we miss a test for the case where the processes are in the
> > same pid namespace, e.g. process created by a plain old fork(). In that
> > case calling the ioctl() before the the process was waited for would
> > return the information I've mistakenly pointed out for the second test.
> 
> Sorry but I don't get this one. When we fork() a process and we check 
> its exit code via ioctl(PIDFD_GET_INFO) __before__ the child has been 
> reaped, we only need to check if mask is still having PIDFD_INFO_EXIT, 
> because that's not available.The same for exit_code.
> 
> Am I missing something?

That paragraph was still written under the assumption that you are not
supposed to get anything else than exit vaule from a process that is in
a different namespace.

The main point should have been that all the tests you have sumbitted
are written so that the child process is cloned into a new pid
namespace. We need at least one test where both the child and the parent
are in the same namespace. Either cloned without pid namespace or
created by plain old fork().

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2025-07-01 11:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-26 12:34 [LTP] [PATCH 0/6] ioctl_pidfd testing suite Andrea Cervesato
2025-06-26 12:34 ` [LTP] [PATCH 1/6] Provide pidfd parameter in tst_clone_args Andrea Cervesato
2025-06-26 12:34 ` [LTP] [PATCH 2/6] Fallback PIDFD_GET_INFO related definitions Andrea Cervesato
2025-06-26 12:34 ` [LTP] [PATCH 3/6] Add ioctl_pidfd01 test Andrea Cervesato
2025-06-26 12:34 ` [LTP] [PATCH 4/6] Add ioctl_pidfd02 test Andrea Cervesato
2025-06-27  9:11   ` Cyril Hrubis
2025-06-27  9:47     ` Cyril Hrubis
2025-06-27  9:53       ` Cyril Hrubis
2025-06-26 12:34 ` [LTP] [PATCH 5/6] Add ioctl_pidfd03 test Andrea Cervesato
2025-06-27  9:56   ` Cyril Hrubis
2025-06-30 12:50     ` Andrea Cervesato via ltp
2025-06-30 14:30       ` Cyril Hrubis
2025-06-26 12:34 ` [LTP] [PATCH 6/6] Add ioctl_pidfd04 test Andrea Cervesato
2025-06-27 10:14 ` [LTP] [PATCH 0/6] ioctl_pidfd testing suite Cyril Hrubis
2025-07-01 11:15   ` Andrea Cervesato via ltp
2025-07-01 11:40     ` Cyril Hrubis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aGPJQi0L5iD_w1tF@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=andrea.cervesato@suse.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.