summaryrefslogtreecommitdiff
path: root/tests/fsck-tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fsck-tests.sh')
-rwxr-xr-xtests/fsck-tests.sh24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/fsck-tests.sh b/tests/fsck-tests.sh
index 54bd3532..046b33de 100755
--- a/tests/fsck-tests.sh
+++ b/tests/fsck-tests.sh
@@ -5,25 +5,25 @@
# It's GPL, same as everything else in this tree.
#
-unset top
+unset TOP
unset LANG
LANG=C
-script_dir=$(dirname $(realpath $0))
-top=$(realpath $script_dir/../)
+SCRIPT_DIR=$(dirname $(realpath $0))
+TOP=$(realpath $SCRIPT_DIR/../)
TEST_DEV=${TEST_DEV:-}
-TEST_MNT=${TEST_MNT:-$top/tests/mnt}
-RESULT="$top/tests/fsck-tests-results.txt"
+TEST_MNT=${TEST_MNT:-$TOP/tests/mnt}
+RESULTS="$TOP/tests/fsck-tests-results.txt"
-source $top/tests/common
+source $TOP/tests/common
-# Allow child test to use $top and $RESULT
-export top
-export RESULT
+# Allow child test to use $TOP and $RESULTS
+export TOP
+export RESULTS
# For custom script needs to verfiy recovery
export TEST_MNT
export LANG
-rm -f $RESULT
+rm -f $RESULTS
mkdir -p $TEST_MNT || _fail "unable to create mount point on $TEST_MNT"
# test rely on corrupting blocks tool
@@ -44,7 +44,7 @@ check_prereq btrfs
# 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 | sort)
+for i in $(find $TOP/tests/fsck-tests -maxdepth 1 -mindepth 1 -type d | sort)
do
echo " [TEST] $(basename $i)"
cd $i
@@ -58,5 +58,5 @@ do
# Type 1
check_all_images `pwd`
fi
- cd $top
+ cd $TOP
done