Commit Graph
2 Commits
Author SHA1 Message Date
Christian Brauner 67fc700016 test: verify fdinfo for pidfd of reaped process
Test that the fdinfo field of a pidfd referring to a dead process
correctly shows Pid: -1 and NSpid: -1.

Cc: Christian Kellner <[email protected]>
Cc: [email protected]
Reviewed-by: Christian Kellner <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
2019-10-17 15:36:54 +02:00
Christian Kellner 2def297ec7 pidfd: add tests for NSpid info in fdinfo
Add a test that checks that if pid namespaces are configured the fdinfo
file of a pidfd contains an NSpid: entry containing the process id in
the current and additionally all nested namespaces. In the case that
a pidfd is from a pid namespace not in the same namespace hierarchy as
the process accessing the fdinfo file, ensure the 'NSpid' shows 0 for
that pidfd, analogous to the 'Pid' entry.

Signed-off-by: Christian Kellner <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
2019-10-15 12:17:11 +02:00