1023f742b8
This patch implements a simple test in which a dummy file system image is created, then `bmaptool create` and `bmaptool copy` are used to copy it to another file. Signed-off-by: Nicolas Carrier <nicolas.carrier@orolia.com> [Thomas: several reworks, add myself to DEVELOPERS] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> [yann.morin.1998@free.fr: check the two files are identical] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
17 lines
446 B
Bash
Executable File
17 lines
446 B
Bash
Executable File
#!/bin/sh
|
|
# simple test which creates a dummy file system image, then use bmaptool create
|
|
# and bmaptool copy to copy it to another file
|
|
|
|
set -xeu
|
|
|
|
# create the necessary test files
|
|
dd if=/dev/zero of=disk.img bs=2M count=1
|
|
mkfs.ext4 disk.img
|
|
fallocate -d disk.img
|
|
dd if=/dev/zero of=copy.img bs=2M count=1
|
|
|
|
# do a test copy of the file system image
|
|
bmaptool create -o disk.img.bmap disk.img
|
|
bmaptool copy disk.img copy.img
|
|
cmp disk.img copy.img
|