master - tests: fix tests checking pv_attr - there's a new bit now
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8ad93874d63d67ea375b37b7014d782476dab88d Commit: 8ad93874d63d67ea375b37b7014d782476dab88d Parent: a4e25f4381284967467a1103d67e3cdbdd2cdf82 Author: Peter Rajnoha <[email protected]> AuthorDate: Fri Feb 12 12:05:59 2016 +0100 Committer: Peter Rajnoha <[email protected]> CommitterDate: Mon Feb 15 12:44:46 2016 +0100
tests: fix tests checking pv_attr - there's a new bit now
--- lib/format_text/format-text.c | 3 +++ test/shell/pvchange-usage.sh | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-)
lib/format_text/format-text.c +3 -0
@@ -1447,6 +1447,9 @@ static int _text_pv_needs_rewrite(const struct format_type *fmt, struct physical *needs_rewrite =0 ; +if (!pv->is_labelled) +return 1 ; +if (!(info =lvmcache_info_from_pvid ((const char *)&pv->id,0 ))) {log_error ("Failed to find cached info for PV %s." ,pv_dev_name (pv));return 0 ;
test/shell/pvchange-usage.sh +5 -5
@@ -23,11 +23,11 @@ aux prepare_pvs 4 # check 'allocatable' pv attribute pvcreate "$dev1" -check pv_field "$dev1" pv_attr --- +check pv_field "$dev1" pv_attr ---- vgcreate $vg1 "$dev1" -check pv_field "$dev1" pv_attr a-- +check pv_field "$dev1" pv_attr a--u pvchange --allocatable n "$dev1" -check pv_field "$dev1" pv_attr --- +check pv_field "$dev1" pv_attr ---u vgremove -ff $vg1 not pvchange --allocatable y "$dev1" pvremove -ff "$dev1"
@@ -50,10 +50,10 @@ do # "vgchange disable/enable allocation for pvs with metadatacopies = $mda (bz452982)" pvchange "$dev1" -x n pvchange "$dev1" -x n # already disabled - check pv_field "$dev1" pv_attr --- + check pv_field "$dev1" pv_attr ---u pvchange "$dev1" -x y pvchange "$dev1" -x y # already enabled - check pv_field "$dev1" pv_attr a-- + check pv_field "$dev1" pv_attr a--u # check we are able to change number of managed metadata areas if test $mda -gt 0 ; then