mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-30 01:12:45 +00:00
btrfs-progs: tests: enhance post-rollback fsck tests
The post-rollback helper still assumes just extN, we need an extra argument that'll get passed to fsck. Change all callsites at once so the tests do not fail temporarily. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
e96921bcaa
commit
7299e0d294
@ -218,9 +218,21 @@ convert_test_post_checks_all() {
|
||||
}
|
||||
|
||||
# do rollback and fsck
|
||||
# $1: filesystem name or alias (ext2 includes ext3 and ext4),
|
||||
convert_test_post_rollback() {
|
||||
local types
|
||||
|
||||
run_check "$TOP/btrfs-convert" --rollback "$TEST_DEV"
|
||||
run_check fsck -n -t ext2,ext3,ext4 "$TEST_DEV"
|
||||
if [ -z "$1" ]; then
|
||||
_fail "missing filesystem type to check"
|
||||
fi
|
||||
case "$1" in
|
||||
ext[234]) types=ext2,ext3,ext4 ;;
|
||||
reiserfs) types=reiserfs ;;
|
||||
*) _fail "unknown filesystem type to check: $1" ;;
|
||||
esac
|
||||
|
||||
run_check fsck -n -t "$types" "$TEST_DEV"
|
||||
}
|
||||
|
||||
# simple wrapper for a convert test
|
||||
@ -261,5 +273,5 @@ convert_test() {
|
||||
rm -- "$EXT_PERMTMP"
|
||||
rm -- "$EXT_ACLTMP"
|
||||
|
||||
convert_test_post_rollback
|
||||
convert_test_post_rollback "$fstype"
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ do_test() {
|
||||
cd "$here"
|
||||
run_check "$TOP/btrfs" filesystem sync "$TEST_MNT"
|
||||
run_check_umount_test_dev
|
||||
convert_test_post_rollback
|
||||
convert_test_post_rollback ext4
|
||||
|
||||
run_check_mount_convert_dev ext4
|
||||
convert_test_post_check_checksums "$CHECKSUMTMP"
|
||||
|
@ -24,4 +24,4 @@ if [ $? -ne 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
run_check_umount_test_dev
|
||||
convert_test_post_rollback
|
||||
convert_test_post_rollback ext4
|
||||
|
@ -34,4 +34,4 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
|
||||
run_check_umount_test_dev
|
||||
convert_test_post_rollback
|
||||
convert_test_post_rollback ext4
|
||||
|
@ -45,7 +45,7 @@ do_test() {
|
||||
cd "$here"
|
||||
run_check "$TOP/btrfs" filesystem sync "$TEST_MNT"
|
||||
run_check_umount_test_dev
|
||||
convert_test_post_rollback
|
||||
convert_test_post_rollback reiserfs
|
||||
|
||||
run_check_mount_convert_dev reiserfs
|
||||
convert_test_post_check_checksums "$CHECKSUMTMP"
|
||||
|
@ -35,4 +35,4 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
|
||||
run_check_umount_test_dev
|
||||
convert_test_post_rollback
|
||||
convert_test_post_rollback reiserfs
|
||||
|
Loading…
Reference in New Issue
Block a user