btrfs-progs: tests: use 'btrfs check' instead of btrfsck
Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
parent
1519ee3f58
commit
6856b0a4ca
|
@ -27,8 +27,8 @@ test(){
|
|||
|| _fail "filesystem create failed"
|
||||
$here/btrfs-convert $here/test.img >> convert-tests-results.txt 2>&1 \
|
||||
|| _fail "btrfs-convert failed"
|
||||
$here/btrfsck $here/test.img >> convert-tests-results.txt 2>&1 \
|
||||
|| _fail "btrfsck detected errors"
|
||||
$here/btrfs check $here/test.img >> convert-tests-results.txt 2>&1 \
|
||||
|| _fail "btrfs check detected errors"
|
||||
}
|
||||
|
||||
# btrfs-convert requires 4k blocksize.
|
||||
|
|
|
@ -45,11 +45,11 @@ do
|
|||
run_check tar xJf $i
|
||||
fi
|
||||
|
||||
$here/btrfsck test.img >> $RESULT 2>&1
|
||||
[ $? -eq 0 ] && _fail "btrfsck should have detected corruption"
|
||||
$here/btrfs check test.img >> $RESULT 2>&1
|
||||
[ $? -eq 0 ] && _fail "btrfs check should have detected corruption"
|
||||
|
||||
run_check $here/btrfsck --repair test.img
|
||||
run_check $here/btrfsck test.img
|
||||
run_check $here/btrfs check --repair test.img
|
||||
run_check $here/btrfs check test.img
|
||||
done
|
||||
|
||||
if [ -z $TEST_DEV ] || [ -z $TEST_MNT ];then
|
||||
|
@ -83,7 +83,7 @@ test_extent_tree_rebuild()
|
|||
-b 4096 $TEST_DEV
|
||||
|
||||
$here/btrfs check $TEST_DEV >& /dev/null && \
|
||||
_fail "fsck should detect failure"
|
||||
_fail "btrfs check should detect failure"
|
||||
run_check $here/btrfs check --init-extent-tree $TEST_DEV
|
||||
run_check $here/btrfs check $TEST_DEV
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue