From: jeffxu@chromium.org
To: mic@digikod.net
Cc: jorgelo@chromium.org, keescook@chromium.org,
linux-security-module@vger.kernel.org, groeck@chromium.org,
gnoack@google.com, Jeff Xu <jeffxu@google.com>
Subject: [PATCH v7 0/1] selftests/landlock: fix test when overlayfs is
Date: Thu, 29 Dec 2022 21:14:46 +0000 [thread overview]
Message-ID: <20221229211446.3154454-1-jeffxu@google.com> (raw)
From: Jeff Xu <jeffxu@google.com>
Overlayfs can be disabled in kernel config, causing related tests to
fail. Adding a check for overlayfs’s supportability at runtime,
so we can call SKIP() when needed.
v7:
Fix bug in supports_overlayfs().
Manual test with kernel with and without overlayfs.
v6: https://lore.kernel.org/all/20221229201215.3006512-1-jeffxu@google.com/
In v4, the SKIP() was applied at FIXTURE_SETUP() after mount() fail,
however, FIXTURE_TEARDOWN() will fail. It might be complicated
for test infra or testcase itself to have cleanup code handing the
success/failure of steps in SETUP().
This patch changes the approach, it calls supports_overlay() and SKIP()
at the beginning of FIXTURE_SETUP(), FIX_TEARDOWN(), TEST_F_FORK().
Because no modification of system is done by the test, cleanup is not
needed.
v4:
https://lore.kernel.org/all/20220823010216.2653012-1-jeffxu@google.com/
Jeff Xu (1):
selftests/landlock: skip overlayfs test when kernel not support it
tools/testing/selftests/landlock/fs_test.c | 51 ++++++++++++++++++++++
1 file changed, 51 insertions(+)
base-commit: 963a70bee5880640d0fd83ed29dc1e7ec0d2bd4a
--
2.39.0.314.g84b9a713c41-goog
next reply other threads:[~2022-12-29 21:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-29 21:14 jeffxu [this message]
2022-12-29 21:17 ` [PATCH v7 0/1] selftests/landlock: fix test when overlayfs is Jeff Xu
-- strict thread matches above, loose matches on Subject: below --
2022-12-29 21:05 jeffxu
2022-12-29 21:02 jeffxu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221229211446.3154454-1-jeffxu@google.com \
--to=jeffxu@chromium.org \
--cc=gnoack@google.com \
--cc=groeck@chromium.org \
--cc=jeffxu@google.com \
--cc=jorgelo@chromium.org \
--cc=keescook@chromium.org \
--cc=linux-security-module@vger.kernel.org \
--cc=mic@digikod.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).