[PATCH] tests: Force inode table initialization for all tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently, depending on whether or not the ext4 module is loaded into
kernel and what version it is the inode table will, or will not be
initialized when the file system is resized. This is fine in practice,
however in out test suite we need more deterministic behavior.

Set RESIZE2FS_FORCE_ITABLE_INIT environment variable globally for all
tests so that the code doing the inode table initialization is
exercised as well and to make resize2fs output more deterministic.

Change the expected output of r_move_itable_nostride and
r_move_itable_realloc tests that previously failed only when the ext4
module was not laded into kernel.

Signed-off-by: Lukas Czerner <lczerner@xxxxxxxxxx>
---
 tests/r_fixup_lastbg_big/script     | 2 +-
 tests/r_move_itable_nostride/expect | 2 ++
 tests/r_move_itable_realloc/expect  | 2 ++
 tests/test_config                   | 2 ++
 4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/r_fixup_lastbg_big/script b/tests/r_fixup_lastbg_big/script
index 113831b7..a8ff0cac 100755
--- a/tests/r_fixup_lastbg_big/script
+++ b/tests/r_fixup_lastbg_big/script
@@ -15,7 +15,7 @@ $DEBUGFS -R "set_bg 2 flags 0" -w $TMPFILE > /dev/null 2>&1
 $DEBUGFS -R "set_bg 2 checksum 0xd318" -w $TMPFILE > /dev/null 2>&1
 $DUMPE2FS $TMPFILE 2>&1 | grep -A10 '^Group 2:' >> $OUT
 dd if=/dev/zero of=$TMPFILE bs=1 count=1 seek=$((1024 * 40000)) conv=notrunc >> $OUT 2> /dev/null
-RESIZE2FS_FORCE_ITABLE_INIT=1 $RESIZE2FS_EXE -f -p $TMPFILE >> $OUT 2>&1
+$RESIZE2FS_EXE -f -p $TMPFILE >> $OUT 2>&1
 $DUMPE2FS $TMPFILE 2>&1 | grep -A10 '^Group 2:' >> $OUT
 $E2FSCK -fy $TMPFILE >> $OUT 2>&1
 
diff --git a/tests/r_move_itable_nostride/expect b/tests/r_move_itable_nostride/expect
index 098cbfc5..4976e65e 100644
--- a/tests/r_move_itable_nostride/expect
+++ b/tests/r_move_itable_nostride/expect
@@ -1,6 +1,8 @@
 mke2fs -q -F -o Linux -b 1024 -i 1024 -E stride=8192 -t ext4 test.img 1024000
 resize2fs -p test.img 10240000
 Resizing the filesystem on test.img to 100000000 (1k) blocks.
+Begin pass 1 (max = 12082)
+Extending the inode table     ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 Begin pass 2 (max = 2062)
 Relocating blocks             ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 Begin pass 3 (max = 125)
diff --git a/tests/r_move_itable_realloc/expect b/tests/r_move_itable_realloc/expect
index 73b2fef0..1312d954 100644
--- a/tests/r_move_itable_realloc/expect
+++ b/tests/r_move_itable_realloc/expect
@@ -1,6 +1,8 @@
 mke2fs -q -F -o Linux -b 1024 -i 1024 -O ^resize_inode -t ext4 test.img 1024000
 resize2fs -p test.img 10240000
 Resizing the filesystem on test.img to 100000000 (1k) blocks.
+Begin pass 1 (max = 12082)
+Extending the inode table     ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 Begin pass 2 (max = 2061)
 Relocating blocks             ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 Begin pass 3 (max = 125)
diff --git a/tests/test_config b/tests/test_config
index 81fbf95e..ae619b55 100644
--- a/tests/test_config
+++ b/tests/test_config
@@ -51,3 +51,5 @@ EXT2FS_NO_MTAB_OK=yes
 export EXT2FS_NO_MTAB_OK
 E2FSPROGS_LIBMAGIC_SUPPRESS=yes
 export E2FSPROGS_LIBMAGIC_SUPPRESS
+RESIZE2FS_FORCE_ITABLE_INIT=1
+export RESIZE2FS_FORCE_ITABLE_INIT
-- 
2.17.1




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux