diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-20 13:34:16 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-20 13:34:16 +0200 |
commit | 95484c870645ebda34c9202799f3b31111b90e4f (patch) | |
tree | 0de582e09d00aa666be04c391ec8abba41afb03d /util-linux/mkfs_ext2_test.sh | |
parent | 69f2e2cdeba8237d51fe63aa32efbd178ce02663 (diff) | |
download | busybox-w32-95484c870645ebda34c9202799f3b31111b90e4f.tar.gz busybox-w32-95484c870645ebda34c9202799f3b31111b90e4f.tar.bz2 busybox-w32-95484c870645ebda34c9202799f3b31111b90e4f.zip |
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-x | util-linux/mkfs_ext2_test.sh | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/util-linux/mkfs_ext2_test.sh b/util-linux/mkfs_ext2_test.sh index 9c20b3b89..53f15d2c8 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 | |||
23 | test_mke2fs() { | 23 | test_mke2fs() { |
24 | echo Testing $kilobytes | 24 | echo Testing $kilobytes |
25 | 25 | ||
26 | run_test '/usr/bin/mke2fs' image_std || return 1 | 26 | run_test '/sbin/mke2fs' image_std || return 1 |
27 | run_test './busybox mke2fs' image_bb || return 1 | 27 | run_test './busybox mke2fs' image_bb || return 1 |
28 | 28 | ||
29 | diff -ua image_bb.out image_std.out >image.out.diff || { | 29 | diff -ua image_bb.out image_std.out >image.out.diff || { |
@@ -31,9 +31,33 @@ test_mke2fs() { | |||
31 | return 1 | 31 | return 1 |
32 | } | 32 | } |
33 | 33 | ||
34 | e2fsck -f -n image_bb >/dev/null 2>&1 || { echo "e2fsck error on image_bb"; exit 1; } | 34 | e2fsck -f -n image_bb >/dev/null 2>&1 || { |
35 | echo "e2fsck error on image_bb" | ||
36 | e2fsck -f -n image_bb | ||
37 | exit 1 | ||
38 | } | ||
35 | } | 39 | } |
36 | 40 | ||
41 | # Should start from kilobytes=60, but e2fsck complains on it: | ||
42 | # e2fsck 1.41.4 (27-Jan-2009) | ||
43 | # Pass 1: Checking inodes, blocks, and sizes | ||
44 | # Pass 2: Checking directory structure | ||
45 | # Pass 3: Checking directory connectivity | ||
46 | # Pass 4: Checking reference counts | ||
47 | # Pass 5: Checking group summary information | ||
48 | # Inode bitmap differences: +(9--11) | ||
49 | # Free inodes count wrong for group #0 (5, counted=8). | ||
50 | # Directories count wrong for group #0 (2, counted=1). | ||
51 | # Free inodes count wrong (5, counted=8). | ||
52 | # image_bb: 11/16 files (0.0% non-contiguous), 9/60 blocks | ||
53 | kilobytes=68 | ||
54 | while true; do | ||
55 | test_mke2fs #|| exit 1 | ||
56 | : $((kilobytes++)) | ||
57 | done | ||
58 | exit | ||
59 | |||
60 | # Specific sizes with known differences: | ||
37 | # -:bbox +:standard | 61 | # -:bbox +:standard |
38 | 62 | ||
39 | # -6240 inodes, 24908 blocks | 63 | # -6240 inodes, 24908 blocks |
@@ -58,14 +82,14 @@ kilobytes=1218 test_mke2fs | |||
58 | # +2064 inodes per group | 82 | # +2064 inodes per group |
59 | kilobytes=57696 test_mke2fs | 83 | kilobytes=57696 test_mke2fs |
60 | 84 | ||
61 | # This size results in "warning: 75 blocks unused" | ||
62 | kilobytes=98380 test_mke2fs | ||
63 | |||
64 | # -warning: 239 blocks unused. | 85 | # -warning: 239 blocks unused. |
65 | # +warning: 242 blocks unused. | 86 | # +warning: 242 blocks unused. |
66 | kilobytes=49395 test_mke2fs | 87 | kilobytes=49395 test_mke2fs |
67 | 88 | ||
89 | ## This size results in "warning: 75 blocks unused" | ||
90 | #kilobytes=98380 test_mke2fs | ||
91 | |||
68 | while true; do | 92 | while true; do |
69 | kilobytes=$(( (RANDOM*RANDOM) % 1000000 + 2000)) | 93 | kilobytes=$(( (RANDOM*RANDOM) % 1000000 + 60)) |
70 | test_mke2fs || exit 1 | 94 | test_mke2fs || exit 1 |
71 | done | 95 | done |