selftests/landlock: Skip overlayfs tests when not supported
authorJeff Xu <jeffxu@google.com>
Fri, 13 Jan 2023 05:32:29 +0000 (05:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:39:59 +0000 (09:39 +0100)
commit6249f305cd341ee4f0e0ab63c4b84ebd47b84590
treebeb66390ed074bba432fbed9add51065877256ba
parent597ecd95b1f2108e1664d43a3665dce8f6538df0
selftests/landlock: Skip overlayfs tests when not supported

commit 366617a69e60610912836570546f118006ebc7cb upstream.

overlayfs may be disabled in the kernel configuration, causing related
tests to fail.  Check that overlayfs is supported at runtime, so we can
skip layout2_overlay.* accordingly.

Signed-off-by: Jeff Xu <jeffxu@google.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230113053229.1281774-2-jeffxu@google.com
[mic: Reword comments and constify variables]
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/landlock/fs_test.c