For ext3/4 image whose size less than 512M, this case fails. When format a ext3/4 image without specifing the size of blocks -b, mke2fs will determine block-size heuristically by the filesystem size and the expected usage of the filesystem. If the image size less than 512M and no usage of the filesystem specified, the block size is set to 1024, so the output of 'du -k du.testdir': on ext4: 81 du.testdir/ on ext3: 83 du.testdir/ These are the same results with output of du from coreutils.
Update test case to handle these situations. Signed-off-by: Kang Kai <[email protected]> --- testsuite/du/du-k-works | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/testsuite/du/du-k-works b/testsuite/du/du-k-works index 36dcaa8..fcb64df 100644 --- a/testsuite/du/du-k-works +++ b/testsuite/du/du-k-works @@ -3,5 +3,7 @@ cd du.testdir dd if=/dev/zero of=file1 bs=1k count=64 2>/dev/null dd if=/dev/zero of=file2 bs=1k count=16 2>/dev/null test x"`busybox du -k .`" = x"80 ." \ + -o x"`busybox du -k .`" = x"81 ." \ + -o x"`busybox du -k .`" = x"83 ." \ -o x"`busybox du -k .`" = x"84 ." \ -o x"`busybox du -k .`" = x"88 ." -- 1.7.5.4 _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
