Skip to content

Commit

Permalink
Btrfs-progs: skip extent rebuild test if no testdev
Browse files Browse the repository at this point in the history
It is highly obnoxious to have to go put in a testdev when all you really want
is to run the quick image tests.  Make this part optional so if we don't have a
testdev specified we just don't run that particular test.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
  • Loading branch information
Josef Bacik committed Oct 3, 2014
1 parent 369aaba commit d9b978f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/fsck-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ run_check()

rm -f $RESULT

if [ -z $TEST_DEV ] || [ -z $TEST_MNT ];then
_fail "please set TEST_DEV and TEST_MNT"
fi

# test rely on corrupting blocks tool
run_check make btrfs-corrupt-block

Expand All @@ -45,6 +41,11 @@ do
run_check $here/btrfsck test.img
done

if [ -z $TEST_DEV ] || [ -z $TEST_MNT ];then
echo " [NOTRUN] extent tree rebuild"
exit 0
fi

# test whether fsck can rebuild a corrupted extent tree
test_extent_tree_rebuild()
{
Expand Down

0 comments on commit d9b978f

Please sign in to comment.