summaryrefslogtreecommitdiff
path: root/tests/fsck-tests
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2015-04-03 15:01:15 +0800
committerDavid Sterba <dsterba@suse.cz>2015-04-07 17:22:30 +0200
commita18f8b1665b7218f853ce527cf765f5697a4654c (patch)
tree23c8bdf1a99464ddc04f1c053428973c47b626fb /tests/fsck-tests
parent691695fe342688a2c85735ad556d3bf5a82ffc0c (diff)
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>
Diffstat (limited to 'tests/fsck-tests')
-rwxr-xr-xtests/fsck-tests/013-extent-tree-rebuild/test.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/fsck-tests/013-extent-tree-rebuild/test.sh b/tests/fsck-tests/013-extent-tree-rebuild/test.sh
index 7453ed7c..e05a035f 100755
--- a/tests/fsck-tests/013-extent-tree-rebuild/test.sh
+++ b/tests/fsck-tests/013-extent-tree-rebuild/test.sh
@@ -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