selftests/landlock: Share enforce_ruleset() helper
authorKonstantin Meskhidze <konstantin.meskhidze@huawei.com>
Thu, 26 Oct 2023 01:47:48 +0000 (09:47 +0800)
committerMickaël Salaün <mic@digikod.net>
Thu, 26 Oct 2023 19:07:15 +0000 (21:07 +0200)
commit1fa335209f6ad9d554655bb802c5b49b855d6237
tree7d76c51f7fd1a0d57c3cff60375653193898e466
parentfff69fb03dde1dfa348cfdb74b13287dabe42c25
selftests/landlock: Share enforce_ruleset() helper

Move enforce_ruleset() helper function to common.h so that it can be
used both by filesystem tests and network ones.

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