Re: [PATCH v2] fstests: Make generic/081 run in old version of lvm

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



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@xxxxxxxxxx>
> 
> Signed-off-by: Zhao Lei <zhaolei@xxxxxxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux