diff mbox series

kvm-xfstests: Add 1k config for ext2

Message ID c5dea04b0e955402258835f2c880ceaf3b1f0ab5.1709721921.git.ritesh.list@gmail.com
State Accepted
Headers show
Series kvm-xfstests: Add 1k config for ext2 | expand

Commit Message

Ritesh Harjani (IBM) March 6, 2024, 10:59 a.m. UTC
This adds 1k config option in test-appliance for ext2.
This will come in handy for testing bs < ps path for ext2
for e.g. it's useful in testing iomap bufferd-io work going 
on for ext2.

Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
---
 test-appliance/files/root/fs/ext2/cfg/1k      |  4 ++++
 .../files/root/fs/ext2/cfg/1k.exclude         | 19 +++++++++++++++++++
 .../files/root/fs/ext2/cfg/all.list           |  1 +
 test-appliance/files/root/fs/ext2/config      |  6 ++++--
 4 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 test-appliance/files/root/fs/ext2/cfg/1k
 create mode 100644 test-appliance/files/root/fs/ext2/cfg/1k.exclude

Comments

Theodore Ts'o April 12, 2024, 2:16 a.m. UTC | #1
On Wed, Mar 06, 2024 at 04:29:05PM +0530, Ritesh Harjani (IBM) wrote:
> This adds 1k config option in test-appliance for ext2.
> This will come in handy for testing bs < ps path for ext2
> for e.g. it's useful in testing iomap bufferd-io work going 
> on for ext2.
> 
> Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>

Thanks, applied.

					- Ted
diff mbox series

Patch

diff --git a/test-appliance/files/root/fs/ext2/cfg/1k b/test-appliance/files/root/fs/ext2/cfg/1k
new file mode 100644
index 0000000..d669104
--- /dev/null
+++ b/test-appliance/files/root/fs/ext2/cfg/1k
@@ -0,0 +1,4 @@ 
+SIZE=small
+export EXT_MKFS_OPTIONS="-b 1024"
+export EXT_MOUNT_OPTIONS=""
+TESTNAME="Ext2 1k block"
diff --git a/test-appliance/files/root/fs/ext2/cfg/1k.exclude b/test-appliance/files/root/fs/ext2/cfg/1k.exclude
new file mode 100644
index 0000000..215dd2c
--- /dev/null
+++ b/test-appliance/files/root/fs/ext2/cfg/1k.exclude
@@ -0,0 +1,19 @@ 
+// exclude file for ext2/1k copied from ext4/1k
+
+// The test fails due to too many block group descriptors when the
+// block size is 1k
+ext4/033
+
+// This test tries to create 65536 directories, and with 1k blocks,
+// and long names, we run out of htree depth
+ext4/045
+
+// This test creates too many inodes on when the block size is 1k
+// without using special mkfs.ext4 options to change the inode size.
+// This test is a bit bogus anyway, and uses a bunch of magic calculations
+// where it's not clear what it was originally trying to test in the
+// first place.  So let's just skip it for now.
+generic/273
+
+// This test creates too many extended attributes to fit in a 1k block
+generic/454
diff --git a/test-appliance/files/root/fs/ext2/cfg/all.list b/test-appliance/files/root/fs/ext2/cfg/all.list
index 4ad96d5..2d0e07f 100644
--- a/test-appliance/files/root/fs/ext2/cfg/all.list
+++ b/test-appliance/files/root/fs/ext2/cfg/all.list
@@ -1 +1,2 @@ 
 default
+1k
diff --git a/test-appliance/files/root/fs/ext2/config b/test-appliance/files/root/fs/ext2/config
index e2ad484..a2a333c 100644
--- a/test-appliance/files/root/fs/ext2/config
+++ b/test-appliance/files/root/fs/ext2/config
@@ -28,6 +28,7 @@  function format_filesystem()
 
 function setup_mount_opts()
 {
+    export MKFS_OPTIONS="-q $EXT_MKFS_OPTIONS"
     if test -n "$MNTOPTS" ; then
 	if test -n "$EXT_MOUNT_OPTIONS" ; then
             export EXT_MOUNT_OPTIONS="$EXT_MOUNT_OPTIONS,$MNTOPTS"
@@ -39,12 +40,12 @@  function setup_mount_opts()
 
 function get_mkfs_opts()
 {
-    echo "$MKFS_OPTIONS"
+    echo "$EXT_MKFS_OPTIONS"
 }
 
 function show_mkfs_opts()
 {
-    echo MKFS_OPTIONS: "$MKFS_OPTIONS"
+    echo EXT_MKFS_OPTIONS: "$EXT_MKFS_OPTIONS"
 }
 
 function show_mount_opts()
@@ -60,5 +61,6 @@  function test_name_alias()
 function reset_vars()
 {
     unset EXT_MOUNT_OPTIONS
+    unset EXT_MKFS_OPTIONS
     unset MKFS_OPTIONS
 }