6 SCRIPT_DIR=$(dirname $(readlink -f "$0"))
7 TOP=$(readlink -f "$SCRIPT_DIR/../")
9 RESULTS="$TOP/tests/misc-tests-results.txt"
10 IMAGE="$TOP/tests/test.img"
12 source "$TOP/tests/common"
22 # test rely on corrupting blocks tool
23 check_prereq btrfs-corrupt-block
24 check_prereq btrfs-image
25 check_prereq btrfstune
27 check_prereq btrfs-zero-log
28 check_prereq btrfs-find-root
29 check_prereq btrfs-select-super
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 if [[ $TEST_LOG =~ dump ]]; then
46 _fail "test failed for case $(basename $i)"