mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
tests: lvmdbusd handles empty LvCommon.Devices
During vdo testing with smaller block devices the test needs to determine which PVs in a VG are unused. This was leveraging LvCommon.Devices, but that isn't populated when a LV is resides on a LV pool instead of a PV. This is a known limitation of the code at this time. For now we will walk all the PVs in the VG looking for ones that don't have any associated LVs and use them instead. Signed-off-by: Tony Asleson <tasleson@redhat.com>
This commit is contained in:
parent
3f084b06e9
commit
3fa424f893
@ -1144,10 +1144,12 @@ class TestDbusService(unittest.TestCase):
|
||||
delta = 16384
|
||||
|
||||
for size in [start_size + delta, start_size - delta]:
|
||||
|
||||
pv_in_use = [i[0] for i in lv.LvCommon.Devices]
|
||||
# Select a PV in the VG that isn't in use
|
||||
pv_empty = [p for p in vg.Pvs if p not in pv_in_use]
|
||||
pv_empty = []
|
||||
for p in vg.Pvs:
|
||||
pobj = ClientProxy(self.bus, p, interfaces=(PV_INT,))
|
||||
if len(pobj.Pv.Lv) == 0:
|
||||
pv_empty.append(p)
|
||||
|
||||
prev = lv.LvCommon.SizeBytes
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user