Skip to content

Commit d9b978f

Browse files
author
Josef Bacik
committed
Btrfs-progs: skip extent rebuild test if no testdev
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>
1 parent 369aaba commit d9b978f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/fsck-tests.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ run_check()
2424

2525
rm -f $RESULT
2626

27-
if [ -z $TEST_DEV ] || [ -z $TEST_MNT ];then
28-
_fail "please set TEST_DEV and TEST_MNT"
29-
fi
30-
3127
# test rely on corrupting blocks tool
3228
run_check make btrfs-corrupt-block
3329

@@ -45,6 +41,11 @@ do
4541
run_check $here/btrfsck test.img
4642
done
4743

44+
if [ -z $TEST_DEV ] || [ -z $TEST_MNT ];then
45+
echo " [NOTRUN] extent tree rebuild"
46+
exit 0
47+
fi
48+
4849
# test whether fsck can rebuild a corrupted extent tree
4950
test_extent_tree_rebuild()
5051
{

0 commit comments

Comments
 (0)