From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com ([209.132.183.28]:55036 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750729AbcLHIrR (ORCPT ); Thu, 8 Dec 2016 03:47:17 -0500 Date: Thu, 8 Dec 2016 16:47:15 +0800 From: Eryu Guan Subject: Re: [PATCH v2 2/2] fstests: btrfs: Use _require_btrfs_qgroup_report to replace open code Message-ID: <20161208084715.GJ29149@eguan.usersys.redhat.com> References: <20161208081213.19675-1-quwenruo@cn.fujitsu.com> <20161208081213.19675-2-quwenruo@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161208081213.19675-2-quwenruo@cn.fujitsu.com> Sender: fstests-owner@vger.kernel.org To: Qu Wenruo Cc: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org List-ID: On Thu, Dec 08, 2016 at 04:12:13PM +0800, Qu Wenruo wrote: > Introduce new _require_btrfs_qgroup_report function, which will check > the accessibility to "btrfs check --qgroup-report", then set a global > flag to info _check_scratch_fs() to do extra qgroup check. > > Signed-off-by: Qu Wenruo > --- > v2: > Use "${RESULT_DIR}/require_scratch.require_qgroup_report" instead of > global variant > Rebased to latest master > Replace btrfsck with $BTRFS_UTIL_PROG check. [snip] > diff --git a/tests/btrfs/042 b/tests/btrfs/042 > index 498ccc9..dc9b762 100755 > --- a/tests/btrfs/042 > +++ b/tests/btrfs/042 > @@ -43,6 +43,7 @@ _cleanup() > _supported_fs btrfs > _supported_os Linux > _require_scratch > +_require_btrfs_qgroup_report > > rm -f $seqres.full > > @@ -84,10 +85,7 @@ for i in `seq 10 -1 1`; do > total_written=$(($total_written+$filesize)) > done > > -#check if total written exceeds limit > -if [ $total_written -gt $LIMIT_SIZE ];then > - _fail "total written should be less than $LIMIT_SIZE" > -fi > +# qgroup will be checked automatically at _check_scratch_fs() by fstest This doesn't look like an equivalent replacement, and btrfs/042 fails for me after this update (wrong qgroup numbers) on 4.9-rc4 kernel. Is this change intentional? Thanks, Eryu