btrfs-progs: tests: add fallback to current directory for check_all_images

Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2016-11-18 19:21:02 +01:00
parent 3a8234ee73
commit d4ce61f7a2
4 changed files with 7 additions and 3 deletions

View File

@ -202,6 +202,10 @@ check_all_images()
local extracted
dir="$1"
if [ -z "$dir" ]; then
dir=.
fi
_assert_path "$dir"
for image in $(find "$dir" \( -iname '*.img' -o \
-iname '*.img.xz' -o \
-iname '*.raw' -o \

View File

@ -43,7 +43,7 @@ run_one_test() {
fi
else
# Type 1
check_all_images `pwd`
check_all_images
fi
cd "$TOP"
}

View File

@ -16,4 +16,4 @@ check_image() {
fi
}
check_all_images "."
check_all_images

View File

@ -14,4 +14,4 @@ check_image()
run_check $TOP/btrfs check "$1"
}
check_all_images "."
check_all_images