Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=25c665d5559e77c1eb0f6…
Commit: 25c665d5559e77c1eb0f67527fa95419a84b7553
Parent: 6db533c4393e1e8ca02e957c529afaf67fa7e20b
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Mar 26 13:13:26 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Mar 26 13:13:26 2021 +0100
tests: dbus update
Always use PREFIX for vg header - all tests must use this prefix,
VGs without are not allowed.
Modify pv_symlink test - as the test was checking unsupportable
combination - since lvm2 commands withing testsuite are only
allowed to manipulate with /dev/mapper/LVMTESTXXXX path -
nothing else allowed and fails on being filtered.
---
test/dbus/lvmdbustest.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index efa1afb26..6dab312c0 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -59,7 +59,7 @@ if pv_device_list:
def vg_n(prefix=None):
- name = rs(8, '_vg')
+ name = g_prefix + '_vg'
if prefix:
name = prefix + name
return name
@@ -1838,7 +1838,6 @@ class TestDbusService(unittest.TestCase):
# typically utilizes loopback, this test is skipped in
# those environments.
pv_object_path = self.objs[PV_INT][0].object_path
-
if not self.objs[PV_INT][0].Pv.Name.startswith("/dev"):
raise unittest.SkipTest('test not running in /dev')
@@ -1867,8 +1866,9 @@ class TestDbusService(unittest.TestCase):
# Lets locate a symlink for it
devices = glob('/dev/disk/*/*')
+ rp_pv_device_path = os.path.realpath(pv_device_path)
for d in devices:
- if pv_device_path == os.path.realpath(d):
+ if rp_pv_device_path == os.path.realpath(d):
symlink = d
break
@@ -1878,14 +1878,16 @@ class TestDbusService(unittest.TestCase):
rc = self._lookup(symlink)
self.assertEqual(rc, '/')
- pv_object_path = self._pv_create(symlink)
+ ### pv_object_path = self._pv_create(symlink)
+ ### Test is limited by filter rules and must use /dev/mapper/LVMTEST path
+ pv_object_path = self._pv_create(pv_device_path)
+
self.assertNotEqual(pv_object_path, '/')
pv_proxy = ClientProxy(self.bus, pv_object_path, interfaces=(PV_INT, ))
self.assertEqual(pv_proxy.Pv.Name, pv_device_path)
# Lets check symlink lookup
- self.assertEqual(pv_object_path, self._lookup(symlink))
self.assertEqual(pv_object_path, self._lookup(pv_device_path))
def _create_vdo_pool_and_lv(self, vg_prefix="vdo_"):
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=85fae836c09daf457f3f8…
Commit: 85fae836c09daf457f3f8f14e3eae2179cfd2ffa
Parent: 9bcc76b63c14566e5ced09ac18129e1c9a98e8e4
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Mar 26 11:13:56 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Mar 26 11:13:56 2021 +0100
tests: add basic validation of running services
For determinist test results lvm2/dm service shall not be present
and running in the system as it may randomize test results.
In case they are found present, this test ends with warning (not failure).
---
test/shell/000-basic.sh | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/test/shell/000-basic.sh b/test/shell/000-basic.sh
index 1e511d1f0..a7b80c72b 100644
--- a/test/shell/000-basic.sh
+++ b/test/shell/000-basic.sh
@@ -34,3 +34,15 @@ get_devs
# ensure we do not crash on a bug in config file
aux lvmconf 'log/prefix = 1""'
not lvs "${DEVICES[@]}"
+
+# validate testing machine with its services is in expected state and will not interfere with tests
+if systemctl -a >out 2>/dev/null ; then
+ for i in dm-event lvm2-lvmpolld lvm2-monitor ; do
+ echo $i
+ grep $i out | not grep -v masked || {
+ cat out
+ should not echo "Present unmasked $i service/socket may randomize testing results!"
+ echo "+++++ Stop & Mask with systemctl +++++"
+ }
+ done
+fi
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5feb99dda68dd492929ff…
Commit: 5feb99dda68dd492929fff0d7b15d3ef0ab86347
Parent: 0558b223b87b922faa709e7a7e0e6aaa4b7f0c42
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Mar 26 00:35:28 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Mar 26 00:35:28 2021 +0100
tests: add workaround for older mdadm
Some older instancies of 'mdadm' opened legs in RW and
closed and opened again and expected exlusive access.
But here udev rule can be fired - so on these versions
slow down whole mdadm runtime by using strace, to
give system a bit more time to finish udev rule.
---
test/shell/lvm-on-md.sh | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/test/shell/lvm-on-md.sh b/test/shell/lvm-on-md.sh
index 9187d44f5..7c14e6748 100644
--- a/test/shell/lvm-on-md.sh
+++ b/test/shell/lvm-on-md.sh
@@ -27,6 +27,18 @@ _clear_online_files() {
. lib/inittest
+which mdadm || skip
+
+STRACE=
+[ "$DM_DEV_DIR" = "/dev" ] && mdadm -V 2>&1 | grep " v3.2" && {
+ # use this 'trick' to slow down mdadm which otherwise
+ # is racing with udev rule since mdadm internally
+ # opens and closes raid leg devices in RW mode and then
+ # tries to get exlusive access to the leg device during
+ # insertion to kernel and fails during assembly
+ # There could be more affted version of mdadm.
+ STRACE="strace -f -o /dev/null"
+}
# This stops lvm from taking advantage of hints which
# will have already excluded md components.
@@ -109,7 +121,7 @@ test ! -f "$RUNDIR/lvm/vgs_online/$vg"
# should not show an active lv
not dmsetup info $vg-$lv1
-mdadm --assemble "$mddev" "$dev1" "$dev2"
+$STRACE mdadm --assemble "$mddev" "$dev1" "$dev2"
aux udev_wait
not pvs "$dev1"
@@ -264,7 +276,7 @@ test ! -f "$RUNDIR/lvm/vgs_online/$vg"
not dmsetup info $vg-$lv1
# start the md dev
-mdadm --assemble "$mddev" "$dev1" "$dev2"
+$STRACE mdadm --assemble "$mddev" "$dev1" "$dev2"
aux udev_wait
not pvs "$dev1"
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=73710b87fb567e3d6d72b…
Commit: 73710b87fb567e3d6d72b475afe9f95ccc0afad6
Parent: c1f5ca6751eeda5925638447b561b05bdf8a250c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Mar 24 16:30:23 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Mar 24 16:41:08 2021 +0100
WHATS_NEW: updates
---
WHATS_NEW | 2 ++
1 file changed, 2 insertions(+)
diff --git a/WHATS_NEW b/WHATS_NEW
index 80e16d880..3e086f951 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,7 @@
Version 2.03.12 -
===================================
+ Report error when the filesystem is missing on fsadm resized volume.
+ Handle better blockdev with --getsize64 support for fsadm.
Do not include editline/history.h when using editline library.
Support lvconvert -Zn with thin-pool conversion.
Support error and zero segtype for thin-pool data for testing.