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:30:47 +0000 (10:30 +0200)
commit71a75ca9b21f218a29108fe8c688dca78eefe5c0
treef69ce2a070d6f25a7535a3223a329b5b2365e956
parent0ab37431f4ba6756080a404c7d99594903b7a8e7
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