summaryrefslogtreecommitdiff
path: root/tests/convert-tests
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-06-03 17:08:43 +0200
committerDavid Sterba <dsterba@suse.com>2016-06-03 17:08:43 +0200
commit75bf151ba3d31af27ef7af10fef0ae97295d4318 (patch)
tree9d142f7c2ac986827d6118771b4e5416620e3343 /tests/convert-tests
parent933de7e03439b3599f493b8baf94a5ea7befccdb (diff)
btrfs-progs: tests: 004-ext2-backup-superblock-ranges, use common helpers for image loop
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests/convert-tests')
-rwxr-xr-xtests/convert-tests/004-ext2-backup-superblock-ranges/test.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/convert-tests/004-ext2-backup-superblock-ranges/test.sh b/tests/convert-tests/004-ext2-backup-superblock-ranges/test.sh
index bc6b5ea6..d85e4de4 100755
--- a/tests/convert-tests/004-ext2-backup-superblock-ranges/test.sh
+++ b/tests/convert-tests/004-ext2-backup-superblock-ranges/test.sh
@@ -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