neil / rpms / python-blivet

Forked from rpms/python-blivet a year ago
Clone
93a1d2
From 9618b84f94187efddc7316c2546bed923a91ecf9 Mon Sep 17 00:00:00 2001
93a1d2
From: Vojtech Trefny <vtrefny@redhat.com>
93a1d2
Date: Thu, 3 Nov 2022 08:36:27 +0100
93a1d2
Subject: [PATCH 1/2] Revert "Set XFS minimal size to 300 MiB"
93a1d2
93a1d2
This reverts commit 307d49833771d161314bae50c68e70dc35c3bb36.
93a1d2
---
93a1d2
 blivet/formats/fs.py | 2 +-
93a1d2
 1 file changed, 1 insertion(+), 1 deletion(-)
93a1d2
93a1d2
diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
93a1d2
index 8c346aa5..33922f3a 100644
93a1d2
--- a/blivet/formats/fs.py
93a1d2
+++ b/blivet/formats/fs.py
93a1d2
@@ -1091,7 +1091,7 @@ class XFS(FS):
93a1d2
     _modules = ["xfs"]
93a1d2
     _labelfs = fslabeling.XFSLabeling()
93a1d2
     _uuidfs = fsuuid.XFSUUID()
93a1d2
-    _min_size = Size("300 MiB")
93a1d2
+    _min_size = Size("16 MiB")
93a1d2
     _max_size = Size("16 EiB")
93a1d2
     _formattable = True
93a1d2
     _linux_native = True
93a1d2
-- 
93a1d2
2.38.1
93a1d2
93a1d2
93a1d2
From 24d94922d6879baa85aaa101f6b21efa568a9cbc Mon Sep 17 00:00:00 2001
93a1d2
From: Vojtech Trefny <vtrefny@redhat.com>
93a1d2
Date: Thu, 3 Nov 2022 08:36:39 +0100
93a1d2
Subject: [PATCH 2/2] Revert "tests: Create bigger devices for XFS testing"
93a1d2
93a1d2
This reverts commit 467cb8024010b2cabb1e92d9e64f6d3cbe949ad9.
93a1d2
---
93a1d2
 tests/storage_tests/formats_test/fs_test.py       | 7 +++----
93a1d2
 tests/storage_tests/formats_test/fslabeling.py    | 4 +---
93a1d2
 tests/storage_tests/formats_test/fsuuid.py        | 4 +---
93a1d2
 tests/storage_tests/formats_test/labeling_test.py | 2 --
93a1d2
 tests/storage_tests/formats_test/uuid_test.py     | 3 ---
93a1d2
 5 files changed, 5 insertions(+), 15 deletions(-)
93a1d2
93a1d2
diff --git a/tests/storage_tests/formats_test/fs_test.py b/tests/storage_tests/formats_test/fs_test.py
93a1d2
index cf8fb441..97f4cbbe 100644
93a1d2
--- a/tests/storage_tests/formats_test/fs_test.py
93a1d2
+++ b/tests/storage_tests/formats_test/fs_test.py
93a1d2
@@ -54,7 +54,6 @@ class ReiserFSTestCase(fstesting.FSAsRoot):
93a1d2
 
93a1d2
 class XFSTestCase(fstesting.FSAsRoot):
93a1d2
     _fs_class = fs.XFS
93a1d2
-    _DEVICE_SIZE = Size("500 MiB")
93a1d2
 
93a1d2
     def can_resize(self, an_fs):
93a1d2
         resize_tasks = (an_fs._resize, an_fs._size_info)
93a1d2
@@ -96,12 +95,12 @@ class XFSTestCase(fstesting.FSAsRoot):
93a1d2
             self.assertFalse(an_fs.resizable)
93a1d2
             # Not resizable, so can not do resizing actions.
93a1d2
             with self.assertRaises(DeviceFormatError):
93a1d2
-                an_fs.target_size = Size("300 MiB")
93a1d2
+                an_fs.target_size = Size("64 MiB")
93a1d2
             with self.assertRaises(DeviceFormatError):
93a1d2
                 an_fs.do_resize()
93a1d2
         else:
93a1d2
             disk = DiskDevice(os.path.basename(self.loop_devices[0]))
93a1d2
-            part = self._create_partition(disk, Size("300 MiB"))
93a1d2
+            part = self._create_partition(disk, Size("50 MiB"))
93a1d2
             an_fs = self._fs_class()
93a1d2
             an_fs.device = part.path
93a1d2
             self.assertIsNone(an_fs.create())
93a1d2
@@ -114,7 +113,7 @@ class XFSTestCase(fstesting.FSAsRoot):
93a1d2
             part = self._create_partition(disk, size=part.size + Size("40 MiB"))
93a1d2
 
93a1d2
             # Try a reasonable target size
93a1d2
-            TARGET_SIZE = Size("325 MiB")
93a1d2
+            TARGET_SIZE = Size("64 MiB")
93a1d2
             an_fs.target_size = TARGET_SIZE
93a1d2
             self.assertEqual(an_fs.target_size, TARGET_SIZE)
93a1d2
             self.assertNotEqual(an_fs._size, TARGET_SIZE)
93a1d2
diff --git a/tests/storage_tests/formats_test/fslabeling.py b/tests/storage_tests/formats_test/fslabeling.py
93a1d2
index ebe0b70a..0e0dc261 100644
93a1d2
--- a/tests/storage_tests/formats_test/fslabeling.py
93a1d2
+++ b/tests/storage_tests/formats_test/fslabeling.py
93a1d2
@@ -21,10 +21,8 @@ class LabelingAsRoot(loopbackedtestcase.LoopBackedTestCase):
93a1d2
     _invalid_label = abc.abstractproperty(
93a1d2
         doc="A label which is invalid for this filesystem.")
93a1d2
 
93a1d2
-    _DEVICE_SIZE = Size("100 MiB")
93a1d2
-
93a1d2
     def __init__(self, methodName='run_test'):
93a1d2
-        super(LabelingAsRoot, self).__init__(methodName=methodName, device_spec=[self._DEVICE_SIZE])
93a1d2
+        super(LabelingAsRoot, self).__init__(methodName=methodName, device_spec=[Size("100 MiB")])
93a1d2
 
93a1d2
     def setUp(self):
93a1d2
         an_fs = self._fs_class()
93a1d2
diff --git a/tests/storage_tests/formats_test/fsuuid.py b/tests/storage_tests/formats_test/fsuuid.py
93a1d2
index 0b9762fd..16aa19a6 100644
93a1d2
--- a/tests/storage_tests/formats_test/fsuuid.py
93a1d2
+++ b/tests/storage_tests/formats_test/fsuuid.py
93a1d2
@@ -23,11 +23,9 @@ class SetUUID(loopbackedtestcase.LoopBackedTestCase):
93a1d2
     _invalid_uuid = abc.abstractproperty(
93a1d2
         doc="An invalid UUID for this filesystem.")
93a1d2
 
93a1d2
-    _DEVICE_SIZE = Size("100 MiB")
93a1d2
-
93a1d2
     def __init__(self, methodName='run_test'):
93a1d2
         super(SetUUID, self).__init__(methodName=methodName,
93a1d2
-                                      device_spec=[self._DEVICE_SIZE])
93a1d2
+                                      device_spec=[Size("100 MiB")])
93a1d2
 
93a1d2
     def setUp(self):
93a1d2
         an_fs = self._fs_class()
93a1d2
diff --git a/tests/storage_tests/formats_test/labeling_test.py b/tests/storage_tests/formats_test/labeling_test.py
93a1d2
index 0702260a..d24e6619 100644
93a1d2
--- a/tests/storage_tests/formats_test/labeling_test.py
93a1d2
+++ b/tests/storage_tests/formats_test/labeling_test.py
93a1d2
@@ -1,7 +1,6 @@
93a1d2
 import unittest
93a1d2
 
93a1d2
 from blivet.formats import device_formats
93a1d2
-from blivet.size import Size
93a1d2
 import blivet.formats.fs as fs
93a1d2
 import blivet.formats.swap as swap
93a1d2
 
93a1d2
@@ -62,7 +61,6 @@ class InitializationTestCase(unittest.TestCase):
93a1d2
 class XFSTestCase(fslabeling.CompleteLabelingAsRoot):
93a1d2
     _fs_class = fs.XFS
93a1d2
     _invalid_label = "root filesystem"
93a1d2
-    _DEVICE_SIZE = Size("500 MiB")
93a1d2
 
93a1d2
 
93a1d2
 class FATFSTestCase(fslabeling.CompleteLabelingAsRoot):
93a1d2
diff --git a/tests/storage_tests/formats_test/uuid_test.py b/tests/storage_tests/formats_test/uuid_test.py
93a1d2
index af35c0ee..ee8d452e 100644
93a1d2
--- a/tests/storage_tests/formats_test/uuid_test.py
93a1d2
+++ b/tests/storage_tests/formats_test/uuid_test.py
93a1d2
@@ -2,7 +2,6 @@ import unittest
93a1d2
 
93a1d2
 import blivet.formats.fs as fs
93a1d2
 import blivet.formats.swap as swap
93a1d2
-from blivet.size import Size
93a1d2
 
93a1d2
 from . import fsuuid
93a1d2
 
93a1d2
@@ -53,14 +52,12 @@ class XFSTestCase(fsuuid.SetUUIDWithMkFs):
93a1d2
     _fs_class = fs.XFS
93a1d2
     _invalid_uuid = "abcdefgh-ijkl-mnop-qrst-uvwxyz123456"
93a1d2
     _valid_uuid = "97e3d40f-dca8-497d-8b86-92f257402465"
93a1d2
-    _DEVICE_SIZE = Size("500 MiB")
93a1d2
 
93a1d2
 
93a1d2
 class XFSAfterTestCase(fsuuid.SetUUIDAfterMkFs):
93a1d2
     _fs_class = fs.XFS
93a1d2
     _invalid_uuid = "abcdefgh-ijkl-mnop-qrst-uvwxyz123456"
93a1d2
     _valid_uuid = "97e3d40f-dca8-497d-8b86-92f257402465"
93a1d2
-    _DEVICE_SIZE = Size("500 MiB")
93a1d2
 
93a1d2
 
93a1d2
 class FATFSTestCase(fsuuid.SetUUIDWithMkFs):
93a1d2
-- 
93a1d2
2.38.1
93a1d2