btrfs-progs: tests: 004-ext2-backup-superblock-ranges, use common helpers for image loop

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2016-06-03 17:08:43 +02:00
parent 933de7e034
commit 75bf151ba3

View File

@ -21,8 +21,9 @@ check_global_prereq xzcat
setup_root_helper
prepare_test_dev 512M
for src in $(find . -iname "*.e2image.raw.xz"); do
TEST_DEV=$(extract_image "$src")
# override common function
function check_image() {
TEST_DEV="$1"
run_check e2fsck -n -f $TEST_DEV
run_check $TOP/btrfs-convert $TEST_DEV
run_check $TOP/btrfs check $TEST_DEV
@ -37,4 +38,6 @@ for src in $(find . -iname "*.e2image.raw.xz"); do
run_check e2fsck -n -f $TEST_DEV
rm -f $TEST_DEV
done
}
check_all_images