diff options
author | David Sterba <dsterba@suse.com> | 2016-11-11 10:12:05 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-11-11 16:25:19 +0100 |
commit | 7dbb17dbb2ea65d22b573641c20c09eceabc652c (patch) | |
tree | 024cbba0d08bfdbaf00e79b8a1ddc4ffda66d38f /tests/fsck-tests.sh | |
parent | 8dc653f00338527b230617defd4e5971009d0e36 (diff) |
btrfs-progs: tests: add quotation around variables in support scripts
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests/fsck-tests.sh')
-rwxr-xr-x | tests/fsck-tests.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/fsck-tests.sh b/tests/fsck-tests.sh index 69ec57a0..e71b7119 100755 --- a/tests/fsck-tests.sh +++ b/tests/fsck-tests.sh @@ -3,13 +3,13 @@ # loop through all of our bad images and make sure fsck repairs them properly LANG=C -SCRIPT_DIR=$(dirname $(readlink -f $0)) -TOP=$(readlink -f $SCRIPT_DIR/../) +SCRIPT_DIR=$(dirname $(readlink -f "$0")) +TOP=$(readlink -f "$SCRIPT_DIR/../") TEST_DEV=${TEST_DEV:-} RESULTS="$TOP/tests/fsck-tests-results.txt" IMAGE="$TOP/tests/test.img" -source $TOP/tests/common +source "$TOP/tests/common" export TOP export RESULTS @@ -17,7 +17,7 @@ export LANG export IMAGE export TEST_DEV -rm -f $RESULTS +rm -f "$RESULTS" # test rely on corrupting blocks tool check_prereq btrfs-corrupt-block @@ -30,8 +30,8 @@ run_one_test() { testname="$1" echo " [TEST/fsck] $(basename $testname)" - cd $testname - echo "=== Entering $testname" >> $RESULTS + cd "$testname" + echo "=== Entering $testname" >> "$RESULTS" if [ -x test.sh ]; then # Type 2 ./test.sh @@ -42,7 +42,7 @@ run_one_test() { # Type 1 check_all_images `pwd` fi - cd $TOP + cd "$TOP" } # Each dir contains one type of error for btrfsck test. @@ -58,7 +58,7 @@ run_one_test() { # This is for case btrfs-image can't dump or case needs extra # check/verify -for i in $(find $TOP/tests/fsck-tests -maxdepth 1 -mindepth 1 -type d \ +for i in $(find "$TOP/tests/fsck-tests" -maxdepth 1 -mindepth 1 -type d \ ${TEST:+-name "$TEST"} | sort) do run_one_test "$i" |