Skip to contentSkip to conversation

ext4/053: test changing test_dummy_encryption on remount

PATCH In review Eric Biggers 2 participants 2 messages Jun 23, 2022 – Jun 24, 2022 fscrypt: file system level encryption support

lore
Share & tools
lore

Eric Biggers

author maintainer
#0 lore raw

PATCH v2 1/1 ext4/053: test changing test_dummy_encryption on remount

From: Eric Biggers <[email protected]>

The test_dummy_encryption mount option isn't supposed to be settable or changeable via a remount, so add test cases for this. This is a regression test for a bug that was introduced in Linux v5.17 and fixed in v5.19-rc3 by commit 85456054e10b ("ext4: fix up test_dummy_encryption handling for new mount API").

---

v2: added info about fixing commit, and added a Reviewed-by tag

 tests/ext4/053 | 3 +++
 1 file changed, 3 insertions(+)
tests/ext4/053 +3 -0
index 23e553c5..555e474e 100755
@@ -685,6 +685,9 @@ for fstype in ext2 ext3 ext4; do
 		mnt test_dummy_encryption=v2
 		not_mnt test_dummy_encryption=bad
 		not_mnt test_dummy_encryption=
+		# Can't be set or changed on remount.
+		mnt_then_not_remount defaults test_dummy_encryption
+		mnt_then_not_remount test_dummy_encryption=v1 test_dummy_encryption=v2
 		do_mkfs -O ^encrypt $SCRATCH_DEV ${SIZE}k
 	fi
 	not_mnt test_dummy_encryption

base-commit: 0882b0913eae6fd6d2010323da1dde0ff96bf7d4

Signature · 1 line
2.36.1
#1 lore raw
Quoted 11 lines · Eric Biggers

From: Eric Biggers <[email protected]>

The test_dummy_encryption mount option isn't supposed to be settable or changeable via a remount, so add test cases for this. This is a regression test for a bug that was introduced in Linux v5.17 and fixed in v5.19-rc3 by commit 85456054e10b ("ext4: fix up test_dummy_encryption handling for new mount API").

---

Thanks for reminding that, I'll merge this patch this week.

Quoted 25 lines

v2: added info about fixing commit, and added a Reviewed-by tag

 tests/ext4/053 | 3 +++
 1 file changed, 3 insertions(+)
tests/ext4/053 +3 -0
index 23e553c5..555e474e 100755
@@ -685,6 +685,9 @@ for fstype in ext2 ext3 ext4; do
 		mnt test_dummy_encryption=v2
 		not_mnt test_dummy_encryption=bad
 		not_mnt test_dummy_encryption=
+		# Can't be set or changed on remount.
+		mnt_then_not_remount defaults test_dummy_encryption
+		mnt_then_not_remount test_dummy_encryption=v1 test_dummy_encryption=v2
 		do_mkfs -O ^encrypt $SCRATCH_DEV ${SIZE}k
 	fi
 	not_mnt test_dummy_encryption

base-commit: 0882b0913eae6fd6d2010323da1dde0ff96bf7d4

Signature · 1 line
2.36.1