Blame SOURCES/lvm2-2_02_178-tests-check-preserved-exclusivness-of-snapshot-merge.patch

d6c8c5
From 509497ae21a4c84f4714835c6f8017a66b666308 Mon Sep 17 00:00:00 2001
d6c8c5
From: Zdenek Kabelac <zkabelac@redhat.com>
d6c8c5
Date: Mon, 15 Jan 2018 13:29:14 +0100
d6c8c5
Subject: [PATCH 22/25] tests: check preserved exclusivness of snapshot merge
d6c8c5
d6c8c5
Detect if origin remains exclusively activated after merging.
d6c8c5
d6c8c5
(cherry picked from commit 8ebd45fde759c438e854d6b4f02f0e9803094fea)
d6c8c5
---
d6c8c5
 test/shell/snapshot-merge.sh | 4 ++++
d6c8c5
 test/shell/thin-merge.sh     | 9 +++++++++
d6c8c5
 2 files changed, 13 insertions(+)
d6c8c5
d6c8c5
diff --git a/test/shell/snapshot-merge.sh b/test/shell/snapshot-merge.sh
d6c8c5
index 9d0a264..41e7b00 100644
d6c8c5
--- a/test/shell/snapshot-merge.sh
d6c8c5
+++ b/test/shell/snapshot-merge.sh
d6c8c5
@@ -54,7 +54,11 @@ setup_merge_ $vg $lv1
d6c8c5
 
d6c8c5
 # make sure lvconvert --merge requires explicit LV listing
d6c8c5
 not lvconvert --merge
d6c8c5
+
d6c8c5
+# check exclusive lock is preserved after merge
d6c8c5
+check lv_field "$vg/$lv1" lv_active_exclusively "active exclusively"
d6c8c5
 lvconvert --merge "$vg/$(snap_lv_name_ "$lv1")"
d6c8c5
+check lv_field "$vg/$lv1" lv_active_exclusively "active exclusively"
d6c8c5
 lvremove -f $vg/$lv1
d6c8c5
 
d6c8c5
 setup_merge_ $vg $lv1
d6c8c5
diff --git a/test/shell/thin-merge.sh b/test/shell/thin-merge.sh
d6c8c5
index 3abda40..24dec96 100644
d6c8c5
--- a/test/shell/thin-merge.sh
d6c8c5
+++ b/test/shell/thin-merge.sh
d6c8c5
@@ -30,6 +30,15 @@ aux have_thin 1 0 0 || skip
d6c8c5
 aux prepare_vg 2
d6c8c5
 
d6c8c5
 lvcreate -T -L8M $vg/pool -V10M -n $lv1
d6c8c5
+lvcreate -s -K -n snap $vg/$lv1
d6c8c5
+# check exclusive lock is preserved after merge
d6c8c5
+check lv_field "$vg/$lv1" lv_active_exclusively "active exclusively"
d6c8c5
+lvconvert --merge $vg/snap
d6c8c5
+check lv_field "$vg/$lv1" lv_active_exclusively "active exclusively"
d6c8c5
+lvremove -ff $vg
d6c8c5
+
d6c8c5
+
d6c8c5
+lvcreate -T -L8M $vg/pool -V10M -n $lv1
d6c8c5
 lvchange --addtag tagL $vg/$lv1
d6c8c5
 
d6c8c5
 mkdir mnt
d6c8c5
-- 
d6c8c5
1.8.3.1
d6c8c5