1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-01 09:47:48 +03:00

test: Use _pv suffix for nested devices

Testsuite uses global_filter to accept only test devices with
suffix matching /_pv[0-9_]*$/ set by generate_config in aux.sh.
This commit is contained in:
Marian Csontos 2017-05-26 08:33:39 +02:00
parent 3745b52ed4
commit 7687ab82c8

View File

@ -716,9 +716,9 @@ class TestDbusService(unittest.TestCase):
LV_BASE_INT)
self._validate_lookup("%s/%s" % (vg.Name, lv_name), lv.object_path)
def _create_lv(self, thinpool=False, size=None, vg=None):
def _create_lv(self, thinpool=False, size=None, vg=None, suffix=None):
lv_name = lv_n()
lv_name = lv_n(suffix=suffix)
interfaces = list(LV_BASE_INT)
if thinpool:
@ -1842,7 +1842,8 @@ class TestDbusService(unittest.TestCase):
self.assertIn(pv_object_path, vg.Vg.Pvs,
"Expecting PV object path in Vg.Pvs")
lv = self._create_lv(vg=vg.Vg, size=vg.Vg.FreeBytes)
lv = self._create_lv(vg=vg.Vg, size=vg.Vg.FreeBytes,
suffix="_pv")
device_path = '/dev/%s/%s' % (vg.Vg.Name, lv.LvCommon.Name)
new_pv_object_path = self._pv_create(device_path)