xfs
[Top] [All Lists]

Re: Failure of xfstests test case 202

To: Chandra Seetharaman <sekharan@xxxxxxxxxx>
Subject: Re: Failure of xfstests test case 202
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Sat, 11 Jun 2011 17:07:00 +1000
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, XFS Mailing List <xfs@xxxxxxxxxxx>
In-reply-to: <1307741624.7661.453.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <1307738387.7661.450.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20110610211911.GA11509@xxxxxxxxxxxxx> <1307741624.7661.453.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Fri, Jun 10, 2011 at 02:33:44PM -0700, Chandra Seetharaman wrote:
> 
> On Fri, 2011-06-10 at 17:19 -0400, Christoph Hellwig wrote:
> > On Fri, Jun 10, 2011 at 01:39:47PM -0700, Chandra Seetharaman wrote:
> > > Hi all,
> > > 
> > > Test case 202 tries to create a single AG filesystem and runs xfs_repair
> > > on it expecting it to fail.
> > > 
> > > But, when I run the test with a filesystem that is bigger than 1TB it
> > > fails (not pleasantly) since the max AG size is 1TB.
> > > 
> > > I am thinking of the following solution, please let me know if there is
> > > any other elegant fix.
> > 
> > What about:
> > 
> > #
> > # The AG size is limited to 1TB (or even less with historic xfsprogs),
> > # so chose a small enough filesystem to make sure we can actually create
> > # a single AG filesystem.
> > #
> > _scratch_mkfs_sized `expr 1024 \* 1024 \* 1024`
> > 
> > instead?
> 
> Good point. Here is a solution based on your suggestion, but not using
> _scratch_mkfs_sized (sincein the current context we need it to take
> extra option, whereas _scratch_mkfs_sized takes fixed options).
> 
> What do you think ?
> 
> ----------------
> diff --git a/202 b/202
> index cbdcb57..b982956 100755
> --- a/202
> +++ b/202
> @@ -41,11 +41,18 @@ _supported_os Linux
>  
>  _require_scratch
>  
> +#
> +# The AG size is limited to 1TB (or even less with historic xfsprogs),
> +# so chose a small enough filesystem to make sure we can actually create
> +# a single AG filesystem.
> +#
>  echo "== Creating single-AG filesystem =="
> -_scratch_mkfs_xfs -d agcount=1 >/dev/null 2>&1
> +_scratch_mkfs_xfs -d agcount=1 -d size=$((1024*1024*1024)) >/dev/null 2>&1 \
> + || _fail "!!! failed to make filesystem with single AG"

Should work for most test setups.

>  
>  echo "== Trying to repair it (should fail) =="
> -_scratch_xfs_repair
> +_scratch_xfs_repair \
> + && _fail "!!! xfs_repair of single AG filesystem succeeded. Expected to 
> fail."

But as I said before, this change is not necessary.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>