-#
-# It's GPL, same as everything else in this tree.
-#
-
-here=`pwd`
-TEST_DEV=
-TEST_MNT=
-RESULT="fsck-tests-results.txt"
-
-_fail()
-{
- echo "$*" | tee -a $RESULT
- exit 1
-}
-
-run_check()
-{
- echo "############### $@" >> $RESULT 2>&1
- "$@" >> $RESULT 2>&1 || _fail "failed: $@"
-}
-
-rm -f $RESULT
-
-# test rely on corrupting blocks tool
-run_check make btrfs-corrupt-block
-
-# Some broken filesystem images are kept as .img files, created by the tool
-# btrfs-image, and others are kept as .tar.xz files that contain raw filesystem
-# image (the backing file of a loop device, as a sparse file). The reason for
-# keeping some as tarballs of raw images is that for these cases btrfs-image
-# isn't able to preserve all the (bad) filesystem structure for some reason.
-for i in $(find $here/tests/fsck-tests -name '*.img' -o -name '*.tar.xz' | sort)
-do
- echo " [TEST] $(basename $i)"
- echo "testing image $i" >> $RESULT