btrfs-progs/tests/misc-tests
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
..
001-btrfstune-features btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
002-uuid-rewrite btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
003-zero-log btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
004-shrink-fs btrfs-progs: tests: switch messages to _log 2019-07-26 17:46:42 +02:00
005-convert-progress-thread-crash btrfs-progs: tests: switch messages to _log 2019-07-26 17:46:42 +02:00
006-image-on-missing-device btrfs-progs: tests: fix typos in test comments 2018-11-26 17:53:43 +01:00
007-subvolume-sync btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
008-leaf-crossing-stripes btrfs-progs: tests: add shell quotes to misc test scripts 2018-03-30 22:15:55 +02:00
009-subvolume-sync-must-wait btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
010-convert-delete-ext2-subvol btrfs-progs: tests: add shell quotes to misc test scripts 2018-03-30 22:15:55 +02:00
011-delete-missing-device btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
012-find-root-no-result btrfs-progs: tests: add shell quotes to misc test scripts 2018-03-30 22:15:55 +02:00
013-subvolume-sync-crash btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
014-filesystem-label btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
015-dump-super-garbage btrfs-progs: tests: add shell quotes to misc test scripts 2018-03-30 22:15:55 +02:00
016-send-clone-src btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
017-recv-stream-malformatted btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
018-recv-end-of-stream btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
019-receive-clones-on-mounted-subvol btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
020-fix-superblock-corruption btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
021-image-multi-devices btrfs-progs: tests: fix misc/021 when restoring overlapping stale data 2019-10-14 17:28:02 +02:00
022-filesystem-du-on-empty-subvol btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
023-device-usage-with-missing-device btrfs-progs: tests: add shell quotes to misc test scripts 2018-03-30 22:15:55 +02:00
024-inspect-internal-rootid btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
025-zstd-compression btrfs-progs: introduce TEST_TOP and INTERNAL_BIN for tests 2018-02-13 15:41:32 +01:00
026-image-non-printable-chars btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
027-subvol-list-deleted-toplevel btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
028-superblock-recover btrfs-progs: tests: drop keyword function 2019-07-04 15:36:01 +02:00
029-send-p-different-mountpoints btrfs-progs: misc-tests/029: exit manually after run_mayfail() 2019-07-03 20:49:04 +02:00
030-missing-device-image btrfs-progs: tests: Test if btrfs-image can handle RAID1 missing device 2018-03-30 22:15:55 +02:00
031-qgroup-parent-child-relation btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
032-bad-item-ptr btrfs-progs: tests: Add test case for dump-tree on heavily corrupted leaf 2018-06-07 16:37:32 +02:00
033-filename-length-limit btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
034-metadata-uuid btrfs-progs: tests: Check for metadata_uuid feature in misc-tests/034-metadata-uuid 2019-09-04 16:06:30 +02:00
035-receive-common-mount-point-prefix btrfs-progs: tests: disable misc-tests/035-receive-common-mount-point-prefix 2019-05-17 13:02:22 +02:00
036-receive-dump-invalid-stream btrfs-progs: tests: stream dump and max_error counts 2019-05-17 12:32:38 +02:00
037-fi-show-on-new-file btrfs-progs: tests: Test fs on image files is correctly recognised 2019-06-05 20:27:31 +02:00