From patchwork Mon Mar 16 05:47:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Dongsheng X-Patchwork-Id: 6015521 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B7103BF90F for ; Mon, 16 Mar 2015 05:51:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9990E20411 for ; Mon, 16 Mar 2015 05:51:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 75B47203F3 for ; Mon, 16 Mar 2015 05:51:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750862AbbCPFvO (ORCPT ); Mon, 16 Mar 2015 01:51:14 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:2552 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750736AbbCPFvO (ORCPT ); Mon, 16 Mar 2015 01:51:14 -0400 X-IronPort-AV: E=Sophos;i="5.04,848,1406563200"; d="scan'208";a="77900867" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 16 Mar 2015 13:47:27 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id t2G5o9sb016703; Mon, 16 Mar 2015 13:50:10 +0800 Received: from [10.167.226.66] (10.167.226.66) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server id 14.3.181.6; Mon, 16 Mar 2015 13:51:10 +0800 Message-ID: <55066E71.3000402@cn.fujitsu.com> Date: Mon, 16 Mar 2015 13:47:29 +0800 From: Dongsheng Yang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Eryu Guan CC: , Subject: Re: [PATCH] fstest: btrfs: add a test for quota number when deleting a subvol. References: <54EEB798.1070105@cn.fujitsu.com> <1425381210-13661-1-git-send-email-yangds.fnst@cn.fujitsu.com> <20150306050600.GQ16974@dhcp-13-216.nay.redhat.com> <550664EC.7090705@cn.fujitsu.com> <20150316053337.GA23302@dhcp-13-216.nay.redhat.com> In-Reply-To: <20150316053337.GA23302@dhcp-13-216.nay.redhat.com> X-Originating-IP: [10.167.226.66] Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 03/16/2015 01:33 PM, Eryu Guan wrote: > On Mon, Mar 16, 2015 at 01:06:52PM +0800, Dongsheng Yang wrote: >> Hi Guan, sorry for the late. >> >> On 03/06/2015 01:06 PM, Eryu Guan wrote: >>> On Tue, Mar 03, 2015 at 07:13:30PM +0800, Dongsheng Yang wrote: >>>> This regression is introduced by two commits: >>>> >>>> e339a6b0 (Btrfs: __btrfs_mod_ref should always use no_quota) >>>> 1152651a (btrfs: qgroup: account shared subtrees during snapshot delete) > [snip] > >>>> +_cleanup() >>>> +{ >>>> + cd / >>>> + rm -f $tmp.* >>> Better to use a tab not 4 spaces, maybe "new" should be updated too (in >>> another patch) >> Thanx, will send another patch for "./new". > Just FYI, I've already sent out the fix, please see > > http://www.spinics.net/lists/fstests/msg01073.html Great!! Thanx for your information. But I found some other 4 spaces in new, I am not sure whether we also need to replace them with tab or not as shown below. Thanx commit 931340c0c5599ae2c6714df16c796ea24240a5a7 Author: Dongsheng Yang Date: Mon Mar 16 01:15:53 2015 -0400 new: replace 4 spaces with a tab. Sugguested-by: Eryu Guan Signed-off-by: Dongsheng Yang > Thanks, > Eryu Guan > . > --- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/new b/new index 86f9075..f94daed 100755 --- a/new +++ b/new @@ -29,15 +29,15 @@ trap "rm -f /tmp/$$.; exit" 0 1 2 3 15 _cleanup() { - : + : } SRC_GROUPS=`find tests -not -path tests -type d -printf "%f "` usage() { - echo "Usage $0 test_dir" - echo "Available dirs are: $SRC_GROUPS" - exit + echo "Usage $0 test_dir" + echo "Available dirs are: $SRC_GROUPS" + exit } [ $# -eq 0 ] && usage @@ -46,8 +46,8 @@ shift if [ ! -f $tdir/group ] then - echo "Creating the $tdir/group index ..." - cat <<'End-of-File' >$tdir/group + echo "Creating the $tdir/group index ..." + cat <<'End-of-File' >$tdir/group # QA groups control # # define groups and default group owners @@ -65,15 +65,15 @@ fi if [ ! -w $tdir/group ] then - chmod u+w $tdir/group - echo "Warning: making the index file \"$tdir/group\" writeable" + chmod u+w $tdir/group + echo "Warning: making the index file \"$tdir/group\" writeable" fi if make then - : + : else - echo "Warning: make failed -- some tests may be missing" + echo "Warning: make failed -- some tests may be missing" fi i=0 @@ -83,16 +83,16 @@ eof=1 for found in `cat $tdir/group | $AWK_PROG '{ print $1 }'` do - line=$((line+1)) - if [ -z "$found" ] || [ "$found" == "#" ];then + line=$((line+1)) + if [ -z "$found" ] || [ "$found" == "#" ];then continue - fi - i=$((i+1)) - id=`printf "%03d" $i` - if [ "$id" != "$found" ];then + fi + i=$((i+1)) + id=`printf "%03d" $i` + if [ "$id" != "$found" ];then eof=0 break - fi + fi done if [ $eof -eq 1 ]; then line=$((line+1)) @@ -104,9 +104,9 @@ echo "Next test is $id" if [ -f $tdir/$id ] then - echo "Error: test $id already exists!" - _cleanup - exit 1 + echo "Error: test $id already exists!" + _cleanup + exit 1 fi echo -n "Creating skeletal script for you to edit ..." @@ -148,8 +148,8 @@ trap "_cleanup; exit \\\$status" 0 1 2 3 15 _cleanup() { - cd / - rm -f \$tmp.* + cd / + rm -f \$tmp.* } # get standard environment, filters and checks @@ -184,39 +184,39 @@ ${EDITOR-vi} $tdir/$id if [ $# -eq 0 ] then - while true - do + while true + do echo -n "Add to group(s) [other] (? for list): " read ans [ -z "$ans" ] && ans=other if [ "X$ans" = "X?" ] then - for d in $SRC_GROUPS; do + for d in $SRC_GROUPS; do l=$(sed -n < tests/$d/group \ - -e 's/#.*//' \ - -e 's/$/ /' \ - -e 's;\(^[0-9][0-9][0-9]\)\(.*$\);\2;p') + -e 's/#.*//' \ + -e 's/$/ /' \ + -e 's;\(^[0-9][0-9][0-9]\)\(.*$\);\2;p') grpl="$grpl $l" - done - lst=`for word in $grpl; do echo $word; done | sort| uniq ` - echo $lst + done + lst=`for word in $grpl; do echo $word; done | sort| uniq ` + echo $lst else - break + break fi - done + done else - # expert mode, groups are on the command line - # - for g in $* - do + # expert mode, groups are on the command line + # + for g in $* + do if grep "^$g[ ]" $tdir/group >/dev/null then - : + : else - echo "Warning: group \"$g\" not defined in $tdir/group" + echo "Warning: group \"$g\" not defined in $tdir/group" fi - done - ans="$*" + done + ans="$*" fi >