xfs
[Top] [All Lists]

Re: [patch 2/3] [PATCH 2/3] xfstests: add test for sysfs publication of

To: Jeff Mahoney <jeffm@xxxxxxxx>
Subject: Re: [patch 2/3] [PATCH 2/3] xfstests: add test for sysfs publication of btrfs info
From: Josef Bacik <jbacik@xxxxxxxxxxxx>
Date: Mon, 28 Oct 2013 11:53:21 -0400
Cc: <xfs@xxxxxxxxxxx>, Josef Bacik <jbacik@xxxxxxxxxxxx>, <linux-btrfs@xxxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fusionio.com; s=default; t=1382975605; bh=CDjhUPZ8w8QqRcWrXB7UhN/4XX0WQh69iCtejIKDC5E=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=iWHH1OmYomyeS0rOcGZ71PDNq5Z8Ioi29nReyN+weM8gVQBOX0j2UmekPz6V8g4eM knI99XWy5AaXDvUnl2yKmC97sM0yZE7ijAHQqHXMxv5xgo2+QV8uuy+Z1LFrF/9p15 gL7xomPhRQNnspBnj5diiuXWaa3JBD+gEnC4kcbA=
In-reply-to: <20131025205559.690510798@xxxxxxxx>
References: <20131025205246.269327744@xxxxxxxx> <20131025205559.690510798@xxxxxxxx>
User-agent: Mutt/1.5.21 (2011-07-01)
On Fri, Oct 25, 2013 at 04:52:48PM -0400, Jeff Mahoney wrote:
> This tests the sysfs publishing for btrfs allocation and device
> membership info under a number of different layouts, similar to the
> btrfs replace test. We test the allocation files only for existence and
> that they contain numerical values. We test the device membership
> by mapping the devices used to create the file system to sysfs paths
> and matching them against the paths used for the device membership
> symlinks.
> 
> Since this is a new feature, it passes on kernels without
> a /sys/fs/btrfs/<fsid> directory.
> 
> Signed-off-by: Jeff Mahoney <jeffm@xxxxxxxx>
> ---
>  common/config       |   1 +
>  tests/btrfs/101     | 188 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/btrfs/101.out |   2 +
>  3 files changed, 191 insertions(+)
>  create mode 100755 tests/btrfs/101
>  create mode 100644 tests/btrfs/101.out
> 
> diff --git a/common/config b/common/config
> index 20c5b09..5f9e2e8 100644
> --- a/common/config
> +++ b/common/config
> @@ -208,6 +208,7 @@ case "$HOSTOS" in
>          export MKFS_UDF_PROG="`set_prog_path mkudffs`"
>          export MKFS_BTRFS_PROG="`set_btrfs_mkfs_prog_path_with_opts`"
>          export BTRFS_UTIL_PROG="`set_prog_path btrfs`"
> +        export UDEVADM_PROG="`set_prog_path udevadm`"
>          export BTRFS_SHOW_SUPER_PROG="`set_prog_path btrfs-show-super`"
>          export XFS_FSR_PROG="`set_prog_path xfs_fsr`"
>          export MKFS_NFS_PROG="false"
> diff --git a/tests/btrfs/101 b/tests/btrfs/101
> new file mode 100755
> index 0000000..9a2834b
> --- /dev/null
> +++ b/tests/btrfs/101
> @@ -0,0 +1,188 @@
> +#! /bin/bash
> +# FS QA Test No. btrfs/101
> +#
> +# Test of the btrfs sysfs publishing
> +#
> +#-----------------------------------------------------------------------
> +# Copyright (C) 2013 SUSE.  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
> +
> +# get standard environment, filters and checks
> +. ./common/rc
> +. ./common/filter
> +
> +# real QA test starts here
> +_need_to_be_root
> +_supported_fs btrfs
> +_require_scratch
> +_require_scratch_dev_pool
> +_require_command $UDEVADM_PROG udevadm

I don't think you need the extra udevadm here.  Thanks,

Josef

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