bc: convert to "G trick" - this returns bc to zero bss increase
[oweals/busybox.git] / util-linux / mkfs_ext2_test.sh
index 0aa98185a4726997338c0995c8c43eeab7c1758b..df22963f25f9cec8c84aef3f3379f1a10dd80a93 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/sh
 
-system_mke2fs='/sbin/mke2fs'
+# Disabling features we do not match exactly:
+system_mke2fs='/sbin/mke2fs -O ^resize_inode'
 bbox_mke2fs='./busybox mke2fs'
 
 gen_image() { # params: mke2fs_invocation image_name
@@ -46,16 +47,16 @@ test_mke2fs() {
 kilobytes=60
 while true; do
     test_mke2fs || exit 1
-    : $((kilobytes++))
+    kilobytes=$((kilobytes+1))
     test $kilobytes = 200 && break
 done
 
 # Transition from one block group to two
-# fails in [8378..8410] range
+# fails in [8378..8410] range unless -O ^resize_inode
 kilobytes=$((1 * 8*1024 - 50))
 while true; do
-    test_mke2fs #|| exit 1
-    : $((kilobytes++))
+    test_mke2fs || exit 1
+    kilobytes=$((kilobytes+1))
     test $kilobytes = $((1 * 8*1024 + 300)) && break
 done
 
@@ -64,16 +65,16 @@ done
 kilobytes=$((2 * 8*1024 - 50))
 while true; do
     test_mke2fs || exit 1
-    : $((kilobytes++))
+    kilobytes=$((kilobytes+1))
     test $kilobytes = $((2 * 8*1024 + 400)) && break
 done
 
 # Transition from 3 block groups to 4
-# fails in [24825..24922] range
+# fails in [24825..24922] range unless -O ^resize_inode
 kilobytes=$((3 * 8*1024 - 50))
 while true; do
-    test_mke2fs #|| exit 1
-    : $((kilobytes++))
+    test_mke2fs || exit 1
+    kilobytes=$((kilobytes+1))
     test $kilobytes = $((3 * 8*1024 + 500)) && break
 done
 
@@ -82,22 +83,22 @@ done
 kilobytes=$((4 * 8*1024 - 50))
 while true; do
     test_mke2fs || exit 1
-    : $((kilobytes++))
+    kilobytes=$((kilobytes+1))
     test $kilobytes = $((4 * 8*1024 + 600)) && break
 done
 
 # Transition from 5 block groups to 6
-# fails in [41230..41391] range
+# fails in [41230..41391] range unless -O ^resize_inode
 kilobytes=$((5 * 8*1024 - 50))
 while true; do
-    test_mke2fs #|| exit 1
-    : $((kilobytes++))
+    test_mke2fs || exit 1
+    kilobytes=$((kilobytes+1))
     test $kilobytes = $((5 * 8*1024 + 700)) && break
 done
 exit
 
 # Random sizes
 while true; do
-    kilobytes=$(( (RANDOM*RANDOM) % 1000000 + 60))
+    kilobytes=$(( (RANDOM*RANDOM) % 5000000 + 60))
     test_mke2fs || exit 1
 done