aboutsummaryrefslogtreecommitdiff
path: root/util-linux/mkfs_ext2_test.sh
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-10-20 17:47:23 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-10-20 17:47:23 +0200
commitc708a6d000fb26d17773dfdf0bee96d433f18b08 (patch)
treeb08a3e247ee905736c5aaaec66c54c0a70699083 /util-linux/mkfs_ext2_test.sh
parent82d6433abe251d8d7a43417af392b638f868afe5 (diff)
downloadbusybox-c708a6d000fb26d17773dfdf0bee96d433f18b08.tar.gz
mkfs_ext2: further work on small images
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/mkfs_ext2_test.sh')
-rwxr-xr-xutil-linux/mkfs_ext2_test.sh41
1 files changed, 20 insertions, 21 deletions
diff --git a/util-linux/mkfs_ext2_test.sh b/util-linux/mkfs_ext2_test.sh
index 4bc5f1ea9..a636de561 100755
--- a/util-linux/mkfs_ext2_test.sh
+++ b/util-linux/mkfs_ext2_test.sh
@@ -45,31 +45,30 @@ test_mke2fs() {
# -:bbox +:standard
-# kilobytes=60 is the minimal allowed size.
-#
-# kilobytes=8378 is the first value where we differ from std:
-# +warning: 185 blocks unused
-# Filesystem label=
-# OS type: Linux
-# Block size=1024 (log=0)
-# Fragment size=1024 (log=0)
-# -2096 inodes, 8378 blocks
-# +2096 inodes, 8193 blocks
-# 418 blocks reserved for the super user
-# First data block=1
-# -2 block groups
-# +1 block groups
-# 8192 blocks per group, 8192 fragments per group
-# -1048 inodes per group
-# -Superblock backups stored on blocks:
-# -8193
-# +2096 inodes per group
-#
+# kilobytes=60 is the minimal allowed size
kilobytes=60
while true; do
test_mke2fs || exit 1
: $((kilobytes++))
- test $kilobytes = 300000 && break
+ test $kilobytes = 200 && break
+done
+
+# Transition from one block group to two
+# fails in [8378..8410] range
+kilobytes=$((8*1024 - 20))
+while true; do
+ test_mke2fs #|| exit 1
+ : $((kilobytes++))
+ test $kilobytes = $((8*1024 + 300)) && break
+done
+
+# Transition from two block groups to three
+# works
+kilobytes=$((16*1024 - 40))
+while true; do
+ test_mke2fs || exit 1
+ : $((kilobytes++))
+ test $kilobytes = $((16*1024 + 500)) && break
done
exit