8 SCRIPT_DIR=$(dirname $(readlink -f $0))
9 TOP=$(readlink -f $SCRIPT_DIR/../)
10 TEST_DEV=${TEST_DEV:-}
11 RESULTS="$TOP/tests/misc-tests-results.txt"
12 IMAGE="$TOP/tests/test.img"
14 source $TOP/tests/common
16 # Allow child test to use $TOP and $RESULTS
19 # For custom script needs to verfiy recovery
21 # For tests that only use a loop device
26 # test rely on corrupting blocks tool
27 check_prereq btrfs-corrupt-block
28 check_prereq btrfs-image
29 check_prereq btrfstune
32 # The tests are driven by their custom script called 'test.sh'
34 for i in $(find $TOP/tests/misc-tests -maxdepth 1 -mindepth 1 -type d \
35 ${TEST:+-name "$TEST"} | sort)
37 echo " [TEST/misc] $(basename $i)"
39 echo "=== Entering $i" >> $RESULTS
40 if [ -x test.sh ]; then
43 _fail "test failed for case $(basename $i)"