From: Zdenek Kabelac Date: Wed, 17 Feb 2021 10:38:28 +0000 (+0100) Subject: tests: readonly snapshot thick origin can't be merged X-Git-Tag: v2_03_12~380 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=b9846bdc3e420348646d26259ad57c60b6f2ebf9;p=lvm2.git tests: readonly snapshot thick origin can't be merged When user sets snapshot thick origin as read-only - lvconvert --merge refuses to merge until user swiches origin to 'read-write'. --- diff --git a/test/shell/snapshot-merge.sh b/test/shell/snapshot-merge.sh index a50ffdcd8..ff9de96f8 100644 --- a/test/shell/snapshot-merge.sh +++ b/test/shell/snapshot-merge.sh @@ -55,6 +55,12 @@ setup_merge_ $vg $lv1 # make sure lvconvert --merge requires explicit LV listing not lvconvert --merge +# check read-only origin is protected from being merge +lvchange -pr $vg/$lv1 +not lvconvert --merge "$vg/$(snap_lv_name_ "$lv1")" |& tee out +grep "read-only origin" out +lvchange -prw $vg/$lv1 + # check exclusive lock is preserved after merge check lv_field "$vg/$lv1" lv_active_exclusively "active exclusively" lvconvert --merge "$vg/$(snap_lv_name_ "$lv1")"