xfs
[Top] [All Lists]

Re: [PATCH] xfstests: xfs directory unbalance assert test

To: Mark Tinguely <tinguely@xxxxxxx>
Subject: Re: [PATCH] xfstests: xfs directory unbalance assert test
From: Eryu Guan <guaneryu@xxxxxxxxx>
Date: Tue, 17 Sep 2013 23:28:52 +0800
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=qBuLUVFlzTK8sAMCxmNp/O8t4FpCwzh/AKnZBC4lrNk=; b=tO0xCfMZ4xx/a7Mjbe8Q5yOEviEbQS7DdiYQT3N9bKBFNOmBzlM+Id+c+ylpnoQIGI kwn12I/pn7572YXDWoZqAVrSiQTtydPpLpYtgTxftpzQUqpTByqBYJTC8sCOwB/seGlj kuBghZlzEA40FVnvEFCZK30UX+zhkr0U7JKpsviyX8wTDM2T1HRvW9EGIsJqw3EJLwLQ ja+WPaJ1aBuBj9lngYPrqoeMkLg8q0EqhClDam67WbLsUFW3XdtUwYjxu3NAx5ZFgw55 5pkqXS8zu1Vi4xqC/8SIjBGVO0MQHeShOTGWJppLpJhjEX9wPhx9vAYhJKtu35HYTcPf gIlQ==
In-reply-to: <20130917145959.333796933@xxxxxxx>
References: <20130917145946.124195107@xxxxxxx> <20130917145959.333796933@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Sep 17, 2013 at 09:59:47AM -0500, Mark Tinguely wrote:
> This tests triggers an assert in the XFS directory unbalance code.
> This test originally written by Brian Foster and suggestions
> from Micheal Semon.
> 
> Signed-off-by: Mark Tinguely <tinguely@xxxxxxx> 
> ---
>  tests/generic/319     |   62 
> ++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/generic/319.out |    2 +
>  tests/generic/group   |    1 
>  3 files changed, 65 insertions(+)
> 
> Index: b/tests/generic/319
> ===================================================================
> --- /dev/null
> +++ b/tests/generic/319
> @@ -0,0 +1,62 @@
> +#! /bin/bash
> +# FS QA Test No. 319
> +#
> +# Test directory code correctly handles fsstress filling the filesystem
> +#
> +#-----------------------------------------------------------------------
> +# Copyright (c) 2013 SGI.  All Rights Reserved.
> +#
> +# This program is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU General Public License as
> +# published by the Free Software Foundation.
> +#
> +# This program is distributed in the hope that it would be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write the Free Software Foundation,
> +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> +#-----------------------------------------------------------------------
> +#
> +
> +seq=`basename $0`
> +seqres=$RESULT_DIR/$seq
> +echo "QA output created by $seq"
> +
> +here=`pwd`
> +tmp=/tmp/$$
> +status=1     # failure is the default!
> +trap "_cleanup; exit \$status" 0 1 2 3 15
> +
> +_cleanup()
> +{
> +    cd /
> +}
> +
> +# get standard environment, filters and checks
> +. ./common/rc
> +. ./common/filter
> +_require_scratch
> +
> +# real QA test starts here
> +
> +_supported_fs generic
> +_supported_os IRIX Linux
> +
> +_scratch_unmount > /dev/null 2>&1

This is not necessary, _require_scratch has done the unmount work.

> +_scratch_mkfs_sized 11g >> $seqres.full 2>&1

_scratch_mkfs_sized expects fssize in bytes, 11g is not a valid value
The comments in common/rc about _scratch_mkfs_sized say

# _scratch_mkfs_sized <size in bytes> [optional blocksize]

> +_scratch_mount > /dev/null 2>&1
> +
> +# Fill the filesystem.
> +FSSTRESS_ARGS="-z -s 1378390208 -fsymlink=1 -n7500000 -p4 -d $SCRATCH_MNT"
> +$FSSTRESS_PROG $FSSTRESS_ARGS >> $seqres.full 2>&1
> +
> +cd $SCRATCH_MNT >> $seqres.full 2>&1
> +sync
> +# A debug XFS may assert in the remove due to a directory bug.
> +rm -rf *
> +echo "--- silence is golden ---"
> +status=0
> +exit
> Index: b/tests/generic/319.out
> ===================================================================
> --- /dev/null
> +++ b/tests/generic/319.out
> @@ -0,0 +1,2 @@
> +QA output created by 319
> +--- silence is golden ---
> Index: b/tests/generic/group
> ===================================================================
> --- a/tests/generic/group
> +++ b/tests/generic/group
> @@ -121,3 +121,4 @@
>  316 auto quick
>  317 auto metadata quick
>  318 acl attr auto quick
> +319 stress

Should be in auto group too I guess.

Thanks,
Eryu Guan
> 
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

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