selftests/timens: add a test for vfork+exit
authorAndrei Vagin <avagin@gmail.com>
Mon, 13 Jun 2022 06:07:23 +0000 (23:07 -0700)
committerKees Cook <keescook@chromium.org>
Wed, 15 Jun 2022 14:58:22 +0000 (07:58 -0700)
commit6342140db6609a0c7d34f68c52b2947468e0e630
treebb9b696afe09e8c80e7f9c774a0a3230bd4f0d0e
parent133e2d3e81de5d9706cab2dd1d52d231c27382e5
selftests/timens: add a test for vfork+exit

* check that a child process is in parent's time namespace after vfork.
* check that a child process is in the target namespace after exec.

Output on success:
$ ./vfork_exec
1..1
ok 1 exec

Signed-off-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220613060723.197407-2-avagin@gmail.com
tools/testing/selftests/timens/Makefile
tools/testing/selftests/timens/vfork_exec.c [new file with mode: 0644]