exec selftests: test ->recursion_depth
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 14 May 2019 22:44:43 +0000 (15:44 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 15 May 2019 02:52:50 +0000 (19:52 -0700)
commit4e7301e6df9595e34e52acc18b943d00c4865e3d
tree8d2c317b08e039d277192779fed8b0bd9f7df2ee
parenta6231d1993367cf48a9c5f1adc295a5a8b1c5731
exec selftests: test ->recursion_depth

Test that trivially recursing script onto itself doesn't work.

Note: this is different test from ELOOP tests in execveat.c Those test
that execveat(2) doesn't follow symlinks when told to do so.

Link: http://lkml.kernel.org/r/20190423192720.GA21433@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
tools/testing/selftests/exec/.gitignore
tools/testing/selftests/exec/Makefile
tools/testing/selftests/exec/recursion-depth.c [new file with mode: 0644]