mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: check vg fields with one command
This commit is contained in:
parent
057b1bde75
commit
d3c22aedc4
@ -405,10 +405,11 @@ pvlv_counts() {
|
|||||||
local num_pvs=$2
|
local num_pvs=$2
|
||||||
local num_lvs=$3
|
local num_lvs=$3
|
||||||
local num_snaps=$4
|
local num_snaps=$4
|
||||||
lvs -o+devices "$local_vg"
|
eval "$(vgs --noheadings --nameprefixes -o pv_count,lv_count,snap_count "$local_vg")"
|
||||||
vg_field "$local_vg" pv_count "$num_pvs"
|
[ "$LVM2_PV_COUNT" = "$num_pvs" ] && [ "$LVM2_LV_COUNT" = "$num_lvs" ] && [ "$LVM2_SNAP_COUNT" = "$num_snaps" ] ||
|
||||||
vg_field "$local_vg" lv_count "$num_lvs"
|
die "vg_fields: vg=\"$local_vg\", field=\"pv_count,lv_count,snap_count\","\
|
||||||
vg_field "$local_vg" snap_count "$num_snaps"
|
"actual=\"$LVM2_PV_COUNT $LVM2_LV_COUNT $LVM2_SNAP_COUNT\", "\
|
||||||
|
"expected=\"$num_pvs $num_lvs $num_snaps\""
|
||||||
}
|
}
|
||||||
|
|
||||||
# Compare md5 check generated from get dev_md5sum
|
# Compare md5 check generated from get dev_md5sum
|
||||||
|
Loading…
Reference in New Issue
Block a user