diff options
author | Josef Bacik <jbacik@fb.com> | 2014-10-03 10:59:36 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-10-10 10:38:36 +0200 |
commit | 935457f16446012841f8da5a5c9804063d76b366 (patch) | |
tree | 0d1a7d3932fe5c2a3409f04bc39d0cf978f58cac | |
parent | d5fd05a773e2b19455be7e1208e9003a607483c6 (diff) |
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>
Signed-off-by: David Sterba <dsterba@suse.cz>
-rw-r--r-- | tests/fsck-tests.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/fsck-tests.sh b/tests/fsck-tests.sh index b783b78e..867366b9 100644 --- a/tests/fsck-tests.sh +++ b/tests/fsck-tests.sh @@ -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 @@ -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() { |