From: Eric Biggers <ebiggers@kernel.org>
To: fstests@vger.kernel.org
Cc: linux-ext4@vger.kernel.org, Lukas Czerner <lczerner@redhat.com>
Subject: [PATCH v2] ext4/053: update the test_dummy_encryption tests
Date: Mon, 30 May 2022 10:30:44 -0700 [thread overview]
Message-ID: <20220530173044.156375-1-ebiggers@kernel.org> (raw)
From: Eric Biggers <ebiggers@google.com>
Kernel commit 5f41fdaea63d ("ext4: only allow test_dummy_encryption when
supported") tightened the requirements on when the test_dummy_encryption
mount option is accepted. Update ext4/053 accordingly.
Move the test cases to later in the file to group them with the other
test cases that use do_mkfs to add custom mkfs options instead of using
the "default" filesystem that the test creates at the beginning.
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
v2: mention the commit ID now that it is merged, and add a Reviewed-by
tests/ext4/053 | 35 +++++++++++++++++++++--------------
1 file changed, 21 insertions(+), 14 deletions(-)
diff --git a/tests/ext4/053 b/tests/ext4/053
index 187a2515..23e553c5 100755
--- a/tests/ext4/053
+++ b/tests/ext4/053
@@ -511,20 +511,6 @@ for fstype in ext2 ext3 ext4; do
mnt noinit_itable
mnt max_dir_size_kb=4096
- if _has_kernel_config CONFIG_FS_ENCRYPTION; then
- mnt test_dummy_encryption
- mnt test_dummy_encryption=v1
- mnt test_dummy_encryption=v2
- not_mnt test_dummy_encryption=v3
- not_mnt test_dummy_encryption=
- else
- mnt test_dummy_encryption ^test_dummy_encryption
- mnt test_dummy_encryption=v1 ^test_dummy_encryption=v1
- mnt test_dummy_encryption=v2 ^test_dummy_encryption=v2
- mnt test_dummy_encryption=v3 ^test_dummy_encryption=v3
- not_mnt test_dummy_encryption=
- fi
-
if _has_kernel_config CONFIG_FS_ENCRYPTION_INLINE_CRYPT; then
mnt inlinecrypt
else
@@ -686,6 +672,27 @@ for fstype in ext2 ext3 ext4; do
mnt_then_not_remount defaults jqfmt=vfsv1
remount defaults grpjquota=,usrjquota= ignored
+ echo "== Testing the test_dummy_encryption option" >> $seqres.full
+ # Since kernel commit 5f41fdaea63d ("ext4: only allow
+ # test_dummy_encryption when supported"), the test_dummy_encryption
+ # option is only allowed when the filesystem has the encrypt feature and
+ # the kernel has CONFIG_FS_ENCRYPTION. The encrypt feature requirement
+ # implies that this option is never allowed on ext2 or ext3 mounts.
+ if [[ $fstype == ext4 ]] && _has_kernel_config CONFIG_FS_ENCRYPTION; then
+ do_mkfs -O encrypt $SCRATCH_DEV ${SIZE}k
+ mnt test_dummy_encryption
+ mnt test_dummy_encryption=v1
+ mnt test_dummy_encryption=v2
+ not_mnt test_dummy_encryption=bad
+ not_mnt test_dummy_encryption=
+ do_mkfs -O ^encrypt $SCRATCH_DEV ${SIZE}k
+ fi
+ not_mnt test_dummy_encryption
+ not_mnt test_dummy_encryption=v1
+ not_mnt test_dummy_encryption=v2
+ not_mnt test_dummy_encryption=bad
+ not_mnt test_dummy_encryption=
+
done #for fstype in ext2 ext3 ext4; do
$UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1
base-commit: d3cc66012a287b6db81aad408b6970a4a96a67da
--
2.36.1
next reply other threads:[~2022-05-30 17:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-30 17:30 Eric Biggers [this message]
2022-05-30 19:07 ` [PATCH v2] ext4/053: update the test_dummy_encryption tests Theodore Ts'o
2022-05-30 19:47 ` Eric Biggers
2022-06-03 5:31 ` Zorro Lang
2022-06-03 5:48 ` Eric Biggers
2022-06-03 7:40 ` Zorro Lang
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=20220530173044.156375-1-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
/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).