From 0e82acaebaaca32e5ff8a000e481b4d2acd370a2 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: May 11 2022 11:47:07 +0000 Subject: tests: Lower expected free space on newly created Ext filesystems Resolves: rhbz#2065943 --- diff --git a/0012-tests-Lower-expected-free-space-on-newly-created-Ext-filesystems.patch b/0012-tests-Lower-expected-free-space-on-newly-created-Ext-filesystems.patch new file mode 100644 index 0000000..66b5999 --- /dev/null +++ b/0012-tests-Lower-expected-free-space-on-newly-created-Ext-filesystems.patch @@ -0,0 +1,71 @@ +From 8978b7e6913f904bea887b0c542f9f82c969c2cf Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 1 Sep 2021 11:36:29 +0200 +Subject: [PATCH] tests: Lower expected free space on newly created Ext + filesystems + +With e2fsprogs 1.46.4 we now see less than 90 % of free blocks on +newly created devices in our tests. +--- + tests/fs_test.py | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/tests/fs_test.py b/tests/fs_test.py +index 551b6a7b..6b0134bf 100644 +--- a/tests/fs_test.py ++++ b/tests/fs_test.py +@@ -425,8 +425,8 @@ def _test_ext_get_info(self, mkfs_function, info_function): + self.assertTrue(fi) + self.assertEqual(fi.block_size, 1024) + self.assertEqual(fi.block_count, 100 * 1024**2 / 1024) +- # at least 90 % should be available, so it should be reported +- self.assertGreater(fi.free_blocks, 0.90 * 100 * 1024**2 / 1024) ++ # at least 80 % should be available, so it should be reported ++ self.assertGreater(fi.free_blocks, 0.80 * 100 * 1024**2 / 1024) + self.assertEqual(fi.label, "") + # should be an non-empty string + self.assertTrue(fi.uuid) +@@ -436,8 +436,8 @@ def _test_ext_get_info(self, mkfs_function, info_function): + fi = BlockDev.fs_ext4_get_info(self.loop_dev) + self.assertEqual(fi.block_size, 1024) + self.assertEqual(fi.block_count, 100 * 1024**2 / 1024) +- # at least 90 % should be available, so it should be reported +- self.assertGreater(fi.free_blocks, 0.90 * 100 * 1024**2 / 1024) ++ # at least 80 % should be available, so it should be reported ++ self.assertGreater(fi.free_blocks, 0.80 * 100 * 1024**2 / 1024) + self.assertEqual(fi.label, "") + # should be an non-empty string + self.assertTrue(fi.uuid) +@@ -515,8 +515,8 @@ def _test_ext_resize(self, mkfs_function, info_function, resize_function): + self.assertTrue(fi) + self.assertEqual(fi.block_size, 1024) + self.assertEqual(fi.block_count, 100 * 1024**2 / 1024) +- # at least 90 % should be available, so it should be reported +- self.assertGreater(fi.free_blocks, 0.90 * 100 * 1024**2 / 1024) ++ # at least 80 % should be available, so it should be reported ++ self.assertGreater(fi.free_blocks, 0.80 * 100 * 1024**2 / 1024) + + succ = resize_function(self.loop_dev, 50 * 1024**2, None) + self.assertTrue(succ) +@@ -532,8 +532,8 @@ def _test_ext_resize(self, mkfs_function, info_function, resize_function): + self.assertTrue(fi) + self.assertEqual(fi.block_size, 1024) + self.assertEqual(fi.block_count, 100 * 1024**2 / 1024) +- # at least 90 % should be available, so it should be reported +- self.assertGreater(fi.free_blocks, 0.90 * 100 * 1024**2 / 1024) ++ # at least 80 % should be available, so it should be reported ++ self.assertGreater(fi.free_blocks, 0.80 * 100 * 1024**2 / 1024) + + # resize again + succ = resize_function(self.loop_dev, 50 * 1024**2, None) +@@ -550,8 +550,8 @@ def _test_ext_resize(self, mkfs_function, info_function, resize_function): + self.assertTrue(fi) + self.assertEqual(fi.block_size, 1024) + self.assertEqual(fi.block_count, 100 * 1024**2 / 1024) +- # at least 90 % should be available, so it should be reported +- self.assertGreater(fi.free_blocks, 0.90 * 100 * 1024**2 / 1024) ++ # at least 80 % should be available, so it should be reported ++ self.assertGreater(fi.free_blocks, 0.80 * 100 * 1024**2 / 1024) + + def test_ext2_resize(self): + """Verify that it is possible to resize an ext2 file system""" diff --git a/libblockdev.spec b/libblockdev.spec index 9dd4ed4..331478b 100644 --- a/libblockdev.spec +++ b/libblockdev.spec @@ -125,7 +125,7 @@ Name: libblockdev Version: 2.25 -Release: 11%{?dist} +Release: 12%{?dist} Summary: A library for low-level manipulation with block devices License: LGPLv2+ URL: https://github.com/storaged-project/libblockdev @@ -142,6 +142,7 @@ Patch8: 0008-lvm-Fix-reading-statistics-for-VDO-pools-with-VDO-8.patch Patch9: 0009-vdo_stats-Default-to-100-savings-for-invalid-savings.patch Patch10: 0010-Add-support-for-creating-and-activating-integrity-de.patch Patch11: 0011-tests-Wait-for-raid-and-mirrored-LVs-to-be-synced-be.patch +Patch12: 0012-tests-Lower-expected-free-space-on-newly-created-Ext-filesystems.patch BuildRequires: make BuildRequires: glib2-devel @@ -705,6 +706,7 @@ A meta-package that pulls all the libblockdev plugins as dependencies. %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 %build autoreconf -ivf @@ -1008,6 +1010,10 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %files plugins-all %changelog +* Wed May 11 2022 Vojtech Trefny - 2.25-12 +- tests: Lower expected free space on newly created Ext filesystems + Resolves: rhbz#2065943 + * Mon Jan 10 2022 Vojtech Trefny - 2.25-11 - tests: Wait for raid and mirrored LVs to be synced before removing Resolves: rhbz#2030647