f2fs/015: clear MKFS_OPTIONS and MOUNT_OPTIONS
PATCH 1/3 f2fs/015: clear MKFS_OPTIONS and MOUNT_OPTIONS
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.
--- tests/f2fs/015 | 3 +++ tests/f2fs/015.out | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-)
tests/f2fs/015 +3 -0
@@ -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))]}"
tests/f2fs/015.out +4 -4
@@ -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 :
Signature · 1 line
2.51.2.1041.gc1ab5b90ca-goog
PATCH 2/3 f2fs/016: add test cases for test_dummy_encryption mount option
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.
--- tests/f2fs/016 | 6 ++++++ tests/f2fs/016.out | 6 ++++++ 2 files changed, 12 insertions(+)
tests/f2fs/016 +6 -0
@@ -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))]}"
tests/f2fs/016.out +6 -0
@@ -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
Signature · 1 line
2.51.2.1041.gc1ab5b90ca-goog
Re: [PATCH v1 2/3] f2fs/016: add test cases for test_dummy_encryption mount option
Quoted 8 lines · 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_OPTIONSandMOUNT_OPTIONSare cleared. This prevents additional options from interfereing with the test results.Signed-off-by Joanne Chang <[email protected]>
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,
Zorro Lang
Reviewed-byRe: [PATCH v1 2/3] f2fs/016: add test cases for test_dummy_encryption mount option
Quoted 8 lines · Chao Yu
Quoted 7 lines · 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_OPTIONSandMOUNT_OPTIONSare cleared. This prevents additional options from interfereing with the test results.
Quoted 6 lines
Quoted 1 line
Signed-off-by Joanne Chang <[email protected]>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?) .
Thanks,
Zorro
Quoted 3 lines
Thanks,
Chao Yu
Reviewed-byRe: [PATCH v1 2/3] f2fs/016: add test cases for test_dummy_encryption mount option
Quoted 16 lines · Zorro Lang
Quoted 8 lines · Chao Yu
Quoted 7 lines · 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_OPTIONSandMOUNT_OPTIONSare cleared. This prevents additional options from interfereing with the test results.Quoted 6 lines
Quoted 1 line
Signed-off-by Joanne Chang <[email protected]>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.
Quoted 6 lines
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.
Thanks,
Quoted 10 lines
Reviewed-by Zorro Lang <[email protected]>Thanks,
ZorroQuoted 3 lines
Thanks,
PATCH 3/3 f2fs/{019,020}: clear MOUNT_OPTIONS alongside MKFS_OPTIONS
In reply to Joanne ChangCurrently, 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.
--- tests/f2fs/019 | 1 + tests/f2fs/020 | 1 + 2 files changed, 2 insertions(+)
tests/f2fs/019 +1 -0
@@ -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
tests/f2fs/020 +1 -0
@@ -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
Signature · 1 line
2.51.2.1041.gc1ab5b90ca-goog
Re: [PATCH v1 3/3] f2fs/{019,020}: clear MOUNT_OPTIONS alongside MKFS_OPTIONS
Quoted 6 lines · Joanne Chang
Currently, f2fs/019 and f2fs/020 only clears
MKFS_OPTIONS. This causes the tests to fail when leftoverMOUNT_OPTIONSdepend on unappliedMKFS_OPTIONS. SoMOUNT_OPTIONSshould also be cleared to ensure reliable mounting.Signed-off-by Joanne Chang <[email protected]>
Thanks,
Quoted 11 lines · Joanne Chang
Currently, residual options can interfere with checking the mount behavior of the listed
MKFS_OPTIONSandMOUNT_OPTIONS. For example, "Option#120:test_dummy_encryption" should fail with the listed options but succeeds if “MKFS_OPTIONS=encrypt” is preset. By explicitly clearingMKFS_OPTIONSandMOUNT_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 <[email protected]>
Thanks,