All of lore.kernel.org
 help / color / mirror / Atom feed
From: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: [PATCH] fstests: btrfs/057: Update test case to keep subvolume in any kernel version
Date: Fri, 3 Aug 2018 15:44:37 +0900	[thread overview]
Message-ID: <4b4e3480-ccb7-d0aa-2a37-ea51699728e8@jp.fujitsu.com> (raw)
In-Reply-To: <cover.1533278551.git.misono.tomohiro@jp.fujitsu.com>

Since commit a79a464d5675 ("btrfs: Allow rmdir(2) to delete an empty
subvolume"), rm -r can delete a subvolume too.

This test assumes that rm -r does not delete a subvolume.
Currently the commit does not affect the test since qgroup items
still exist after subvolume deletion, but we plan to change the
behavior and remove them along with subvolume deletion.

So update the test and keep subvolume (and qgroup item) in any kernel
version.

Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
---
 tests/btrfs/057 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/btrfs/057 b/tests/btrfs/057
index 6743f774..b019f4e1 100755
--- a/tests/btrfs/057
+++ b/tests/btrfs/057
@@ -53,8 +53,9 @@ run_check $FSSTRESS_PROG -d $SCRATCH_MNT/snap1 -w -p 5 -n 1000 \
 _run_btrfs_util_prog quota enable $SCRATCH_MNT
 _run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
 
-# ignore removing subvolume errors
-rm -rf $SCRATCH_MNT/* >& /dev/null
+# remove all file/dir other than subvolume
+rm -rf $SCRATCH_MNT/snap1/* >& /dev/null
+rm -rf $SCRATCH_MNT/p* >& /dev/null
 
 _run_btrfs_util_prog filesystem sync $SCRATCH_MNT
 units=`_btrfs_qgroup_units`
-- 
2.14.4



       reply	other threads:[~2018-08-03  8:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1533278551.git.misono.tomohiro@jp.fujitsu.com>
2018-08-03  6:44 ` Misono Tomohiro [this message]
2018-08-03 13:39   ` [PATCH] fstests: btrfs/057: Update test case to keep subvolume in any kernel version David Sterba

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=4b4e3480-ccb7-d0aa-2a37-ea51699728e8@jp.fujitsu.com \
    --to=misono.tomohiro@jp.fujitsu.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.