selftests/landlock: Test landlock_create_ruleset(2) argument check ordering
authorMickaël Salaün <mic@digikod.net>
Fri, 6 May 2022 16:08:20 +0000 (18:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:26:23 +0000 (10:26 +0200)
commite17367395f87f03700e56c6bc7a46be48046f6dd
tree779eff8e392b3c8f50a5187ad4a6eba75ea2c4b3
parentfdb4aef066ff3799583e71293f724ad9455367c8
selftests/landlock: Test landlock_create_ruleset(2) argument check ordering

commit 6533d0c3a86ee1cc74ff37ac92ca597deb87015c upstream.

Add inval_create_ruleset_arguments, extension of
inval_create_ruleset_flags, to also check error ordering for
landlock_create_ruleset(2).

This is similar to the previous commit checking landlock_add_rule(2).

Test coverage for security/landlock is 94.4% of 504 lines accorging to
gcc/gcov-11.

Link: https://lore.kernel.org/r/20220506160820.524344-11-mic@digikod.net
Cc: stable@vger.kernel.org
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/landlock/base_test.c