diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2016-02-12 12:05:59 +0100 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2016-02-12 16:05:56 +0100 |
commit | 8105e4322419b80304f4f71297ff2f687c9c7ccc (patch) | |
tree | 2629d9716b7a2edc17a44866733603647e36d23d | |
parent | 16fdb5d1e66b7646d6c1e51d3a2ef2dd4fbb54c5 (diff) | |
download | lvm2-dev-prajnoha-pv-ext-flag-used.tar.gz |
tests: fix tests checking pv_attr - there's a new bit nowdev-prajnoha-pv-ext-flag-used
-rw-r--r-- | lib/format_text/format-text.c | 3 | ||||
-rw-r--r-- | test/shell/pvchange-usage.sh | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c index 666357c95..72ca19878 100644 --- a/lib/format_text/format-text.c +++ b/lib/format_text/format-text.c @@ -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; diff --git a/test/shell/pvchange-usage.sh b/test/shell/pvchange-usage.sh index b6fbebdb6..ce44d841a 100644 --- a/test/shell/pvchange-usage.sh +++ b/test/shell/pvchange-usage.sh @@ -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 |