public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Zhaolei <zhaolei@cn.fujitsu.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH v2] fstests: Make generic/081 run in old version of lvm
Date: Thu, 12 Nov 2015 11:43:49 +1100	[thread overview]
Message-ID: <20151112004349.GP19199@dastard> (raw)
In-Reply-To: <0b5bab871522166ec55727e234c56004098dbc77.1447235833.git.zhaolei@cn.fujitsu.com>

On Wed, Nov 11, 2015 at 05:57:33PM +0800, Zhaolei wrote:
....
> Fix:
>  Add a condition to to check if current lvm support --yes option,
>  Tested in above RHEL 6.3 platform.
> 
> Changelog v1->v2:
>  Use yes pipe, suggested by: Eryu Guan <eguan@redhat.com>
> 
> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
> ---
>  tests/generic/081 | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/generic/081 b/tests/generic/081
> index 8334ec9..1970075 100755
> --- a/tests/generic/081
> +++ b/tests/generic/081
> @@ -65,7 +65,11 @@ mkdir -p $mnt
>  # lvm uses some space for metadata
>  _scratch_mkfs_sized $((300 * 1024 * 1024)) >>$seqres.full 2>&1
>  $LVM_PROG vgcreate -f $vgname $SCRATCH_DEV >>$seqres.full 2>&1
> -$LVM_PROG lvcreate --yes -L 256M -n $lvname $vgname >>$seqres.full 2>&1
> +if $LVM_PROG lvcreate --yes --version >>$seqres.full 2>&1; then
> +	$LVM_PROG lvcreate --yes -L 256M -n $lvname $vgname >>$seqres.full 2>&1
> +else
> +	yes | $LVM_PROG lvcreate -L 256M -n $lvname $vgname >>$seqres.full 2>&1
> +fi

If the current version of lvm works with the pipe version, then just
use that unconditionally.

-Dave.
-- 
Dave Chinner
david@fromorbit.com

      reply	other threads:[~2015-11-12  0:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11  9:57 [PATCH v2] fstests: Make generic/081 run in old version of lvm Zhaolei
2015-11-12  0:43 ` Dave Chinner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151112004349.GP19199@dastard \
    --to=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=zhaolei@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox