diff mbox series

ext4/033: remove a portion of the test assuming resize2fs would fail

Message ID 20211215035409.244674-1-tytso@mit.edu (mailing list archive)
State New, archived
Headers show
Series ext4/033: remove a portion of the test assuming resize2fs would fail | expand

Commit Message

Theodore Ts'o Dec. 15, 2021, 3:54 a.m. UTC
The ext4/033 test tries to test if resize2fs would fail when resizing
a file system to a size that the number of inodes exceeds the maximum
allowed inode size, 2**32-1.  This no longer takes place as of
e2fsprogs commit 623985ed7dd5 ("resize2fs: attempt to keep the # of
inodes valid by removing the last bg") which will allow resizing a
file system to 64TB by reducing the last block group so that file
system will be 64TB - 128MB, which is close enough for government
work.

Reported-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 tests/ext4/033     | 8 --------
 tests/ext4/033.out | 1 -
 2 files changed, 9 deletions(-)

Comments

Eryu Guan Dec. 19, 2021, 3:16 p.m. UTC | #1
On Tue, Dec 14, 2021 at 10:54:09PM -0500, Theodore Ts'o wrote:
> The ext4/033 test tries to test if resize2fs would fail when resizing
> a file system to a size that the number of inodes exceeds the maximum
> allowed inode size, 2**32-1.  This no longer takes place as of
> e2fsprogs commit 623985ed7dd5 ("resize2fs: attempt to keep the # of
> inodes valid by removing the last bg") which will allow resizing a
> file system to 64TB by reducing the last block group so that file
> system will be 64TB - 128MB, which is close enough for government
> work.
> 
> Reported-by: Eric Whitney <enwlinux@gmail.com>
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> ---
>  tests/ext4/033     | 8 --------
>  tests/ext4/033.out | 1 -
>  2 files changed, 9 deletions(-)
> 
> diff --git a/tests/ext4/033 b/tests/ext4/033
> index 1bc14c03..0fd0ec90 100755
> --- a/tests/ext4/033
> +++ b/tests/ext4/033
> @@ -66,14 +66,6 @@ _mount $DMHUGEDISK_DEV $SCRATCH_MNT
>  echo "Initial fs dump" >> $seqres.full
>  $DUMPE2FS_PROG -h $DMHUGEDISK_DEV >> $seqres.full 2>&1
>  
> -# This should fail, s_inodes_count would just overflow!
> -echo "Resizing to inode limit + 1..."
> -$RESIZE2FS_PROG $DMHUGEDISK_DEV $((limit_groups*group_blocks)) >> $seqres.full 2>&1
> -if [ $? -eq 0 ]; then
> -	echo "Resizing succeeded but it should fail!"
> -	exit
> -fi

This portion of test is the key of the original regression test, if
we're going to remove this part, does it make sense to remove ext4/033
completely?

Thanks,
Eryu

> -
>  # This should succeed, we are maxing out inodes
>  echo "Resizing to max group count..."
>  $RESIZE2FS_PROG $DMHUGEDISK_DEV $(((limit_groups-1)*group_blocks)) >> $seqres.full 2>&1
> diff --git a/tests/ext4/033.out b/tests/ext4/033.out
> index 24c251cb..183a7492 100644
> --- a/tests/ext4/033.out
> +++ b/tests/ext4/033.out
> @@ -1,6 +1,5 @@
>  QA output created by 033
>  Figure out block size
>  Format huge device
> -Resizing to inode limit + 1...
>  Resizing to max group count...
>  Resizing to device size...
> -- 
> 2.31.0
Theodore Ts'o Dec. 20, 2021, 8:39 p.m. UTC | #2
On Sun, Dec 19, 2021 at 11:16:45PM +0800, Eryu Guan wrote:
> 
> This portion of test is the key of the original regression test, if
> we're going to remove this part, does it make sense to remove ext4/033
> completely?

Hmm, good point.  It's nice to keep the regression test around, but we
can't use resize2fs to test the kernel's online resize code directly.
We can fix this by creating test program to execute the ioctl
directly.   Revised patch coming....

							- Ted
diff mbox series

Patch

diff --git a/tests/ext4/033 b/tests/ext4/033
index 1bc14c03..0fd0ec90 100755
--- a/tests/ext4/033
+++ b/tests/ext4/033
@@ -66,14 +66,6 @@  _mount $DMHUGEDISK_DEV $SCRATCH_MNT
 echo "Initial fs dump" >> $seqres.full
 $DUMPE2FS_PROG -h $DMHUGEDISK_DEV >> $seqres.full 2>&1
 
-# This should fail, s_inodes_count would just overflow!
-echo "Resizing to inode limit + 1..."
-$RESIZE2FS_PROG $DMHUGEDISK_DEV $((limit_groups*group_blocks)) >> $seqres.full 2>&1
-if [ $? -eq 0 ]; then
-	echo "Resizing succeeded but it should fail!"
-	exit
-fi
-
 # This should succeed, we are maxing out inodes
 echo "Resizing to max group count..."
 $RESIZE2FS_PROG $DMHUGEDISK_DEV $(((limit_groups-1)*group_blocks)) >> $seqres.full 2>&1
diff --git a/tests/ext4/033.out b/tests/ext4/033.out
index 24c251cb..183a7492 100644
--- a/tests/ext4/033.out
+++ b/tests/ext4/033.out
@@ -1,6 +1,5 @@ 
 QA output created by 033
 Figure out block size
 Format huge device
-Resizing to inode limit + 1...
 Resizing to max group count...
 Resizing to device size...