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