neil / rpms / libblockdev

Forked from rpms/libblockdev a year ago
Clone

Blame SOURCES/0012-tests-Lower-expected-free-space-on-newly-created-Ext-filesystems.patch

6e196a
From 8978b7e6913f904bea887b0c542f9f82c969c2cf Mon Sep 17 00:00:00 2001
6e196a
From: Vojtech Trefny <vtrefny@redhat.com>
6e196a
Date: Wed, 1 Sep 2021 11:36:29 +0200
6e196a
Subject: [PATCH] tests: Lower expected free space on newly created Ext
6e196a
 filesystems
6e196a
6e196a
With e2fsprogs 1.46.4 we now see less than 90 % of free blocks on
6e196a
newly created devices in our tests.
6e196a
---
6e196a
 tests/fs_test.py | 20 ++++++++++----------
6e196a
 1 file changed, 10 insertions(+), 10 deletions(-)
6e196a
6e196a
diff --git a/tests/fs_test.py b/tests/fs_test.py
6e196a
index 551b6a7b..6b0134bf 100644
6e196a
--- a/tests/fs_test.py
6e196a
+++ b/tests/fs_test.py
6e196a
@@ -425,8 +425,8 @@ def _test_ext_get_info(self, mkfs_function, info_function):
6e196a
         self.assertTrue(fi)
6e196a
         self.assertEqual(fi.block_size, 1024)
6e196a
         self.assertEqual(fi.block_count, 100 * 1024**2 / 1024)
6e196a
-        # at least 90 % should be available, so it should be reported
6e196a
-        self.assertGreater(fi.free_blocks, 0.90 * 100 * 1024**2 / 1024)
6e196a
+        # at least 80 % should be available, so it should be reported
6e196a
+        self.assertGreater(fi.free_blocks, 0.80 * 100 * 1024**2 / 1024)
6e196a
         self.assertEqual(fi.label, "")
6e196a
         # should be an non-empty string
6e196a
         self.assertTrue(fi.uuid)
6e196a
@@ -436,8 +436,8 @@ def _test_ext_get_info(self, mkfs_function, info_function):
6e196a
             fi = BlockDev.fs_ext4_get_info(self.loop_dev)
6e196a
             self.assertEqual(fi.block_size, 1024)
6e196a
             self.assertEqual(fi.block_count, 100 * 1024**2 / 1024)
6e196a
-            # at least 90 % should be available, so it should be reported
6e196a
-            self.assertGreater(fi.free_blocks, 0.90 * 100 * 1024**2 / 1024)
6e196a
+            # at least 80 % should be available, so it should be reported
6e196a
+            self.assertGreater(fi.free_blocks, 0.80 * 100 * 1024**2 / 1024)
6e196a
             self.assertEqual(fi.label, "")
6e196a
             # should be an non-empty string
6e196a
             self.assertTrue(fi.uuid)
6e196a
@@ -515,8 +515,8 @@ def _test_ext_resize(self, mkfs_function, info_function, resize_function):
6e196a
         self.assertTrue(fi)
6e196a
         self.assertEqual(fi.block_size, 1024)
6e196a
         self.assertEqual(fi.block_count, 100 * 1024**2 / 1024)
6e196a
-        # at least 90 % should be available, so it should be reported
6e196a
-        self.assertGreater(fi.free_blocks, 0.90 * 100 * 1024**2 / 1024)
6e196a
+        # at least 80 % should be available, so it should be reported
6e196a
+        self.assertGreater(fi.free_blocks, 0.80 * 100 * 1024**2 / 1024)
6e196a
 
6e196a
         succ = resize_function(self.loop_dev, 50 * 1024**2, None)
6e196a
         self.assertTrue(succ)
6e196a
@@ -532,8 +532,8 @@ def _test_ext_resize(self, mkfs_function, info_function, resize_function):
6e196a
         self.assertTrue(fi)
6e196a
         self.assertEqual(fi.block_size, 1024)
6e196a
         self.assertEqual(fi.block_count, 100 * 1024**2 / 1024)
6e196a
-        # at least 90 % should be available, so it should be reported
6e196a
-        self.assertGreater(fi.free_blocks, 0.90 * 100 * 1024**2 / 1024)
6e196a
+        # at least 80 % should be available, so it should be reported
6e196a
+        self.assertGreater(fi.free_blocks, 0.80 * 100 * 1024**2 / 1024)
6e196a
 
6e196a
         # resize again
6e196a
         succ = resize_function(self.loop_dev, 50 * 1024**2, None)
6e196a
@@ -550,8 +550,8 @@ def _test_ext_resize(self, mkfs_function, info_function, resize_function):
6e196a
         self.assertTrue(fi)
6e196a
         self.assertEqual(fi.block_size, 1024)
6e196a
         self.assertEqual(fi.block_count, 100 * 1024**2 / 1024)
6e196a
-        # at least 90 % should be available, so it should be reported
6e196a
-        self.assertGreater(fi.free_blocks, 0.90 * 100 * 1024**2 / 1024)
6e196a
+        # at least 80 % should be available, so it should be reported
6e196a
+        self.assertGreater(fi.free_blocks, 0.80 * 100 * 1024**2 / 1024)
6e196a
 
6e196a
     def test_ext2_resize(self):
6e196a
         """Verify that it is possible to resize an ext2 file system"""