btrfs-progs: fsck-tests: Add fallback TEST_DEV for test case 013

Add fallback TEST_DEV for test case 013.
Fallback to $TOP/tests/test.img.

Now all test cases of btrfs-progs need no extra setting except sudo.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
Qu Wenruo 2015-04-03 15:01:15 +08:00 committed by David Sterba
parent 691695fe34
commit a18f8b1665

View File

@ -6,8 +6,13 @@ check_prereq btrfs-debug-tree
setup_root_helper
if [ -z $TEST_DEV ]; then
echo " [NOTRUN] extent tree rebuild, need TEST_DEV variant"
exit 0
echo "\$TEST_DEV not given, use $TOP/test/test.img as fallback" >> \
$RESULTS
TEST_DEV="$TOP/tests/test.img"
# Need at least 1G to avoid mixed block group, which extent tree
# rebuild doesn't support.
run_check truncate -s 1G $TEST_DEV
fi
if [ -z $TEST_MNT ];then