8 SCRIPT_DIR
=$
(dirname $
(readlink
-f $0))
9 TOP
=$
(readlink
-f $SCRIPT_DIR/..
/)
10 TEST_DEV
=${TEST_DEV:-}
11 RESULTS
="$TOP/tests/mkfs-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 check_prereq mkfs.btrfs
29 # The tests are driven by their custom script called 'test.sh'
31 for i
in $
(find $TOP/tests
/mkfs-tests
-maxdepth 1 -mindepth 1 -type d \
32 ${TEST:+-name "$TEST"} |
sort)
34 echo " [TEST] $(basename $i)"
36 echo "=== Entering $i" >> $RESULTS
37 if [ -x test.sh
]; then
40 _fail
"test failed for case $(basename $i)"