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"""