diff mbox

[2/3] btrfs-progs: test/fsck/020: Cleanup custom check function by overriding check_image function

Message ID 20171110013419.15159-2-wqu@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Qu Wenruo Nov. 10, 2017, 1:34 a.m. UTC
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 tests/fsck-tests/020-extent-ref-cases/test.sh | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/tests/fsck-tests/020-extent-ref-cases/test.sh b/tests/fsck-tests/020-extent-ref-cases/test.sh
index 1e1e4e2386fb..f5c6591a92b8 100755
--- a/tests/fsck-tests/020-extent-ref-cases/test.sh
+++ b/tests/fsck-tests/020-extent-ref-cases/test.sh
@@ -19,12 +19,11 @@  source "$TOP/tests/common"
 
 check_prereq btrfs
 
-for img in *.img *.raw.xz
-do
-	image=$(extract_image "$img")
+check_image() {
+	local image
 
-	# Since the return value bug is already fixed, we don't need
-	# the old grep hack to detect bug.
+	image=$1
 	run_check "$TOP/btrfs" check "$image"
-	rm -f "$image"
-done
+}
+
+check_all_images