FSTests Archive on lore.kernel.org
 help / color / Atom feed
From: Boris Burkov <boris@bur.io>
To: fstests@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH] btrfs/220: fix clear_cache and inode_cache option tests
Date: Tue, 12 Jan 2021 13:17:47 -0800
Message-ID: <409e4c73fefce666d151b043d6b2a0d821f8ef85.1610485406.git.boris@bur.io> (raw)

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
---
 tests/btrfs/220 | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/tests/btrfs/220 b/tests/btrfs/220
index c84c7065..1242460f 100755
--- a/tests/btrfs/220
+++ b/tests/btrfs/220
@@ -215,11 +215,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"
@@ -238,6 +235,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()
@@ -321,6 +323,8 @@ test_optional_kernel_features
 
 test_non_revertible_options
 
+test_one_shot_options
+
 test_revertible_options
 
 test_subvol
-- 
2.24.1


             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12 21:17 Boris Burkov [this message]
2021-01-17 15:10 ` Eryu Guan
2021-02-17 11:29 ` Nikolay Borisov

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=409e4c73fefce666d151b043d6b2a0d821f8ef85.1610485406.git.boris@bur.io \
    --to=boris@bur.io \
    --cc=fstests@vger.kernel.org \
    --cc=kernel-team@fb.com \
    /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

FSTests Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/fstests/0 fstests/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 fstests fstests/ https://lore.kernel.org/fstests \
		fstests@vger.kernel.org
	public-inbox-index fstests

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.fstests


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git