From ac58bf348dfc16c8c2ec6034978e5ad0bd1c770d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Wed, 7 Aug 2024 18:19:41 +0200 Subject: [PATCH 1/2] Update test-image-raid Apart from testing raid this integration test also tests a certain LVM volume setup. The test has been updated to use the btrfs filesystem because it has the most strict size requirements. --- build-tests/x86/tumbleweed/test-image-raid/appliance.kiwi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-tests/x86/tumbleweed/test-image-raid/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-raid/appliance.kiwi index b379d4f55b6..8c3afec2ae7 100644 --- a/build-tests/x86/tumbleweed/test-image-raid/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-raid/appliance.kiwi @@ -16,7 +16,7 @@ false breeze openSUSE - + /dev/ram false @@ -77,6 +77,7 @@ + From 4b60c92e4af912056df0a128cc93899842ef8921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Wed, 7 Aug 2024 18:30:13 +0200 Subject: [PATCH 2/2] Increase default volume size So far 30MB was set as default volume size which is by far too small for a number of filesystems, e.g btrfs and also XFS. This commit increases the default volume size such that all modern filesystems builds if the default volume size is used. --- kiwi/defaults.py | 2 +- test/unit/storage/setup_test.py | 2 +- test/unit/system/profile_test.py | 4 ++-- test/unit/volume_manager/base_test.py | 8 ++++---- test/unit/xml_state_test.py | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/kiwi/defaults.py b/kiwi/defaults.py index aa23a040f37..960cf1cf418 100644 --- a/kiwi/defaults.py +++ b/kiwi/defaults.py @@ -1156,7 +1156,7 @@ def get_min_volume_mbytes(): :rtype: int """ - return 30 + return 120 @staticmethod def get_lvm_overhead_mbytes(): diff --git a/test/unit/storage/setup_test.py b/test/unit/storage/setup_test.py index 201ed32857a..53acc103d72 100644 --- a/test/unit/storage/setup_test.py +++ b/test/unit/storage/setup_test.py @@ -212,7 +212,7 @@ def test_get_disksize_mbytes_partition_too_small(self, mock_os_path_exists): @patch('os.path.exists') def test_get_disksize_mbytes_volumes(self, mock_exists): mock_exists.side_effect = lambda path: path != 'root_dir/newfolder' - assert self.setup_volumes.get_disksize_mbytes() == 2144 + assert self.setup_volumes.get_disksize_mbytes() == 2774 @patch('os.path.exists') def test_get_disksize_mbytes_partitions(self, mock_exists): diff --git a/test/unit/system/profile_test.py b/test/unit/system/profile_test.py index a8736b18f58..3dd9a59a12b 100644 --- a/test/unit/system/profile_test.py +++ b/test/unit/system/profile_test.py @@ -81,9 +81,9 @@ def test_create_oem(self, mock_which): os.remove(self.profile_file) assert self.profile.dot_profile == { 'kiwi_Volume_1': 'usr_lib|size:1024|usr/lib', - 'kiwi_Volume_2': 'etc_volume|freespace:30|etc', + 'kiwi_Volume_2': 'etc_volume|freespace:120|etc', 'kiwi_Volume_3': 'bin_volume|size:all|/usr/bin', - 'kiwi_Volume_4': 'usr_bin|freespace:30|usr/bin', + 'kiwi_Volume_4': 'usr_bin|freespace:120|usr/bin', 'kiwi_Volume_5': 'LVSwap|size:128|', 'kiwi_Volume_Root': 'LVRoot|freespace:500|', 'kiwi_bootkernel': None, diff --git a/test/unit/volume_manager/base_test.py b/test/unit/volume_manager/base_test.py index d91a7d57caa..cdabc6c88c7 100644 --- a/test/unit/volume_manager/base_test.py +++ b/test/unit/volume_manager/base_test.py @@ -124,7 +124,7 @@ def test_get_volume_mbsize( assert self.volume_manager.get_volume_mbsize( self.volume_manager.volumes[0], self.volume_manager.volumes, 'ext3' - ) == 272 + ) == 362 @patch('kiwi.volume_manager.base.SystemSize') @patch('os.path.exists') @@ -140,7 +140,7 @@ def test_get_volume_mbsize_for_oem_type( assert self.volume_manager.get_volume_mbsize( self.volume_manager.volumes[0], self.volume_manager.volumes, 'ext3', True - ) == 72 + ) == 162 @patch('kiwi.volume_manager.base.SystemSize') @patch('os.path.exists') @@ -168,7 +168,7 @@ def test_get_volume_mbsize_nested_volumes( assert self.volume_manager.get_volume_mbsize( self.volume_manager.volumes[0], self.volume_manager.volumes, 'ext3' - ) == 272 + ) == 362 size.accumulate_mbyte_file_sizes.assert_called_once_with( ['root_dir/usr/lib'] ) @@ -204,7 +204,7 @@ def test_get_volume_mbsize_root_volume( assert self.volume_manager.get_volume_mbsize( self.volume_manager.volumes[2], self.volume_manager.volumes, 'ext3', True - ) == 72 + ) == 162 size.accumulate_mbyte_file_sizes.assert_called_once_with( ['root_dir/usr', 'root_dir/usr/lib'] ) diff --git a/test/unit/xml_state_test.py b/test/unit/xml_state_test.py index 3db07fb0005..83c58fbed1e 100644 --- a/test/unit/xml_state_test.py +++ b/test/unit/xml_state_test.py @@ -434,7 +434,7 @@ def test_get_volumes_for_arch(self): volume_type( name='usr_lib', parent='', - size='freespace:30', + size='freespace:120', realpath='usr/lib', mountpoint='usr/lib', fullsize=False, @@ -493,7 +493,7 @@ def test_get_volumes(self): is_root_volume=True ), volume_type( - name='etc_volume', parent='', size='freespace:30', + name='etc_volume', parent='', size='freespace:120', realpath='etc', mountpoint='etc', fullsize=False, label=None, @@ -557,7 +557,7 @@ def test_get_volumes_no_explicit_root_setup_other_fullsize_volume(self): is_root_volume=False ), volume_type( - name='LVRoot', parent='', size='freespace:30', realpath='/', + name='LVRoot', parent='', size='freespace:120', realpath='/', mountpoint=None, fullsize=False, label=None, attributes=[],