selftests/landlock: Add tests for FS topology changes with network rules
authorMickaël Salaün <mic@digikod.net>
Fri, 27 Oct 2023 15:46:15 +0000 (17:46 +0200)
committerMickaël Salaün <mic@digikod.net>
Fri, 27 Oct 2023 15:53:31 +0000 (17:53 +0200)
commitf12f8f84509a084399444c4422661345a15cc713
treee0d7de007109b707896647a60a8e91a89cb8f485
parent51442e8d64bcb7ac92d0cde5dccda0cfa94630fa
selftests/landlock: Add tests for FS topology changes with network rules

Add 2 tests to the layout1 fixture:
* topology_changes_with_net_only: Checks that FS topology
  changes are not denied by network-only restrictions.
* topology_changes_with_net_and_fs: Make sure that FS topology
  changes are still denied with FS and network restrictions.

This specifically test commit d7220364039f ("landlock: Allow FS topology
changes for domains without such rule type").

Cc: Konstantin Meskhidze <konstantin.meskhidze@huawei.com>
Link: https://lore.kernel.org/r/20231027154615.815134-1-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
tools/testing/selftests/landlock/fs_test.c