diff options
author | Tony Asleson <tasleson@redhat.com> | 2022-08-08 10:03:52 -0500 |
---|---|---|
committer | Tony Asleson <tasleson@redhat.com> | 2022-09-16 10:49:36 -0500 |
commit | 4b4d431631ec8df90d6d5793fbfc26c6999e154c (patch) | |
tree | 0163a9eb77d82fc987381d3102830e19b56e4d40 /test/dbus | |
parent | 9ffa1ef884f51d08fc6f2b39287a8d566eeed7df (diff) | |
download | lvm2-4b4d431631ec8df90d6d5793fbfc26c6999e154c.tar.gz |
lvmdbustest: Include major number 259
When you have > 16 partitions for a block device the major number
changes, include them for testing.
Diffstat (limited to 'test/dbus')
-rwxr-xr-x | test/dbus/lvmdbustest.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py index aadd036b0..02d4d35d7 100755 --- a/test/dbus/lvmdbustest.py +++ b/test/dbus/lvmdbustest.py @@ -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 |