1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

lvmdbustest: Include major number 259

When you have > 16 partitions for a block device the major number
changes, include them for testing.
This commit is contained in:
Tony Asleson 2022-08-08 10:03:52 -05:00
parent 9ffa1ef884
commit 4b4d431631

View File

@ -1414,7 +1414,10 @@ class TestDbusService(unittest.TestCase):
@staticmethod
def _get_devices():
context = pyudev.Context()
return context.list_devices(subsystem='block', MAJOR='8')
bd = context.list_devices(subsystem='block')
# Handle block extended major too (259)
return [b for b in bd if b.properties.get('MAJOR') == '8' or
b.properties.get('MAJOR') == '259']
def _pv_scan(self, activate, cache, device_paths, major_minors):
mgr = self._manager().Manager