mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
tests: do not use shell pipe for reshape_len
Tricky one - as the pipe exit codes may result into whole test failure depending on how quick/slow command exits are within pipeline. So get the len without piping.
This commit is contained in:
parent
2c5bf25187
commit
9295de7cea
@ -85,9 +85,11 @@ function _get_size
|
||||
local data_stripes=$3
|
||||
local reshape_len rimagesz
|
||||
|
||||
# Get any reshape size in sectors
|
||||
reshape_len=$(lvs --noheadings -aoname,reshapelen --unit s $vg/${lv}_rimage_0|head -1|cut -d ']' -f2)
|
||||
reshape_len=$(echo ${reshape_len/S}|xargs)
|
||||
# Get any reshape size in sectors
|
||||
# avoid using pipes as exit codes may cause test failure
|
||||
reshape_len="$(lvs --noheadings --nosuffix -aoreshapelen --unit s $vg/${lv}_rimage_0)"
|
||||
# drop everything past 'S'
|
||||
reshape_len="$(echo ${reshape_len/S*}|xargs)"
|
||||
|
||||
# Get rimage size - reshape length
|
||||
rimagesz=$(($(blockdev --getsz /dev/mapper/${vg}-${lv}_rimage_0) - $reshape_len))
|
||||
|
Loading…
x
Reference in New Issue
Block a user