btrfs-progs/tests/misc-tests/021-image-multi-devices
Anand Jain 3de68a0e87 btrfs-progs: tests: fix misc/021 when restoring overlapping stale data
As misc-tests/021 image dump is restored on the same original loop
device, this overlaps with the stale data and makes the test pass
falsely.

Fix this by using a new device for restore.

And also, the btrfs-image dump and restore doesn't restore the file
data, so any read on the files should be avoided. So instead of file
data use file stat data for the checksum.

Reported-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-10-14 17:28:02 +02:00
..
test.sh btrfs-progs: tests: fix misc/021 when restoring overlapping stale data 2019-10-14 17:28:02 +02:00