selftests/landlock: Add tests to check unhandled rule's access rights
authorMickaël Salaün <mic@digikod.net>
Thu, 30 Nov 2023 09:36:16 +0000 (10:36 +0100)
committerMickaël Salaün <mic@digikod.net>
Fri, 22 Dec 2023 15:35:22 +0000 (16:35 +0100)
commite2780a0b95a1b5d137ccf0e0747b77f174f55511
tree80d5411b9612dc743f510a9e324eab1e4e508115
parent6471c9c4c4d26f85d89e1493c0d51fb6f2b6f273
selftests/landlock: Add tests to check unhandled rule's access rights

Add two tests to make sure that we cannot add a rule to a ruleset if the
rule's access rights that are not handled by the ruleset:
* fs: layout1.rule_with_unhandled_access
* net: mini.rule_with_unhandled_access

Cc: Konstantin Meskhidze <konstantin.meskhidze@huawei.com>
Reviewed-by: Günther Noack <gnoack@google.com>
Link: https://lore.kernel.org/r/20231130093616.67340-3-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
tools/testing/selftests/landlock/fs_test.c
tools/testing/selftests/landlock/net_test.c