master - lvchange: allow a transiently failed RaidLV to be refreshed
by Heinz Mauelshagen
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=87117c2b254623...
Commit: 87117c2b2546231c789f92c75590f053a8fb987c
Parent: 75ec7c8deeed95f005d78b4b962f70f783f7f0a0
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Mon Dec 12 22:06:17 2016 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Mon Dec 12 22:08:47 2016 +0100
lvchange: allow a transiently failed RaidLV to be refreshed
Enhance commit 0b8bf73a63d8 to refresh the top-level LV correctly
in case of a clustered, remotely activated RaidLV.
Related: rhbz1399844
---
lib/metadata/lv_manip.c | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 120217f..fdfee36 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -1417,17 +1417,23 @@ int lv_refresh_suspend_resume(const struct logical_volume *lv)
* with transient failures of SubLVs.
*/
if (lv_is_raid(lv)) {
- uint32_t s;
- struct lv_segment *seg = first_seg(lv);
-
- for (s = 0; s < seg->area_count; s++) {
- if (seg_type(seg, s) == AREA_LV &&
- !_lv_refresh_suspend_resume(seg_lv(seg, s)))
- return 0;
- if (seg->meta_areas &&
- seg_metatype(seg, s) == AREA_LV &&
- !_lv_refresh_suspend_resume(seg_metalv(seg, s)))
+ if (vg_is_clustered(lv->vg) &&
+ lv_is_active_remotely(lv)) {
+ if (!_lv_refresh_suspend_resume(lv))
return 0;
+ } else {
+ uint32_t s;
+ struct lv_segment *seg = first_seg(lv);
+
+ for (s = 0; s < seg->area_count; s++) {
+ if (seg_type(seg, s) == AREA_LV &&
+ !_lv_refresh_suspend_resume(seg_lv(seg, s)))
+ return 0;
+ if (seg->meta_areas &&
+ seg_metatype(seg, s) == AREA_LV &&
+ !_lv_refresh_suspend_resume(seg_metalv(seg, s)))
+ return 0;
+ }
}
}
6 years, 5 months
master - tests: update seg_size_pe
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=75ec7c8deeed95...
Commit: 75ec7c8deeed95f005d78b4b962f70f783f7f0a0
Parent: 3dd6e2c7e13a8b04829ab6a9a9df29a46b532bf0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Dec 12 11:49:26 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Dec 12 11:51:50 2016 +0100
tests: update seg_size_pe
Default prepare_vg uses 512K - so update test accordingly
---
test/shell/error-usage.sh | 2 +-
test/shell/zero-usage.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/shell/error-usage.sh b/test/shell/error-usage.sh
index c8765a6..062b71e 100644
--- a/test/shell/error-usage.sh
+++ b/test/shell/error-usage.sh
@@ -26,7 +26,7 @@ lvextend -L+1 $vg/$lv1
check lv_field $vg/$lv1 lv_modules "error"
check lv_field $vg/$lv1 segtype "error"
check lv_field $vg/$lv1 seg_count "1"
-check lv_field $vg/$lv1 seg_size_pe "8" # 8 * 256
+check lv_field $vg/$lv1 seg_size_pe "4" # 4 * 512 => 2M
# FIXME should we print info we are ignoring stripping?
lvextend -L+1 -I64 -i2 $vg/$lv1
diff --git a/test/shell/zero-usage.sh b/test/shell/zero-usage.sh
index 5d393f5..68afaaf 100644
--- a/test/shell/zero-usage.sh
+++ b/test/shell/zero-usage.sh
@@ -32,6 +32,6 @@ test "$sum1" = "$sum2"
check lv_field $vg/$lv1 lv_modules "zero"
check lv_field $vg/$lv1 segtype "zero"
check lv_field $vg/$lv1 seg_count "1"
-check lv_field $vg/$lv1 seg_size_pe "8" # 8 * 256
+check lv_field $vg/$lv1 seg_size_pe "4" # 4 * 512
vgremove -ff $vg
6 years, 5 months
master - tests: use prepare_vg more often
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3dd6e2c7e13a8b...
Commit: 3dd6e2c7e13a8b04829ab6a9a9df29a46b532bf0
Parent: 8c9c6ab66060cfc3383297a6baed229f9f341d4a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Dec 12 11:22:41 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Dec 12 11:22:41 2016 +0100
tests: use prepare_vg more often
---
test/shell/discards-thin.sh | 4 +---
test/shell/error-usage.sh | 4 +---
test/shell/lvconvert-mirror-basic.sh | 3 +--
test/shell/lvconvert-raid456.sh | 3 +--
test/shell/lvcreate-raid10.sh | 4 +---
test/shell/lvextend-thin-full.sh | 4 +---
test/shell/lvmetad-dump.sh | 4 +++-
test/shell/lvresize-thin-external-origin.sh | 4 +---
test/shell/lvresize-thin-metadata.sh | 4 +---
test/shell/pvmove-all-segtypes.sh | 3 +--
test/shell/thin-foreign-dmeventd.sh | 4 +---
test/shell/thin-resize-match.sh | 4 +---
test/shell/zero-usage.sh | 4 +---
13 files changed, 15 insertions(+), 34 deletions(-)
diff --git a/test/shell/discards-thin.sh b/test/shell/discards-thin.sh
index f85b22c..9a66dc8 100644
--- a/test/shell/discards-thin.sh
+++ b/test/shell/discards-thin.sh
@@ -25,12 +25,10 @@ export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
#
aux have_thin 1 1 0 || skip
-aux prepare_pvs 2 64
+aux prepare_vg 2 64
aux extend_filter_LVMTEST
-vgcreate $vg -s 64K $(cat DEVICES)
-
# Create named pool only
lvcreate -l1 --discards ignore -T $vg/pool
check lv_field $vg/pool discards "ignore"
diff --git a/test/shell/error-usage.sh b/test/shell/error-usage.sh
index 1f03071..c8765a6 100644
--- a/test/shell/error-usage.sh
+++ b/test/shell/error-usage.sh
@@ -16,9 +16,7 @@ SKIP_WITH_LVMPOLLD=1
. lib/inittest
-aux prepare_pvs 1
-
-vgcreate -s 256k $vg $(cat DEVICES)
+aux prepare_vg 1
lvcreate --type error -L1 -n $lv1 $vg
lvextend -L+1 $vg/$lv1
diff --git a/test/shell/lvconvert-mirror-basic.sh b/test/shell/lvconvert-mirror-basic.sh
index 81fb0c6..c32b5c1 100644
--- a/test/shell/lvconvert-mirror-basic.sh
+++ b/test/shell/lvconvert-mirror-basic.sh
@@ -123,8 +123,7 @@ test_lvconvert() {
fi
}
-aux prepare_pvs 5 5
-vgcreate -s 32k $vg $(cat DEVICES)
+aux prepare_vg 5 5
MIRRORED="mirrored"
# FIXME: Cluster is not supporting exlusive activation of mirrored log
diff --git a/test/shell/lvconvert-raid456.sh b/test/shell/lvconvert-raid456.sh
index 358ceec..8c87a03 100644
--- a/test/shell/lvconvert-raid456.sh
+++ b/test/shell/lvconvert-raid456.sh
@@ -28,8 +28,7 @@ get_image_pvs() {
aux raid456_replace_works || skip
aux have_raid 1 3 0 || skip
-aux prepare_pvs 7 # 7 devices for 2 dev replacement of 5-dev RAID6
-vgcreate -s 256k $vg $(cat DEVICES)
+aux prepare_vg 7 # 7 devices for 2 dev replacement of 5-dev RAID6
levels="5 6"
aux have_raid4 && levels="4 5 6"
diff --git a/test/shell/lvcreate-raid10.sh b/test/shell/lvcreate-raid10.sh
index bebe221..68b4f46 100644
--- a/test/shell/lvcreate-raid10.sh
+++ b/test/shell/lvcreate-raid10.sh
@@ -23,9 +23,7 @@ lv_devices() {
########################################################
aux have_raid 1 3 0 || skip
-aux prepare_pvs 6 20 # 6 devices for RAID10 (2-mirror,3-stripe) test
-vgcreate -s 512k $vg $(cat DEVICES)
-
+aux prepare_vg 6 20 # 6 devices for RAID10 (2-mirror,3-stripe) test
#
# Create RAID10:
#
diff --git a/test/shell/lvextend-thin-full.sh b/test/shell/lvextend-thin-full.sh
index 8fc89a8..3bafad4 100644
--- a/test/shell/lvextend-thin-full.sh
+++ b/test/shell/lvextend-thin-full.sh
@@ -27,9 +27,7 @@ test -n "$LVM_TEST_THIN_RESTORE_CMD" || LVM_TEST_THIN_RESTORE_CMD=$(which thin_r
aux have_thin 1 10 0 || skip
-aux prepare_pvs 3 256
-
-vgcreate -s 1M $vg $(cat DEVICES)
+aux prepare_vg 3 256
aux lvmconf 'activation/thin_pool_autoextend_percent = 30' \
'activation/thin_pool_autoextend_threshold = 70'
diff --git a/test/shell/lvmetad-dump.sh b/test/shell/lvmetad-dump.sh
index 67ea01b..49cf9b7 100644
--- a/test/shell/lvmetad-dump.sh
+++ b/test/shell/lvmetad-dump.sh
@@ -15,11 +15,13 @@ SKIP_WITH_LVMPOLLD=1
. lib/inittest
+# check we can talk to lvmetad
+(echo | aux lvmetad_talk) || skip
+
aux prepare_pvs 2
vgcreate $vg1 "$dev1" "$dev2"
lvcreate -n bar -l 1 $vg1
-(echo | aux lvmetad_talk) || skip
aux lvmetad_dump | tee lvmetad.txt
grep $vg1 lvmetad.txt
diff --git a/test/shell/lvresize-thin-external-origin.sh b/test/shell/lvresize-thin-external-origin.sh
index c1ebffe..686da39 100644
--- a/test/shell/lvresize-thin-external-origin.sh
+++ b/test/shell/lvresize-thin-external-origin.sh
@@ -23,9 +23,7 @@ aux have_thin 1 2 0 || skip
# Pretend we miss the external_origin_extend feature
aux lvmconf 'global/thin_disabled_features = [ "external_origin_extend" ]'
-aux prepare_pvs 2
-
-vgcreate -s 1M $vg $(cat DEVICES)
+aux prepare_vg 2
lvcreate -L10 -n $lv1 $vg
diff --git a/test/shell/lvresize-thin-metadata.sh b/test/shell/lvresize-thin-metadata.sh
index 2ef4fce..a08fb40 100644
--- a/test/shell/lvresize-thin-metadata.sh
+++ b/test/shell/lvresize-thin-metadata.sh
@@ -18,9 +18,7 @@ export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
aux have_thin 1 10 0 || skip
-aux prepare_pvs 3 1256
-
-vgcreate -s 1M $vg $(cat DEVICES)
+aux prepare_vg 3 1256
for deactivate in true false; do
# Create some thin volumes
diff --git a/test/shell/pvmove-all-segtypes.sh b/test/shell/pvmove-all-segtypes.sh
index e5f3b74..6a34ecf 100644
--- a/test/shell/pvmove-all-segtypes.sh
+++ b/test/shell/pvmove-all-segtypes.sh
@@ -17,8 +17,7 @@ SKIP_WITH_LVMLOCKD=1
which md5sum || skip
-aux prepare_pvs 5 20
-vgcreate -s 256k $vg $(cat DEVICES)
+aux prepare_vg 5 20
# Each of the following tests does:
# 1) Create two LVs - one linear and one other segment type
diff --git a/test/shell/thin-foreign-dmeventd.sh b/test/shell/thin-foreign-dmeventd.sh
index 50ff44e..4ba3205 100644
--- a/test/shell/thin-foreign-dmeventd.sh
+++ b/test/shell/thin-foreign-dmeventd.sh
@@ -42,9 +42,7 @@ which mkfs.ext4 || skip
export MKE2FS_CONFIG="$TESTOLDPWD/lib/mke2fs.conf"
aux prepare_dmeventd
-aux prepare_pvs 2 64
-
-vgcreate $vg -s 64K $(cat DEVICES)
+aux prepare_vg 2 64
# Create named pool only
lvcreate --errorwhenfull y -L2 -T $vg/pool
diff --git a/test/shell/thin-resize-match.sh b/test/shell/thin-resize-match.sh
index 047225b..c78842f 100644
--- a/test/shell/thin-resize-match.sh
+++ b/test/shell/thin-resize-match.sh
@@ -23,9 +23,7 @@ which md5sum || skip
aux have_thin 1 0 0 || skip
-aux prepare_pvs 2 20
-
-vgcreate -s 512K $vg $(< DEVICES)
+aux prepare_vg 2 20
lvcreate -L1M -V2M -n $lv1 -T $vg/pool
diff --git a/test/shell/zero-usage.sh b/test/shell/zero-usage.sh
index 768df28..5d393f5 100644
--- a/test/shell/zero-usage.sh
+++ b/test/shell/zero-usage.sh
@@ -18,9 +18,7 @@ SKIP_WITH_LVMPOLLD=1
which md5sum || skip
-aux prepare_pvs 1
-
-vgcreate -s 256k $vg $(cat DEVICES)
+aux prepare_vg 1
lvcreate --type zero -L1 -n $lv1 $vg
lvextend -L+1 $vg/$lv1
6 years, 5 months
master - tests: no left devices check for skipped test
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8c9c6ab66060cf...
Commit: 8c9c6ab66060cfc3383297a6baed229f9f341d4a
Parent: 48d33e5fb671af16f84d74afab9f86d47ca112fc
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Dec 12 11:22:10 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Dec 12 11:22:10 2016 +0100
tests: no left devices check for skipped test
---
test/lib/aux.sh | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 4749f81..a195883 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -520,7 +520,10 @@ teardown() {
if test -f TESTNAME ; then
- TEST_LEAKED_DEVICES=$(dmsetup table | grep "$PREFIX" | grep -v "${PREFIX}pv") || true
+ if test ! -f SKIP_THIS_TEST ; then
+ # Evaluate left devices only for non-skipped tests
+ TEST_LEAKED_DEVICES=$(dmsetup table | grep "$PREFIX" | grep -v "${PREFIX}pv") || true
+ fi
kill_tagged_processes
6 years, 5 months
master - cov: use unsigned for single bit values
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=48d33e5fb671af...
Commit: 48d33e5fb671af16f84d74afab9f86d47ca112fc
Parent: 56e4e2ce2ba05990eb4e8ced8a9a966b986f14ab
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Dec 12 11:21:42 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Dec 12 11:21:42 2016 +0100
cov: use unsigned for single bit values
Avoid using signed int.
---
libdm/libdm-report.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c
index ebd2439..93b8774 100644
--- a/libdm/libdm-report.c
+++ b/libdm/libdm-report.c
@@ -95,8 +95,8 @@ struct report_group_item {
uint32_t finished_count;
} store;
struct report_group_item *parent;
- int output_done:1;
- int needs_closing:1;
+ unsigned output_done:1;
+ unsigned needs_closing:1;
void *data;
};
6 years, 5 months
master - tests: track leaked devices in tests
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=56e4e2ce2ba059...
Commit: 56e4e2ce2ba05990eb4e8ced8a9a966b986f14ab
Parent: 273ccb11704075b1876f6931e9e8de19ff2b31a3
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Dec 11 10:25:15 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Dec 11 23:24:19 2016 +0100
tests: track leaked devices in tests
When test calls teardown, no devices created by test are expected
to be left in table. Trap such orphans and make the test fail.
---
test/lib/aux.sh | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 7f3c84a..4749f81 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -520,6 +520,8 @@ teardown() {
if test -f TESTNAME ; then
+ TEST_LEAKED_DEVICES=$(dmsetup table | grep "$PREFIX" | grep -v "${PREFIX}pv") || true
+
kill_tagged_processes
if test -n "$LVM_TEST_LVMLOCKD_TEST" ; then
@@ -567,6 +569,12 @@ teardown() {
fi
+ test -z "$TEST_LEAKED_DEVICES" || {
+ echo "Unexpected devices left dm table:"
+ echo "$TEST_LEAKED_DEVICES"
+ return 1
+ }
+
test -n "$TESTDIR" && {
cd "$TESTOLDPWD"
rm -rf "$TESTDIR" || echo BLA
6 years, 5 months
master - tests: remove unwanted exit
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=273ccb11704075...
Commit: 273ccb11704075b1876f6931e9e8de19ff2b31a3
Parent: b902fd08f688c823937fec612a0ea72848289e56
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Dec 11 10:21:26 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Dec 11 23:24:19 2016 +0100
tests: remove unwanted exit
Exit seemes slipped in from local testing in:
eb6b2a11e3548f7598c726787494be2c3ea4dca1
---
test/shell/lvchange-thin.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/lvchange-thin.sh b/test/shell/lvchange-thin.sh
index b5a6a86..3a8cc52 100644
--- a/test/shell/lvchange-thin.sh
+++ b/test/shell/lvchange-thin.sh
@@ -49,7 +49,7 @@ test -n "$no_discard" || check grep_dmsetup status $vg-pool " no_discard_passdow
lvchange --discards passdown $vg/pool
check grep_dmsetup table $vg-pool -v "passdown"
test -n "$no_discard" || check grep_dmsetup status $vg-pool " discard_passdown"
-exit
+
# zero_ARG (default is 'yes')
check grep_dmsetup table $vg-pool -v "zeroing"
lvchange --zero n $vg/pool
6 years, 5 months
master - tests: remove some leaking device
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b902fd08f688c8...
Commit: b902fd08f688c823937fec612a0ea72848289e56
Parent: bcf59a1b185c07a3f7e10f9de13e83501f9a852b
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Dec 11 10:24:06 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Dec 11 23:24:19 2016 +0100
tests: remove some leaking device
These tests leaks devices (known bugs).
Remove them via dmsetup.
TODO: fix actual commands
---
test/shell/lvconvert-repair-cache.sh | 4 ++++
test/shell/lvcreate-repair.sh | 3 +++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvconvert-repair-cache.sh b/test/shell/lvconvert-repair-cache.sh
index 565ebf4..f709813 100644
--- a/test/shell/lvconvert-repair-cache.sh
+++ b/test/shell/lvconvert-repair-cache.sh
@@ -132,3 +132,7 @@ not "$FSCK" -n "$DM_DEV_DIR/$vg/$lv1"
aux enable_dev "$dev1"
vgremove -ff $vg
+
+# FIXME - device should not be here
+should not dmsetup remove ${vg}-cpool_cmeta-missing_0_0
+should not dmsetup remove ${vg}-cpool_cdata-missing_0_0
diff --git a/test/shell/lvcreate-repair.sh b/test/shell/lvcreate-repair.sh
index 53a6fc1..f3be28a 100644
--- a/test/shell/lvcreate-repair.sh
+++ b/test/shell/lvcreate-repair.sh
@@ -100,3 +100,6 @@ vgreduce --removemissing --force $vg
# Failed to activate new LV.
should lvcreate -l1 $vg "$dev1"
+should not dmsetup remove ${vg}-lvol0
+
+vgremove -ff $vg
6 years, 5 months
master - tests: test should clean devices it has created
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=bcf59a1b185c07...
Commit: bcf59a1b185c07a3f7e10f9de13e83501f9a852b
Parent: 198f335139f7a538272c8cb6657ad4f5d58b01db
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Dec 11 10:18:44 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Dec 11 23:24:19 2016 +0100
tests: test should clean devices it has created
To be able to detect lvm2 command is not leaking some
'unexpected' device - remove all devices before
test exits by its own command so test teardown
now can check what was 'left' unexpectedly.
---
test/api/lvtest.sh | 2 ++
test/shell/error-usage.sh | 2 ++
test/shell/lvconvert-thin.sh | 3 +--
test/shell/lvconvert-twostep.sh | 3 ++-
test/shell/lvcreate-small-snap.sh | 2 ++
test/shell/lvextend-percent-extents.sh | 2 ++
test/shell/lvresize-thin-external-origin.sh | 2 ++
test/shell/lvs-cache.sh | 2 ++
test/shell/mdata-strings.sh | 2 ++
test/shell/nomda-missing.sh | 2 ++
test/shell/nomda-restoremissing.sh | 2 ++
test/shell/profiles-thin.sh | 2 ++
test/shell/profiles.sh | 2 ++
test/shell/pv-range-overflow.sh | 1 +
test/shell/select-report.sh | 2 ++
test/shell/vgcfgbackup-lvm1.sh | 2 +-
test/shell/zero-usage.sh | 2 ++
17 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/test/api/lvtest.sh b/test/api/lvtest.sh
index f34f0f8..8cba14c 100644
--- a/test/api/lvtest.sh
+++ b/test/api/lvtest.sh
@@ -21,3 +21,5 @@ lvcreate -n test -l 5 $vg
aux apitest lvtest $vg
check lv_field $vg/test lv_name test
+
+vgremove -ff $vg
diff --git a/test/shell/error-usage.sh b/test/shell/error-usage.sh
index 531dad3..1f03071 100644
--- a/test/shell/error-usage.sh
+++ b/test/shell/error-usage.sh
@@ -32,3 +32,5 @@ check lv_field $vg/$lv1 seg_size_pe "8" # 8 * 256
# FIXME should we print info we are ignoring stripping?
lvextend -L+1 -I64 -i2 $vg/$lv1
+
+vgremove -ff $vg
diff --git a/test/shell/lvconvert-thin.sh b/test/shell/lvconvert-thin.sh
index 1999d86..4bd1acd 100644
--- a/test/shell/lvconvert-thin.sh
+++ b/test/shell/lvconvert-thin.sh
@@ -149,6 +149,5 @@ fail lvconvert --yes --type snapshot $vg/$lv1 $vg/$lv2
fail lvconvert --yes --type snapshot $vg/$lv2 $vg/$lv1
fail lvconvert --yes --type thin-pool $vg/$lv1
-lvremove -f $vg
-
vgremove -ff $vg
+vgremove -ff $vg1
diff --git a/test/shell/lvconvert-twostep.sh b/test/shell/lvconvert-twostep.sh
index f202ae2..9c54756 100644
--- a/test/shell/lvconvert-twostep.sh
+++ b/test/shell/lvconvert-twostep.sh
@@ -24,9 +24,10 @@ lvconvert --mirrorlog core $vg/mirror
not lvconvert -m 1 --mirrorlog disk $vg/mirror "$dev3" 2>&1 | tee errs
grep "two steps" errs
-test -e LOCAL_CLVMD && exit 0
+if test ! -e LOCAL_CLVMD ; then
# FIXME mirrored unsupported in cluster
not lvconvert -m 1 --mirrorlog mirrored $vg/mirror "$dev3" "$dev4" 2>&1 | tee errs
grep "two steps" errs
+fi
vgremove -ff $vg
diff --git a/test/shell/lvcreate-small-snap.sh b/test/shell/lvcreate-small-snap.sh
index 43424de..d7b5104 100644
--- a/test/shell/lvcreate-small-snap.sh
+++ b/test/shell/lvcreate-small-snap.sh
@@ -32,3 +32,5 @@ grep "smaller" lvcreate.out
not lvcreate -s -l 4 -n snapB $vg/one 2>&1 | tee lvcreate.out
not grep "suspend origin one" lvcreate.out
grep "smaller" lvcreate.out
+
+vgremove -ff $vg
diff --git a/test/shell/lvextend-percent-extents.sh b/test/shell/lvextend-percent-extents.sh
index 67c36b2..56932a7 100644
--- a/test/shell/lvextend-percent-extents.sh
+++ b/test/shell/lvextend-percent-extents.sh
@@ -108,3 +108,5 @@ lvremove -f $vg/$lv
lvcreate -i2 -I 64k -l10 -n $lv $vg
lvreduce -f -l1 $vg/$lv
check lv_field $vg/$lv lv_size "8.00m"
+
+vgremove -ff $vg
diff --git a/test/shell/lvresize-thin-external-origin.sh b/test/shell/lvresize-thin-external-origin.sh
index b864b81..c1ebffe 100644
--- a/test/shell/lvresize-thin-external-origin.sh
+++ b/test/shell/lvresize-thin-external-origin.sh
@@ -50,3 +50,5 @@ check lv_field $vg/$lv1 lv_size "5.00" --units m --nosuffix
# Try to resize again back up to the size of external origin
lvresize -L+5 -f $vg/$lv1
check lv_field $vg/$lv1 lv_size "10.00" --units m --nosuffix
+
+vgremove -ff $vg
diff --git a/test/shell/lvs-cache.sh b/test/shell/lvs-cache.sh
index 74077ae..f2463b8 100644
--- a/test/shell/lvs-cache.sh
+++ b/test/shell/lvs-cache.sh
@@ -88,3 +88,5 @@ lvremove -f $vg
lvcreate -n foo -l 1 $vg
lvs -a -S 'cache_policy=undefined' | grep foo
+
+vgremove -ff $vg
diff --git a/test/shell/mdata-strings.sh b/test/shell/mdata-strings.sh
index d3e831f..5d22953 100644
--- a/test/shell/mdata-strings.sh
+++ b/test/shell/mdata-strings.sh
@@ -45,3 +45,5 @@ vgcreate $vg "$created"
# 'no parse errors and VG really exists'
vgs $vg 2>err
not grep "Parse error" err
+
+dmsetup remove "${PREFIX}${pv_ugly}"
diff --git a/test/shell/nomda-missing.sh b/test/shell/nomda-missing.sh
index f9c394e..9fe4bec 100644
--- a/test/shell/nomda-missing.sh
+++ b/test/shell/nomda-missing.sh
@@ -84,3 +84,5 @@ check active $vg linear2
check active $vg linear12
check active $vg mirror12
check active $vg mirror123
+
+vgremove -ff $vg
diff --git a/test/shell/nomda-restoremissing.sh b/test/shell/nomda-restoremissing.sh
index e0d1da0..811637b 100644
--- a/test/shell/nomda-restoremissing.sh
+++ b/test/shell/nomda-restoremissing.sh
@@ -32,3 +32,5 @@ not lvcreate -aey --type mirror -m 1 -l 1 -n mirror $vg # write operations fail
aux enable_dev "$dev1"
lvcreate -aey --type mirror -m 1 -l 1 -n mirror $vg # no MDA => automatically restored
vgck $vg
+
+vgremove -ff $vg
diff --git a/test/shell/profiles-thin.sh b/test/shell/profiles-thin.sh
index 6b8bc6a..d97bf59 100644
--- a/test/shell/profiles-thin.sh
+++ b/test/shell/profiles-thin.sh
@@ -74,3 +74,5 @@ check vg_field $vg profile "thin-performance"
check lv_field $vg/pool_performance_inherited profile ""
$SHOULD check lv_field $vg/pool_performance_inherited chunk_size 1.00m
check lv_field $vg/pool_performance_inherited zero ""
+
+vgremove -ff $vg
diff --git a/test/shell/profiles.sh b/test/shell/profiles.sh
index 562b7b1..508f6db 100644
--- a/test/shell/profiles.sh
+++ b/test/shell/profiles.sh
@@ -131,3 +131,5 @@ lvm dumpconfig --type profilable-command --file etc/profile/generated.profile
pvs --profile generated &> msg
not grep "$MSG_NOT_PROFILABLE" msg
not grep "$MSG_IGNORING_INVALID_CMD_PROFILE" msg
+
+vgremove -ff $vg1
diff --git a/test/shell/pv-range-overflow.sh b/test/shell/pv-range-overflow.sh
index 37fd659..2d80f4e 100644
--- a/test/shell/pv-range-overflow.sh
+++ b/test/shell/pv-range-overflow.sh
@@ -32,3 +32,4 @@ grep "Logical volume bogus not found." err
# 'run the offending pvmove command'
not pvmove -v -n$lv "$dev1":4294967296 "$dev2"
+vgremove -ff $vg
diff --git a/test/shell/select-report.sh b/test/shell/select-report.sh
index b39ce54..aad3857 100644
--- a/test/shell/select-report.sh
+++ b/test/shell/select-report.sh
@@ -218,3 +218,5 @@ sel lv '(lv_name=vol1 || lv_name=vol2) && lv_size < 8m' vol2
sel lv '(lv_name=vol1 && lv_size=8m) && vg_tags=vg_tag2' vol1
# negation of clause grouped by ( )
sel lv '!(lv_name=vol1 || lv_name=vol2)' abc xyz orig snap
+
+vgremove -ff $vg1 $vg2 $vg3
diff --git a/test/shell/vgcfgbackup-lvm1.sh b/test/shell/vgcfgbackup-lvm1.sh
index 4a7f32a..f3c7ab4 100644
--- a/test/shell/vgcfgbackup-lvm1.sh
+++ b/test/shell/vgcfgbackup-lvm1.sh
@@ -30,7 +30,7 @@ vgcreate -M1 -c n $vg $(cat DEVICES)
lvcreate -l1 -n $lv1 $vg "$dev1"
pvremove -ff -y "$dev2"
not lvcreate -l1 -n $lv1 $vg "$dev3"
+lvchange -an $vg
vgcfgbackup -f "backup.$$" $vg
fi
-
diff --git a/test/shell/zero-usage.sh b/test/shell/zero-usage.sh
index ee91bda..768df28 100644
--- a/test/shell/zero-usage.sh
+++ b/test/shell/zero-usage.sh
@@ -35,3 +35,5 @@ check lv_field $vg/$lv1 lv_modules "zero"
check lv_field $vg/$lv1 segtype "zero"
check lv_field $vg/$lv1 seg_count "1"
check lv_field $vg/$lv1 seg_size_pe "8" # 8 * 256
+
+vgremove -ff $vg
6 years, 5 months
master - tests: slower device
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=198f335139f7a5...
Commit: 198f335139f7a538272c8cb6657ad4f5d58b01db
Parent: 4a33e4c509fb72bf3540d20bd35e1f0944e1d37a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Dec 10 15:07:14 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Dec 11 23:24:19 2016 +0100
tests: slower device
Some of test machines are too fast, slow raid syncing even more.
---
test/shell/lvchange-rebuild-raid.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/lvchange-rebuild-raid.sh b/test/shell/lvchange-rebuild-raid.sh
index 6b91941..df6a8cb 100644
--- a/test/shell/lvchange-rebuild-raid.sh
+++ b/test/shell/lvchange-rebuild-raid.sh
@@ -21,7 +21,7 @@ aux prepare_vg 8
# Delay legs so that rebuilding status characters can be read
for d in $(< DEVICES)
do
- aux delay_dev "$d" 0 15 $(get first_extent_sector "$d")
+ aux delay_dev "$d" 0 20 $(get first_extent_sector "$d")
done
# rhbz 1064592
6 years, 5 months