3 # convert ext2/3/4 images to btrfs images, and make sure the results are
11 echo "$*" | tee -a convert-tests-results.txt
15 rm -f convert-tests-results.txt
21 echo "creating ext image with: $*" >> convert-tests-results.txt
22 # 256MB is the smallest acceptable btrfs image.
23 dd if=/dev/zero of=$here/test.img bs=1024 count=$((256*1024)) \
24 >> convert-tests-results.txt 2>&1 || _fail "dd failed"
25 $* -F $here/test.img >> convert-tests-results.txt 2>&1 \
26 || _fail "filesystem create failed"
27 $here/btrfs-convert $here/test.img >> convert-tests-results.txt 2>&1 \
28 || _fail "btrfs-convert failed"
29 $here/btrfsck $here/test.img >> convert-tests-results.txt 2>&1 \
30 || _fail "btrfsck detected errors"
33 test "ext2, 4k blocksize" mke2fs -b 4096
34 test "ext3, 4k blocksize" mke2fs -j -b 4096
35 test "ext4, 4k blocksize" mke2fs -t ext4 -b 4096