diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5f36e85..2705a4f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,6 @@ jobs: pylint python3-dbus python3-dbus-python-client-gen - python3-justbytes python3-gobject python3-psutil image: fedora:40 # CURRENT DEVELOPMENT ENVIRONMENT diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml index f9f9b3a..1c2637e 100644 --- a/.github/workflows/weekly.yml +++ b/.github/workflows/weekly.yml @@ -20,7 +20,6 @@ jobs: python3-dbus python3-dbus-python-client-gen python3-gobject - python3-justbytes python3-psutil task: PYTHONPATH=./src make -f Makefile lint - dependencies: black python3-isort diff --git a/testlib/dbus.py b/testlib/dbus.py index fa3a27e..06cbf6b 100644 --- a/testlib/dbus.py +++ b/testlib/dbus.py @@ -259,7 +259,7 @@ def pool_start(id_string, id_type): StratisDbus._MNGR_IFACE, ) - return manager_iface.StartPool(id_string, id_type, (False, ""), (False, 0)) + return manager_iface.StartPool(id_string, id_type, (False, "")) @staticmethod def pool_stop(id_string, id_type): @@ -285,20 +285,6 @@ def pool_uuid(pool_path): return iface.Get(StratisDbus._POOL_IFACE, "Uuid", timeout=StratisDbus._TIMEOUT) - @staticmethod - def pool_encrypted(pool_path): - """ - Find a pool Encrypted value given an object path. - """ - iface = dbus.Interface( - StratisDbus._BUS.get_object(StratisDbus._BUS_NAME, pool_path), - dbus.PROPERTIES_IFACE, - ) - - return iface.Get( - StratisDbus._POOL_IFACE, "Encrypted", timeout=StratisDbus._TIMEOUT - ) - @staticmethod def pool_create( pool_name, diff --git a/testlib/infra.py b/testlib/infra.py index 30b4deb..168cd95 100644 --- a/testlib/infra.py +++ b/testlib/infra.py @@ -30,7 +30,6 @@ # isort: THIRDPARTY import dbus -from justbytes import Range from .dbus import StratisDbus, manager_interfaces from .utils import exec_command, process_exists, terminate_traces @@ -45,7 +44,6 @@ MOUNT_POINT_SUFFIX = "_stratisd_mounts" UMOUNT = "umount" MOUNT = "mount" -STRATIS_METADATA_LEN = Range(8192, 512) def clean_up(): # pylint: disable=too-many-branches @@ -242,73 +240,6 @@ def _check_thin_meta_allocations(self, metadata): "total size of thin meta spare device.", ) - def _check_encryption_information_consistency(self, pool_object_path, metadata): - """ - Check whether D-Bus and metadata agree about encryption state of pool. - """ - encrypted = bool(StratisDbus.pool_encrypted(pool_object_path)) - features = metadata.get("features") - - if encrypted: - self.assertIsNotNone(features) - self.assertIn("Encryption", metadata["features"]) - elif features is not None: - self.assertNotIn("Encryption", metadata["features"]) - - def _check_crypt_meta_allocs(self, metadata): - """ - Check that all crypt metadata allocs exist and have non-zero length. - """ - crypt_meta_allocs = metadata["backstore"]["cap"].get("crypt_meta_allocs") - self.assertIsNotNone(crypt_meta_allocs) - self.assertIsInstance(crypt_meta_allocs, list) - self.assertGreater(len(crypt_meta_allocs), 0) - - crypt_meta_allocs = crypt_meta_allocs[0] - self.assertIsInstance(crypt_meta_allocs, list) - self.assertEqual(crypt_meta_allocs[0], 0) - self.assertGreater(crypt_meta_allocs[1], 0) - - def _check_raid_meta_allocs(self, metadata): - """ - Check that all raid_meta_allocs exist and have non-zero length. - - RAID meta_allocs should start immediately after Stratis metadata ends. - """ - for raid_meta_allocs in [ - a["raid_meta_allocs"] - for a in metadata["backstore"]["data_tier"]["blockdev"]["devs"] - ]: - self.assertIsNotNone(raid_meta_allocs) - self.assertIsInstance(raid_meta_allocs, list) - self.assertEqual(len(raid_meta_allocs), 1) - - raid_meta_allocs = raid_meta_allocs[0] - self.assertIsInstance(raid_meta_allocs, list) - - raid_meta_alloc_start = Range(raid_meta_allocs[0], 512) - raid_meta_alloc_len = Range(raid_meta_allocs[1], 512) - - self.assertEqual(raid_meta_alloc_start, STRATIS_METADATA_LEN) - self.assertGreater(raid_meta_alloc_len, Range(0)) - - def _check_integrity_meta_allocs(self, metadata): - """ - Check that all integrity_meta_allocs exist and have non-zero length. - """ - for integrity_meta_allocs in [ - a["integrity_meta_allocs"] - for a in metadata["backstore"]["data_tier"]["blockdev"]["devs"] - ]: - self.assertIsNotNone(integrity_meta_allocs) - self.assertIsInstance(integrity_meta_allocs, list) - self.assertGreater(len(integrity_meta_allocs), 0) - - for alloc in integrity_meta_allocs: - start, length = Range(alloc[0], 512), Range(alloc[1], 512) - self.assertGreater(start, Range(0)) - self.assertEqual(length % Range(8, 512), Range(0)) - def run_check(self, stop_time): """ Run the check. @@ -339,13 +270,6 @@ def run_check(self, stop_time): self._check_thin_meta_allocations(written) - self._check_encryption_information_consistency(object_path, written) - self._check_crypt_meta_allocs(written) - - self._check_raid_meta_allocs(written) - - self._check_integrity_meta_allocs(written) - else: current_message = ( "" if current_return_code == _OK else current_message