FS/XFS testing framework
 help / color / mirror / Atom feed
* [PATCH v1 1/3] f2fs/015: clear MKFS_OPTIONS and MOUNT_OPTIONS
@ 2025-11-12 13:52 Joanne Chang
  2025-11-12 13:52 ` [PATCH v1 2/3] f2fs/016: add test cases for test_dummy_encryption mount option Joanne Chang
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Joanne Chang @ 2025-11-12 13:52 UTC (permalink / raw)
  To: Zorro Lang, fstests; +Cc: Jaegeuk Kim, linux-f2fs-devel, Chao Yu, Joanne Chang

Currently, residual options can interfere with checking the mount
behavior of the listed MKFS_OPTIONS and MOUNT_OPTIONS. For example,
"Option#120: test_dummy_encryption" should fail with the listed
options but succeeds if “MKFS_OPTIONS=encrypt” is preset. By
explicitly clearing MKFS_OPTIONS and MOUNT_OPTIONS, the test’s
reliability can be improved.

f2fs/015.out is also updated to expect failure for cases that require
additional mkfs attributes to mount.

Signed-off-by: Joanne Chang <joannechien@google.com>
---
 tests/f2fs/015     | 3 +++
 tests/f2fs/015.out | 8 ++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/f2fs/015 b/tests/f2fs/015
index 73ac3d82..6a7a582c 100755
--- a/tests/f2fs/015
+++ b/tests/f2fs/015
@@ -103,6 +103,9 @@ options=(
 	"norecovery,ro"			""			\
 )
 
+# remove all mkfs/mount options to avoid affecting results
+export MKFS_OPTIONS=""
+export MOUNT_OPTIONS=""
 for ((i=0;i<${#options[@]};i=i+2))
 do
 	echo "Option#$i: ${options[$i]} : ${options[$((i+1))]}"
diff --git a/tests/f2fs/015.out b/tests/f2fs/015.out
index 8d6712f0..3df29436 100644
--- a/tests/f2fs/015.out
+++ b/tests/f2fs/015.out
@@ -38,7 +38,7 @@ Option#34: inline_xattr :
 Option#36: noinline_xattr : 
 0
 Option#38: inline_xattr_size=400 : 
-0
+32
 Option#40: inline_data : 
 0
 Option#42: noinline_dentry : 
@@ -120,11 +120,11 @@ Option#116: fsync_mode=strict :
 Option#118: fsync_mode=nobarrier : 
 0
 Option#120: test_dummy_encryption : 
-0
+32
 Option#122: test_dummy_encryption=v1 : 
-0
+32
 Option#124: test_dummy_encryption=v2 : 
-0
+32
 Option#126: checkpoint=enable : 
 0
 Option#128: checkpoint=disable : 
-- 
2.51.2.1041.gc1ab5b90ca-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v1 2/3] f2fs/016: add test cases for test_dummy_encryption mount option
  2025-11-12 13:52 [PATCH v1 1/3] f2fs/015: clear MKFS_OPTIONS and MOUNT_OPTIONS Joanne Chang
@ 2025-11-12 13:52 ` Joanne Chang
  2025-11-14  1:33   ` Chao Yu
  2025-11-12 13:52 ` [PATCH v1 3/3] f2fs/{019,020}: clear MOUNT_OPTIONS alongside MKFS_OPTIONS Joanne Chang
  2025-11-14  1:30 ` [PATCH v1 1/3] f2fs/015: clear MKFS_OPTIONS and MOUNT_OPTIONS Chao Yu
  2 siblings, 1 reply; 8+ messages in thread
From: Joanne Chang @ 2025-11-12 13:52 UTC (permalink / raw)
  To: Zorro Lang, fstests; +Cc: Jaegeuk Kim, linux-f2fs-devel, Chao Yu, Joanne Chang

Add test cases to verify f2fs's support for different versions of the
"test_dummy_encryption" mount option.

To ensure test robustness, the MKFS_OPTIONS and MOUNT_OPTIONS are
cleared. This prevents additional options from interfereing with the
test results.

Signed-off-by: Joanne Chang <joannechien@google.com>
---
 tests/f2fs/016     | 6 ++++++
 tests/f2fs/016.out | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/tests/f2fs/016 b/tests/f2fs/016
index 800f75fc..a6df827d 100755
--- a/tests/f2fs/016
+++ b/tests/f2fs/016
@@ -35,8 +35,14 @@ options=(
 	"compress_mode=fs"		"extra_attr,compression"	\
 	"compress_mode=user"		"extra_attr,compression"	\
 	"compress_cache"		"extra_attr,compression"	\
+	"test_dummy_encryption"		"encrypt"					\
+	"test_dummy_encryption=v1"	"encrypt"					\
+	"test_dummy_encryption=v2"	"encrypt"					\
 )
 
+# remove all mkfs/mount options to avoid affecting results
+export MKFS_OPTIONS=""
+export MOUNT_OPTIONS=""
 for ((i=0;i<${#options[@]};i=i+2))
 do
 	echo "Option#$i: ${options[$i]} : ${options[$((i+1))]}"
diff --git a/tests/f2fs/016.out b/tests/f2fs/016.out
index a8c96972..5ff116a7 100644
--- a/tests/f2fs/016.out
+++ b/tests/f2fs/016.out
@@ -31,3 +31,9 @@ Option#28: compress_mode=user : extra_attr,compression
 0
 Option#30: compress_cache : extra_attr,compression
 0
+Option#32: test_dummy_encryption : encrypt
+0
+Option#34: test_dummy_encryption=v1 : encrypt
+0
+Option#36: test_dummy_encryption=v2 : encrypt
+0
-- 
2.51.2.1041.gc1ab5b90ca-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v1 3/3] f2fs/{019,020}: clear MOUNT_OPTIONS alongside MKFS_OPTIONS
  2025-11-12 13:52 [PATCH v1 1/3] f2fs/015: clear MKFS_OPTIONS and MOUNT_OPTIONS Joanne Chang
  2025-11-12 13:52 ` [PATCH v1 2/3] f2fs/016: add test cases for test_dummy_encryption mount option Joanne Chang
@ 2025-11-12 13:52 ` Joanne Chang
  2025-11-14  1:34   ` Chao Yu
  2025-11-14  1:30 ` [PATCH v1 1/3] f2fs/015: clear MKFS_OPTIONS and MOUNT_OPTIONS Chao Yu
  2 siblings, 1 reply; 8+ messages in thread
From: Joanne Chang @ 2025-11-12 13:52 UTC (permalink / raw)
  To: Zorro Lang, fstests; +Cc: Jaegeuk Kim, linux-f2fs-devel, Chao Yu, Joanne Chang

Currently, f2fs/019 and f2fs/020 only clears MKFS_OPTIONS. This causes
the tests to fail when leftover MOUNT_OPTIONS depend on unapplied
MKFS_OPTIONS. So MOUNT_OPTIONS should also be cleared to ensure reliable
mounting.

Signed-off-by: Joanne Chang <joannechien@google.com>
---
 tests/f2fs/019 | 1 +
 tests/f2fs/020 | 1 +
 2 files changed, 2 insertions(+)

diff --git a/tests/f2fs/019 b/tests/f2fs/019
index a6e6e38c..721f2180 100755
--- a/tests/f2fs/019
+++ b/tests/f2fs/019
@@ -22,6 +22,7 @@ _require_inject_f2fs_command node addr
 
 # remove all mkfs options to avoid layout change of on-disk inode
 export MKFS_OPTIONS=""
+export MOUNT_OPTIONS=""
 
 testfile=$SCRATCH_MNT/testfile
 
diff --git a/tests/f2fs/020 b/tests/f2fs/020
index a6933134..eecd312d 100755
--- a/tests/f2fs/020
+++ b/tests/f2fs/020
@@ -25,6 +25,7 @@ _require_attrs user
 
 # remove all mkfs options to avoid layout change of on-disk inode
 export MKFS_OPTIONS=""
+export MOUNT_OPTIONS=""
 
 testdir=$SCRATCH_MNT/testdir
 
-- 
2.51.2.1041.gc1ab5b90ca-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 1/3] f2fs/015: clear MKFS_OPTIONS and MOUNT_OPTIONS
  2025-11-12 13:52 [PATCH v1 1/3] f2fs/015: clear MKFS_OPTIONS and MOUNT_OPTIONS Joanne Chang
  2025-11-12 13:52 ` [PATCH v1 2/3] f2fs/016: add test cases for test_dummy_encryption mount option Joanne Chang
  2025-11-12 13:52 ` [PATCH v1 3/3] f2fs/{019,020}: clear MOUNT_OPTIONS alongside MKFS_OPTIONS Joanne Chang
@ 2025-11-14  1:30 ` Chao Yu
  2 siblings, 0 replies; 8+ messages in thread
From: Chao Yu @ 2025-11-14  1:30 UTC (permalink / raw)
  To: Joanne Chang, Zorro Lang, fstests; +Cc: chao, Jaegeuk Kim, linux-f2fs-devel

On 11/12/2025 9:52 PM, Joanne Chang wrote:
> Currently, residual options can interfere with checking the mount
> behavior of the listed MKFS_OPTIONS and MOUNT_OPTIONS. For example,
> "Option#120: test_dummy_encryption" should fail with the listed
> options but succeeds if “MKFS_OPTIONS=encrypt” is preset. By
> explicitly clearing MKFS_OPTIONS and MOUNT_OPTIONS, the test’s
> reliability can be improved.
> 
> f2fs/015.out is also updated to expect failure for cases that require
> additional mkfs attributes to mount.
> 
> Signed-off-by: Joanne Chang <joannechien@google.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 2/3] f2fs/016: add test cases for test_dummy_encryption mount option
  2025-11-12 13:52 ` [PATCH v1 2/3] f2fs/016: add test cases for test_dummy_encryption mount option Joanne Chang
@ 2025-11-14  1:33   ` Chao Yu
  2025-11-15  6:49     ` Zorro Lang
  0 siblings, 1 reply; 8+ messages in thread
From: Chao Yu @ 2025-11-14  1:33 UTC (permalink / raw)
  To: Zorro Lang, fstests, Joanne Chang; +Cc: chao, Jaegeuk Kim, linux-f2fs-devel

On 11/12/2025 9:52 PM, Joanne Chang wrote:
> Add test cases to verify f2fs's support for different versions of the
> "test_dummy_encryption" mount option.
> 
> To ensure test robustness, the MKFS_OPTIONS and MOUNT_OPTIONS are
> cleared. This prevents additional options from interfereing with the
> test results.
> 
> Signed-off-by: Joanne Chang <joannechien@google.com>

To Zorro,

The changes look good to me, though, still I want to confirm that whether
it is recommended or not to add new cases in old testcase.

Thanks,

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 3/3] f2fs/{019,020}: clear MOUNT_OPTIONS alongside MKFS_OPTIONS
  2025-11-12 13:52 ` [PATCH v1 3/3] f2fs/{019,020}: clear MOUNT_OPTIONS alongside MKFS_OPTIONS Joanne Chang
@ 2025-11-14  1:34   ` Chao Yu
  0 siblings, 0 replies; 8+ messages in thread
From: Chao Yu @ 2025-11-14  1:34 UTC (permalink / raw)
  To: Joanne Chang, Zorro Lang, fstests; +Cc: chao, Jaegeuk Kim, linux-f2fs-devel

On 11/12/2025 9:52 PM, Joanne Chang wrote:
> Currently, f2fs/019 and f2fs/020 only clears MKFS_OPTIONS. This causes
> the tests to fail when leftover MOUNT_OPTIONS depend on unapplied
> MKFS_OPTIONS. So MOUNT_OPTIONS should also be cleared to ensure reliable
> mounting.
> 
> Signed-off-by: Joanne Chang <joannechien@google.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 2/3] f2fs/016: add test cases for test_dummy_encryption mount option
  2025-11-14  1:33   ` Chao Yu
@ 2025-11-15  6:49     ` Zorro Lang
  2025-11-15 10:57       ` Chao Yu
  0 siblings, 1 reply; 8+ messages in thread
From: Zorro Lang @ 2025-11-15  6:49 UTC (permalink / raw)
  To: Chao Yu; +Cc: Zorro Lang, fstests, Joanne Chang, Jaegeuk Kim, linux-f2fs-devel

On Fri, Nov 14, 2025 at 09:33:58AM +0800, Chao Yu wrote:
> On 11/12/2025 9:52 PM, Joanne Chang wrote:
> > Add test cases to verify f2fs's support for different versions of the
> > "test_dummy_encryption" mount option.
> > 
> > To ensure test robustness, the MKFS_OPTIONS and MOUNT_OPTIONS are
> > cleared. This prevents additional options from interfereing with the
> > test results.
> > 
> > Signed-off-by: Joanne Chang <joannechien@google.com>
> 
> To Zorro,
> 
> The changes look good to me, though, still I want to confirm that whether
> it is recommended or not to add new cases in old testcase.

Hi Chao,

I think this case isn't a regression test to uncover a known bug, it's a
basic mount options test for f2fs. So that makes sense to me to add
"test_dummy_encryption" into f2fs/016, especially if it doesn't need to
bring in more _require_* restriction (right?) .

Reviewed-by: Zorro Lang <zlang@redhat.com>

Thanks,
Zorro

> 
> Thanks,
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 2/3] f2fs/016: add test cases for test_dummy_encryption mount option
  2025-11-15  6:49     ` Zorro Lang
@ 2025-11-15 10:57       ` Chao Yu
  0 siblings, 0 replies; 8+ messages in thread
From: Chao Yu @ 2025-11-15 10:57 UTC (permalink / raw)
  To: Zorro Lang
  Cc: chao, Zorro Lang, fstests, Joanne Chang, Jaegeuk Kim,
	linux-f2fs-devel

On 11/15/2025 2:49 PM, Zorro Lang wrote:
> On Fri, Nov 14, 2025 at 09:33:58AM +0800, Chao Yu wrote:
>> On 11/12/2025 9:52 PM, Joanne Chang wrote:
>>> Add test cases to verify f2fs's support for different versions of the
>>> "test_dummy_encryption" mount option.
>>>
>>> To ensure test robustness, the MKFS_OPTIONS and MOUNT_OPTIONS are
>>> cleared. This prevents additional options from interfereing with the
>>> test results.
>>>
>>> Signed-off-by: Joanne Chang <joannechien@google.com>
>>
>> To Zorro,
>>
>> The changes look good to me, though, still I want to confirm that whether
>> it is recommended or not to add new cases in old testcase.
> 
> Hi Chao,
> 
> I think this case isn't a regression test to uncover a known bug, it's a
> basic mount options test for f2fs. So that makes sense to me to add
> "test_dummy_encryption" into f2fs/016, especially if it doesn't need to
> bring in more _require_* restriction (right?) .

Zorro,

Thanks for the confirmation, I agree w/ that.

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

> 
> Reviewed-by: Zorro Lang <zlang@redhat.com>
> 
> Thanks,
> Zorro
> 
>>
>> Thanks,
>>
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-11-15 10:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-12 13:52 [PATCH v1 1/3] f2fs/015: clear MKFS_OPTIONS and MOUNT_OPTIONS Joanne Chang
2025-11-12 13:52 ` [PATCH v1 2/3] f2fs/016: add test cases for test_dummy_encryption mount option Joanne Chang
2025-11-14  1:33   ` Chao Yu
2025-11-15  6:49     ` Zorro Lang
2025-11-15 10:57       ` Chao Yu
2025-11-12 13:52 ` [PATCH v1 3/3] f2fs/{019,020}: clear MOUNT_OPTIONS alongside MKFS_OPTIONS Joanne Chang
2025-11-14  1:34   ` Chao Yu
2025-11-14  1:30 ` [PATCH v1 1/3] f2fs/015: clear MKFS_OPTIONS and MOUNT_OPTIONS Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox