1#!/bin/sh 2# simple test which creates a dummy file system image, then use bmaptool create 3# and bmaptool copy to copy it to another file 4 5set -xeu 6 7# create the necessary test files 8dd if=/dev/zero of=disk.img bs=2M count=1 9mkfs.ext4 disk.img 10fallocate -d disk.img 11dd if=/dev/zero of=copy.img bs=2M count=1 12 13# do a test copy of the file system image 14bmaptool create -o disk.img.bmap disk.img 15bmaptool copy disk.img copy.img 16cmp disk.img copy.img 17