summaryrefslogtreecommitdiff
path: root/util-linux/mkfs_ext2_test.sh
diff options
context:
space:
mode:
authorDenys Vlasenko2009-10-20 13:34:16 +0200
committerDenys Vlasenko2009-10-20 13:34:16 +0200
commit95484c870645ebda34c9202799f3b31111b90e4f (patch)
tree0de582e09d00aa666be04c391ec8abba41afb03d /util-linux/mkfs_ext2_test.sh
parent69f2e2cdeba8237d51fe63aa32efbd178ce02663 (diff)
downloadbusybox-95484c870645ebda34c9202799f3b31111b90e4f.zip
busybox-95484c870645ebda34c9202799f3b31111b90e4f.tar.gz
mkfs_ext2: further work by Vladimir
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.sh36
1 files changed, 30 insertions, 6 deletions
diff --git a/util-linux/mkfs_ext2_test.sh b/util-linux/mkfs_ext2_test.sh
index 9c20b3b..53f15d2 100755
--- a/util-linux/mkfs_ext2_test.sh
+++ b/util-linux/mkfs_ext2_test.sh
@@ -23,7 +23,7 @@ run_test() { # params: mke2fs_invocation image_name
test_mke2fs() {
echo Testing $kilobytes
- run_test '/usr/bin/mke2fs' image_std || return 1
+ run_test '/sbin/mke2fs' image_std || return 1
run_test './busybox mke2fs' image_bb || return 1
diff -ua image_bb.out image_std.out >image.out.diff || {
@@ -31,9 +31,33 @@ test_mke2fs() {
return 1
}
- e2fsck -f -n image_bb >/dev/null 2>&1 || { echo "e2fsck error on image_bb"; exit 1; }
+ e2fsck -f -n image_bb >/dev/null 2>&1 || {
+ echo "e2fsck error on image_bb"
+ e2fsck -f -n image_bb
+ exit 1
+ }
}
+# Should start from kilobytes=60, but e2fsck complains on it:
+# e2fsck 1.41.4 (27-Jan-2009)
+# Pass 1: Checking inodes, blocks, and sizes
+# Pass 2: Checking directory structure
+# Pass 3: Checking directory connectivity
+# Pass 4: Checking reference counts
+# Pass 5: Checking group summary information
+# Inode bitmap differences: +(9--11)
+# Free inodes count wrong for group #0 (5, counted=8).
+# Directories count wrong for group #0 (2, counted=1).
+# Free inodes count wrong (5, counted=8).
+# image_bb: 11/16 files (0.0% non-contiguous), 9/60 blocks
+kilobytes=68
+while true; do
+ test_mke2fs #|| exit 1
+ : $((kilobytes++))
+done
+exit
+
+# Specific sizes with known differences:
# -:bbox +:standard
# -6240 inodes, 24908 blocks
@@ -58,14 +82,14 @@ kilobytes=1218 test_mke2fs
# +2064 inodes per group
kilobytes=57696 test_mke2fs
-# This size results in "warning: 75 blocks unused"
-kilobytes=98380 test_mke2fs
-
# -warning: 239 blocks unused.
# +warning: 242 blocks unused.
kilobytes=49395 test_mke2fs
+## This size results in "warning: 75 blocks unused"
+#kilobytes=98380 test_mke2fs
+
while true; do
- kilobytes=$(( (RANDOM*RANDOM) % 1000000 + 2000))
+ kilobytes=$(( (RANDOM*RANDOM) % 1000000 + 60))
test_mke2fs || exit 1
done