From d4ce61f7a2905c914e00ff764ecfa2554d1726b7 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Fri, 18 Nov 2016 19:21:02 +0100 Subject: [PATCH] btrfs-progs: tests: add fallback to current directory for check_all_images Reported-by: Tsutomu Itoh Signed-off-by: David Sterba --- tests/common | 4 ++++ tests/fsck-tests.sh | 2 +- tests/fsck-tests/022-qgroup-rescan-halfway/test.sh | 2 +- tests/fsck-tests/023-qgroup-stack-overflow/test.sh | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/common b/tests/common index e653d4c..5430f82 100644 --- a/tests/common +++ b/tests/common @@ -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 \ diff --git a/tests/fsck-tests.sh b/tests/fsck-tests.sh index d5fc3d1..44cca1b 100755 --- a/tests/fsck-tests.sh +++ b/tests/fsck-tests.sh @@ -43,7 +43,7 @@ run_one_test() { fi else # Type 1 - check_all_images `pwd` + check_all_images fi cd "$TOP" } diff --git a/tests/fsck-tests/022-qgroup-rescan-halfway/test.sh b/tests/fsck-tests/022-qgroup-rescan-halfway/test.sh index 5b114ee..1dc8f8f 100755 --- a/tests/fsck-tests/022-qgroup-rescan-halfway/test.sh +++ b/tests/fsck-tests/022-qgroup-rescan-halfway/test.sh @@ -16,4 +16,4 @@ check_image() { fi } -check_all_images "." +check_all_images diff --git a/tests/fsck-tests/023-qgroup-stack-overflow/test.sh b/tests/fsck-tests/023-qgroup-stack-overflow/test.sh index e8bf3fa..a304eac 100755 --- a/tests/fsck-tests/023-qgroup-stack-overflow/test.sh +++ b/tests/fsck-tests/023-qgroup-stack-overflow/test.sh @@ -14,4 +14,4 @@ check_image() run_check $TOP/btrfs check "$1" } -check_all_images "." +check_all_images -- 2.7.4