]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
btrfs/220: fix clear_cache and inode_cache option tests
authorBoris Burkov <boris@bur.io>
Tue, 12 Jan 2021 21:17:47 +0000 (13:17 -0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 15 Aug 2021 15:30:02 +0000 (23:30 +0800)
I recently changed clear_cache to not appear in mount options, as it
has one shot semantics, which was breaking this test. Test
explicitly that it _doesn't_ appear, which properly fails on old
filesystems and passes on misc-next.

The patch that changed this behavior was:
8b228324a8ce btrfs: clear free space tree on ro->rw remount

Separately, inode_cache is deprecated and will never appear in mount
options; remove it entirely.

Signed-off-by: Boris Burkov <boris@bur.io>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/220

index 9991e6eba3275b5825b442e9ec98344b8b6bc9cd..7207c6967793ca929a3dee9dfcf6c11ed9f08b25 100755 (executable)
@@ -207,11 +207,8 @@ test_optional_kernel_features()
 
 test_non_revertible_options()
 {
-       test_mount_opt "clear_cache" "clear_cache"
        test_mount_opt "degraded" "degraded"
 
-       test_mount_opt "inode_cache" "inode_cache"
-
        # nologreplay should be used only with
        test_should_fail "nologreplay"
        test_mount_opt "nologreplay,ro" "ro,rescue=nologreplay"
@@ -230,6 +227,11 @@ test_non_revertible_options()
        test_mount_opt "rescue=nologreplay,ro" "ro,rescue=nologreplay"
 }
 
+test_one_shot_options()
+{
+       test_mount_opt "clear_cache" ""
+}
+
 # All these options can be reverted (with their "no" counterpart), or can have
 # their values set to default on remount
 test_revertible_options()
@@ -313,6 +315,8 @@ test_optional_kernel_features
 
 test_non_revertible_options
 
+test_one_shot_options
+
 test_revertible_options
 
 test_subvol