diff mbox series

[v2] ext4/032: add a new testcase in online resize tests

Message ID 20241111152100.152924-1-aleksandr.mikhalitsyn@canonical.com (mailing list archive)
State New
Headers show
Series [v2] ext4/032: add a new testcase in online resize tests | expand

Commit Message

Aleksandr Mikhalitsyn Nov. 11, 2024, 3:21 p.m. UTC
Add a new testcase for [1] commit in ext4 online resize testsuite.

Link: https://lore.kernel.org/linux-ext4/20240927133329.1015041-1-libaokun@huaweicloud.com [1]
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
---
 tests/ext4/032     |  6 ++++++
 tests/ext4/032.out | 18 ++++++++++++++++++
 2 files changed, 24 insertions(+)

Comments

Zorro Lang Nov. 12, 2024, 1:46 p.m. UTC | #1
On Mon, Nov 11, 2024 at 04:21:00PM +0100, Alexander Mikhalitsyn wrote:
> Add a new testcase for [1] commit in ext4 online resize testsuite.
> 
> Link: https://lore.kernel.org/linux-ext4/20240927133329.1015041-1-libaokun@huaweicloud.com [1]
> Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
> ---

This version looks good to me,

Reviewed-by: Zorro Lang <zlang@redhat.com>

>  tests/ext4/032     |  6 ++++++
>  tests/ext4/032.out | 18 ++++++++++++++++++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/tests/ext4/032 b/tests/ext4/032
> index 6bc3b61b..238ab178 100755
> --- a/tests/ext4/032
> +++ b/tests/ext4/032
> @@ -10,6 +10,9 @@
>  . ./common/preamble
>  _begin_fstest auto quick ioctl resize
>  
> +_fixed_by_kernel_commit 6121258c2b33 \
> +	"ext4: fix off by one issue in alloc_flex_gd()"
> +
>  BLK_SIZ=4096
>  CLUSTER_SIZ=4096
>  
> @@ -136,6 +139,9 @@ for CLUSTER_SIZ in 4096 16384 65536; do
>  
>  	## Extending a 2/3rd block group to 1280 block groups.
>  	ext4_online_resize $(c2b 24576) $(c2b 41943040)
> +
> +	# tests for "ext4: fix off by one issue in alloc_flex_gd()"
> +	ext4_online_resize $(c2b 6400) $(c2b 786432)
>  done
>  
>  status=0
> diff --git a/tests/ext4/032.out b/tests/ext4/032.out
> index b372b014..d5d75c9e 100644
> --- a/tests/ext4/032.out
> +++ b/tests/ext4/032.out
> @@ -60,6 +60,12 @@ QA output created by 032
>  +++ resize fs to 41943040
>  +++ umount fs
>  +++ check fs
> ++++ truncate image file to 786432
> ++++ create fs on image file 6400
> ++++ mount image file
> ++++ resize fs to 786432
> ++++ umount fs
> ++++ check fs
>  ++ set cluster size to 16384
>  +++ truncate image file to 98304
>  +++ create fs on image file 65536
> @@ -115,6 +121,12 @@ QA output created by 032
>  +++ resize fs to 167772160
>  +++ umount fs
>  +++ check fs
> ++++ truncate image file to 3145728
> ++++ create fs on image file 25600
> ++++ mount image file
> ++++ resize fs to 3145728
> ++++ umount fs
> ++++ check fs
>  ++ set cluster size to 65536
>  +++ truncate image file to 393216
>  +++ create fs on image file 262144
> @@ -170,3 +182,9 @@ QA output created by 032
>  +++ resize fs to 671088640
>  +++ umount fs
>  +++ check fs
> ++++ truncate image file to 12582912
> ++++ create fs on image file 102400
> ++++ mount image file
> ++++ resize fs to 12582912
> ++++ umount fs
> ++++ check fs
> -- 
> 2.43.0
>
Baokun Li Nov. 14, 2024, 4:03 a.m. UTC | #2
On 2024/11/11 23:21, Alexander Mikhalitsyn wrote:
> Add a new testcase for [1] commit in ext4 online resize testsuite.
>
> Link: https://lore.kernel.org/linux-ext4/20240927133329.1015041-1-libaokun@huaweicloud.com [1]
> Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Looks good, thanks for the patch!

Reviewed-by: Baokun Li <libaokun1@huawei.com>
> ---
>   tests/ext4/032     |  6 ++++++
>   tests/ext4/032.out | 18 ++++++++++++++++++
>   2 files changed, 24 insertions(+)
>
> diff --git a/tests/ext4/032 b/tests/ext4/032
> index 6bc3b61b..238ab178 100755
> --- a/tests/ext4/032
> +++ b/tests/ext4/032
> @@ -10,6 +10,9 @@
>   . ./common/preamble
>   _begin_fstest auto quick ioctl resize
>   
> +_fixed_by_kernel_commit 6121258c2b33 \
> +	"ext4: fix off by one issue in alloc_flex_gd()"
> +
>   BLK_SIZ=4096
>   CLUSTER_SIZ=4096
>   
> @@ -136,6 +139,9 @@ for CLUSTER_SIZ in 4096 16384 65536; do
>   
>   	## Extending a 2/3rd block group to 1280 block groups.
>   	ext4_online_resize $(c2b 24576) $(c2b 41943040)
> +
> +	# tests for "ext4: fix off by one issue in alloc_flex_gd()"
> +	ext4_online_resize $(c2b 6400) $(c2b 786432)
>   done
>   
>   status=0
> diff --git a/tests/ext4/032.out b/tests/ext4/032.out
> index b372b014..d5d75c9e 100644
> --- a/tests/ext4/032.out
> +++ b/tests/ext4/032.out
> @@ -60,6 +60,12 @@ QA output created by 032
>   +++ resize fs to 41943040
>   +++ umount fs
>   +++ check fs
> ++++ truncate image file to 786432
> ++++ create fs on image file 6400
> ++++ mount image file
> ++++ resize fs to 786432
> ++++ umount fs
> ++++ check fs
>   ++ set cluster size to 16384
>   +++ truncate image file to 98304
>   +++ create fs on image file 65536
> @@ -115,6 +121,12 @@ QA output created by 032
>   +++ resize fs to 167772160
>   +++ umount fs
>   +++ check fs
> ++++ truncate image file to 3145728
> ++++ create fs on image file 25600
> ++++ mount image file
> ++++ resize fs to 3145728
> ++++ umount fs
> ++++ check fs
>   ++ set cluster size to 65536
>   +++ truncate image file to 393216
>   +++ create fs on image file 262144
> @@ -170,3 +182,9 @@ QA output created by 032
>   +++ resize fs to 671088640
>   +++ umount fs
>   +++ check fs
> ++++ truncate image file to 12582912
> ++++ create fs on image file 102400
> ++++ mount image file
> ++++ resize fs to 12582912
> ++++ umount fs
> ++++ check fs
diff mbox series

Patch

diff --git a/tests/ext4/032 b/tests/ext4/032
index 6bc3b61b..238ab178 100755
--- a/tests/ext4/032
+++ b/tests/ext4/032
@@ -10,6 +10,9 @@ 
 . ./common/preamble
 _begin_fstest auto quick ioctl resize
 
+_fixed_by_kernel_commit 6121258c2b33 \
+	"ext4: fix off by one issue in alloc_flex_gd()"
+
 BLK_SIZ=4096
 CLUSTER_SIZ=4096
 
@@ -136,6 +139,9 @@  for CLUSTER_SIZ in 4096 16384 65536; do
 
 	## Extending a 2/3rd block group to 1280 block groups.
 	ext4_online_resize $(c2b 24576) $(c2b 41943040)
+
+	# tests for "ext4: fix off by one issue in alloc_flex_gd()"
+	ext4_online_resize $(c2b 6400) $(c2b 786432)
 done
 
 status=0
diff --git a/tests/ext4/032.out b/tests/ext4/032.out
index b372b014..d5d75c9e 100644
--- a/tests/ext4/032.out
+++ b/tests/ext4/032.out
@@ -60,6 +60,12 @@  QA output created by 032
 +++ resize fs to 41943040
 +++ umount fs
 +++ check fs
++++ truncate image file to 786432
++++ create fs on image file 6400
++++ mount image file
++++ resize fs to 786432
++++ umount fs
++++ check fs
 ++ set cluster size to 16384
 +++ truncate image file to 98304
 +++ create fs on image file 65536
@@ -115,6 +121,12 @@  QA output created by 032
 +++ resize fs to 167772160
 +++ umount fs
 +++ check fs
++++ truncate image file to 3145728
++++ create fs on image file 25600
++++ mount image file
++++ resize fs to 3145728
++++ umount fs
++++ check fs
 ++ set cluster size to 65536
 +++ truncate image file to 393216
 +++ create fs on image file 262144
@@ -170,3 +182,9 @@  QA output created by 032
 +++ resize fs to 671088640
 +++ umount fs
 +++ check fs
++++ truncate image file to 12582912
++++ create fs on image file 102400
++++ mount image file
++++ resize fs to 12582912
++++ umount fs
++++ check fs