selftests: proc: test subset=pid
authorAlexey Dobriyan <adobriyan@gmail.com>
Fri, 7 May 2021 01:02:21 +0000 (18:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 May 2021 02:24:11 +0000 (19:24 -0700)
commit268af17ada5855a9b703995125a9920ac117b56b
treefc582ff75dbd5a5871150d53eea692049b8642b6
parent1dcdd7ef96ba11cf7c6a965114577b3509adb7cd
selftests: proc: test subset=pid

Test that /proc instance mounted with

mount -t proc -o subset=pid

contains only ".", "..", "self", "thread-self" and pid directories.

Note:
Currently "subset=pid" doesn't return "." and ".." via readdir.
This must be a bug.

Link: https://lkml.kernel.org/r/YFYZZ7WGaZlsnChS@localhost.localdomain
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Alexey Gladkov <gladkov.alexey@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
tools/testing/selftests/proc/Makefile
tools/testing/selftests/proc/proc-subset-pid.c [new file with mode: 0644]