main - tests: test_pv_symlinks works only with /dev dir
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8a550fa3e8747fe0151...
Commit: 8a550fa3e8747fe01517c1c4c1d81e9406d000ea
Parent: afbaab20c72515231740a1a6827d0110c6ff59cf
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Mar 28 00:18:38 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Mar 28 00:21:38 2021 +0100
tests: test_pv_symlinks works only with /dev dir
Skip test with LVM_TEST_DEVDIR != /dev
---
test/dbus/lvmdbustest.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index 03d5ba5aa..6d692223f 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -1861,6 +1861,9 @@ class TestDbusService(unittest.TestCase):
pv = self.objs[PV_INT][0]
pv_device_path = pv.Pv.Name
+ if dm_dev_dir != '/dev':
+ raise unittest.SkipTest('test not running in real /dev')
+
if not pv_device_path.startswith("/dev"):
raise unittest.SkipTest('test not running in /dev')
3 years
main - tests: fix unfinished check for 4.18 kernel
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=afbaab20c7251523174...
Commit: afbaab20c72515231740a1a6827d0110c6ff59cf
Parent: f584f0cd9e84c33128200897eebd6edb22557167
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Mar 28 00:16:54 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Mar 28 00:21:38 2021 +0100
tests: fix unfinished check for 4.18 kernel
---
test/shell/thin-flags.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/shell/thin-flags.sh b/test/shell/thin-flags.sh
index 0b3148a9c..795d47ae5 100644
--- a/test/shell/thin-flags.sh
+++ b/test/shell/thin-flags.sh
@@ -99,9 +99,9 @@ lvs -ao+seg_pe_ranges $vg
# needs_check needs newer version
THINMINVER="1 20 0"
-aux kernel_at_least 4.18 && THINMINVER="1 19 0" # kernel >=4.18 already had changes from 1.20
+aux kernel_at_least 4 18 && THINMINVER="1 19 0" # kernel >=4.18 already had changes from 1.20
-if aux have_thin $THINVER ; then
+if aux have_thin $THINMINVER ; then
check lv_attr_bit state $vg/pool "a"
dmsetup suspend $vg-pool-tpool
3 years
main - tests: ensure raid is synchronized
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f584f0cd9e84c331282...
Commit: f584f0cd9e84c33128200897eebd6edb22557167
Parent: 5ec7992e29fdf3273673f712d6a9f231903b6bf2
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Mar 27 23:15:54 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Mar 27 23:19:08 2021 +0100
tests: ensure raid is synchronized
---
test/shell/lvconvert-raid-allocation.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/shell/lvconvert-raid-allocation.sh b/test/shell/lvconvert-raid-allocation.sh
index acdae0caa..5420d584d 100644
--- a/test/shell/lvconvert-raid-allocation.sh
+++ b/test/shell/lvconvert-raid-allocation.sh
@@ -52,6 +52,8 @@ aux wait_for_sync $vg $lv1
not lvconvert -m +1 $vg/$lv1 \
"$dev5:0-1" "$dev1" "$dev2" "$dev3" "$dev4"
lvconvert -y -m +1 $vg/$lv1 "$dev5"
+aux wait_for_sync $vg $lv1
+# Cannot pass without --yes
not lvconvert -m 0 $vg/$lv1
lvconvert -y -m 0 $vg/$lv1
# Should work due to '--alloc anywhere'
3 years
main - tests: reoder killing order
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5ec7992e29fdf327367...
Commit: 5ec7992e29fdf3273673f712d6a9f231903b6bf2
Parent: feb7fef6c8d22d5773b6a5d1d9f2a5a3f52b5b3b
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Mar 27 22:33:37 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Mar 27 23:19:08 2021 +0100
tests: reoder killing order
We need to stop pvmove while still in progress,
so restart lvmpolld after pvmoving devices are gone
---
test/shell/pvmove-resume-multiseg.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/test/shell/pvmove-resume-multiseg.sh b/test/shell/pvmove-resume-multiseg.sh
index 1263d81ed..cdb426b66 100644
--- a/test/shell/pvmove-resume-multiseg.sh
+++ b/test/shell/pvmove-resume-multiseg.sh
@@ -20,7 +20,7 @@ SKIP_WITH_LVMLOCKD=1
. lib/inittest
aux prepare_pvs 5 40
-aux throttle_dm_mirror 40 || :
+aux throttle_dm_mirror 60 || :
vgcreate -s 128k $vg "$dev1" "$dev2" "$dev3"
pvcreate --metadatacopies 0 "$dev4" "$dev5"
@@ -48,17 +48,17 @@ test_pvmove_resume() {
aux wait_pvmove_lv_ready "$vg-pvmove1" 300
kill -9 $PVMOVE
+ while dmsetup status "$vg-$lv1"; do dmsetup remove "$vg-$lv1" || true; done
+ while dmsetup status "$vg-$lv2"; do dmsetup remove "$vg-$lv2" || true; done
+ while dmsetup status "$vg-pvmove0"; do dmsetup remove "$vg-pvmove0" || true; done
+ while dmsetup status "$vg-pvmove1"; do dmsetup remove "$vg-pvmove1" || true; done
+
if test -e LOCAL_LVMPOLLD ; then
aux prepare_lvmpolld
fi
wait
- while dmsetup status "$vg-$lv1"; do dmsetup remove "$vg-$lv1" || true; done
- while dmsetup status "$vg-$lv2"; do dmsetup remove "$vg-$lv2" || true; done
- while dmsetup status "$vg-pvmove0"; do dmsetup remove "$vg-pvmove0" || true; done
- while dmsetup status "$vg-pvmove1"; do dmsetup remove "$vg-pvmove1" || true; done
-
check lv_attr_bit type $vg/pvmove0 "p"
check lv_attr_bit type $vg/pvmove1 "p"
3 years
main - tests: fight with losetup creation error
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=feb7fef6c8d22d5773b...
Commit: feb7fef6c8d22d5773b6a5d1d9f2a5a3f52b5b3b
Parent: 1f7bd719d0d31a5dd5886dfcf783f6c2e80cb2e8
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Mar 27 21:59:23 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Mar 27 23:19:08 2021 +0100
tests: fight with losetup creation error
Try losetup few times in loop if we can succeed.
---
test/shell/allow-mixed-block-sizes.sh | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/test/shell/allow-mixed-block-sizes.sh b/test/shell/allow-mixed-block-sizes.sh
index a094338cb..171942e4b 100644
--- a/test/shell/allow-mixed-block-sizes.sh
+++ b/test/shell/allow-mixed-block-sizes.sh
@@ -19,9 +19,20 @@ which fallocate || skip
fallocate -l 2M loopa
fallocate -l 2M loopb
-sync
-LOOP1=$(losetup -f loopa --sector-size 4096 --show)
-LOOP2=$(losetup -f loopb --show)
+
+# Fight a weird occasional race in losetup usage:
+#
+# losetup: loopa: failed to set up loop device: Resource temporarily unavailable
+# loop0: detected capacity change from 0 to 4096
+# loop_set_block_size: loop0 () has still dirty pages (nrpages=2)
+for i in {1..5} ; do
+ LOOP1=$(losetup -f loopa --sector-size 4096 --show || true)
+ test -n "$LOOP1" && break
+done
+for i in {1..5} ; do
+ LOOP2=$(losetup -f loopb --show || true)
+ test -n "$LOOP2" && break
+done
# prepare devX mapping so it works for real & fake dev dir
d=1
3 years
main - tests: restore removed prefix
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1f7bd719d0d31a5dd58...
Commit: 1f7bd719d0d31a5dd5886dfcf783f6c2e80cb2e8
Parent: 12222add1abb45ebbc0c6dfccb514bb75d4ae4ea
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Mar 27 21:58:33 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Mar 27 23:19:08 2021 +0100
tests: restore removed prefix
During debugging this prefix was unintentionally lost, restore.
---
test/dbus/lvmdbustest.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index 746025903..03d5ba5aa 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -341,7 +341,7 @@ class TestDbusService(unittest.TestCase):
if not pv_paths:
pv_paths = self._all_pv_object_paths()
- vg_name = vg_n()
+ vg_name = vg_n(prefix=vg_prefix)
vg_path = self.handle_return(
self.objs[MANAGER_INT][0].Manager.VgCreate(
3 years
main - tests: use known path for test in find
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=12222add1abb45ebbc0...
Commit: 12222add1abb45ebbc0c6dfccb514bb75d4ae4ea
Parent: 37d603268f98ba51d9fd9c734004274de8fcca1b
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Mar 27 21:33:28 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Mar 27 23:18:38 2021 +0100
tests: use known path for test in find
Actually make sure which 'test' binary is executed.
Since we used to have 'test' binary in tests.
---
test/lib/aux.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 0ce2b8b07..38191842d 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -582,7 +582,7 @@ teardown() {
# Remove any dangling symlink in /dev/disk (our tests can confuse udev)
test -d /dev/disk && {
- find /dev/disk -type l ! -exec test -e {} \; -print | xargs rm -f || true
+ find /dev/disk -type l ! -exec /usr/bin/test -e {} \; -print | xargs rm -f || true
}
# Remove any metadata archives and backups from this test on system
3 years
main - tests: for 4.18 use already 1.20 logic
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=37d603268f98ba51d9f...
Commit: 37d603268f98ba51d9fd9c734004274de8fcca1b
Parent: f07a793813a51bd792f7a5a5e290a6727100aaca
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Mar 27 19:28:43 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Mar 27 23:16:52 2021 +0100
tests: for 4.18 use already 1.20 logic
Looks like there was some missed versioning increase during devel.
So with kernel >= 4.18 version 1.19 is enough to look like 1.20
However backported 1.19 targets seems to not provide all
the capabilities.
---
test/shell/thin-flags.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test/shell/thin-flags.sh b/test/shell/thin-flags.sh
index 6e5749a74..0b3148a9c 100644
--- a/test/shell/thin-flags.sh
+++ b/test/shell/thin-flags.sh
@@ -98,7 +98,10 @@ not lvcreate -V10 -n $lv3 $vg/pool
lvs -ao+seg_pe_ranges $vg
# needs_check needs newer version
-if aux have_thin 1 20 0 ; then
+THINMINVER="1 20 0"
+aux kernel_at_least 4.18 && THINMINVER="1 19 0" # kernel >=4.18 already had changes from 1.20
+
+if aux have_thin $THINVER ; then
check lv_attr_bit state $vg/pool "a"
dmsetup suspend $vg-pool-tpool
3 years
main - tests: correct thin-pool version
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f07a793813a51bd792f...
Commit: f07a793813a51bd792f7a5a5e290a6727100aaca
Parent: 53338cf566838381febe37d8254275e5f2a408ce
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Mar 27 00:33:18 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Mar 27 00:34:00 2021 +0100
tests: correct thin-pool version
Use thin-pool target version 1.20 for changed behavior.
---
test/shell/thin-flags.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/shell/thin-flags.sh b/test/shell/thin-flags.sh
index 89ed69ac9..6e5749a74 100644
--- a/test/shell/thin-flags.sh
+++ b/test/shell/thin-flags.sh
@@ -98,7 +98,7 @@ not lvcreate -V10 -n $lv3 $vg/pool
lvs -ao+seg_pe_ranges $vg
# needs_check needs newer version
-if aux have_thin 1 19 0 ; then
+if aux have_thin 1 20 0 ; then
check lv_attr_bit state $vg/pool "a"
dmsetup suspend $vg-pool-tpool
3 years
main - tests: increase mirror throttling
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=53338cf566838381feb...
Commit: 53338cf566838381febe37d8254275e5f2a408ce
Parent: 8e9bc52b15106d0edaf47f56e4f467f8365597f0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Mar 27 00:29:28 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Mar 27 00:29:28 2021 +0100
tests: increase mirror throttling
---
test/shell/pvmove-resume-multiseg.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/shell/pvmove-resume-multiseg.sh b/test/shell/pvmove-resume-multiseg.sh
index b38195a84..1263d81ed 100644
--- a/test/shell/pvmove-resume-multiseg.sh
+++ b/test/shell/pvmove-resume-multiseg.sh
@@ -20,7 +20,7 @@ SKIP_WITH_LVMLOCKD=1
. lib/inittest
aux prepare_pvs 5 40
-aux throttle_dm_mirror 50 || :
+aux throttle_dm_mirror 40 || :
vgcreate -s 128k $vg "$dev1" "$dev2" "$dev3"
pvcreate --metadatacopies 0 "$dev4" "$dev5"
3 years