selftests/landlock: Don't create useless file layouts
authorMickaël Salaün <mic@digikod.net>
Mon, 12 Jun 2023 19:14:26 +0000 (21:14 +0200)
committerMickaël Salaün <mic@digikod.net>
Mon, 12 Jun 2023 19:26:21 +0000 (21:26 +0200)
commit592efeb4a07ee46204c0f87001455c28f4743dea
treed9a0f5d546956106c095e2d652f34d50da812c38
parent74ce793bcbde5cef0f82d6ccb3c47cb651295a9a
selftests/landlock: Don't create useless file layouts

Add and use a layout0 test fixture to not populate the tmpfs filesystem
if it is not required for tests: unknown_access_rights, proc_nsfs,
unpriv and max_layers.

This doesn't change these tests but it speeds up their setup and makes
them less prone to error.  This prepare the ground for a next commit.

Link: https://lore.kernel.org/r/20230612191430.339153-3-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
tools/testing/selftests/landlock/fs_test.c