From patchwork Fri Aug 3 06:44:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Misono Tomohiro X-Patchwork-Id: 10554601 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1E53E15E9 for ; Fri, 3 Aug 2018 06:45:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06ACE2BF90 for ; Fri, 3 Aug 2018 06:45:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED5702BFA7; Fri, 3 Aug 2018 06:45:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 719B22BFA1 for ; Fri, 3 Aug 2018 06:45:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729466AbeHCIkL (ORCPT ); Fri, 3 Aug 2018 04:40:11 -0400 Received: from mgwkm02.jp.fujitsu.com ([202.219.69.169]:31546 "EHLO mgwkm02.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729357AbeHCIkL (ORCPT ); Fri, 3 Aug 2018 04:40:11 -0400 Received: from kw-mxoi2.gw.nic.fujitsu.com (unknown [192.168.231.133]) by mgwkm02.jp.fujitsu.com with smtp id 544a_6096_3ad2f49b_c0d8_42aa_a532_184887756dd8; Fri, 03 Aug 2018 15:45:14 +0900 Received: from g01jpfmpwyt02.exch.g01.fujitsu.local (g01jpfmpwyt02.exch.g01.fujitsu.local [10.128.193.56]) by kw-mxoi2.gw.nic.fujitsu.com (Postfix) with ESMTP id E8176AC016F; Fri, 3 Aug 2018 15:45:13 +0900 (JST) Received: from G01JPEXCHYT17.g01.fujitsu.local (G01JPEXCHYT17.g01.fujitsu.local [10.128.194.56]) by g01jpfmpwyt02.exch.g01.fujitsu.local (Postfix) with ESMTP id 07B7B584360; Fri, 3 Aug 2018 15:45:13 +0900 (JST) X-SecurityPolicyCheck: OK by SHieldMailChecker v2.5.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20170217-enc X-SHieldMailCheckerMailID: 02eb6e1e992444d195b84c6980e354ed From: Misono Tomohiro Subject: [PATCH] fstests: btrfs/057: Update test case to keep subvolume in any kernel version References: To: CC: Message-ID: <4b4e3480-ccb7-d0aa-2a37-ea51699728e8@jp.fujitsu.com> Date: Fri, 3 Aug 2018 15:44:37 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-SecurityPolicyCheck-GC: OK by FENCE-Mail X-TM-AS-MML: disable Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: David Sterba --- 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`