mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-24 15:12:47 +00:00
btrfs-progs: tests: enable ntfs2btrfs conversion
Enhance the conversion macro to recognize the filesystem type in case the ntfs-specific converter utility has to be used. Its current feature set does not match btrfs-convert. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
2b16f7d4ad
commit
54b2e4b6e7
@ -146,9 +146,15 @@ convert_test_acl() {
|
||||
# do conversion with given features and nodesize, fsck afterwards
|
||||
# $1: features, argument of -O, can be empty
|
||||
# $2: nodesize, argument of -N, can be empty
|
||||
# #3: (optional) filesystem type, default: btrfs
|
||||
convert_test_do_convert() {
|
||||
export BTRFS_PROGS_DEBUG_STRICT_CHUNK_ALIGNMENT=y
|
||||
run_check "$TOP/btrfs-convert" ${1:+-O "$1"} ${2:+-N "$2"} "$TEST_DEV"
|
||||
if [ "$3" = "ntfs" ]; then
|
||||
# Features and nodesize are not supported
|
||||
run_check "ntfs2btrfs" "$TEST_DEV"
|
||||
else
|
||||
run_check "$TOP/btrfs-convert" ${1:+-O "$1"} ${2:+-N "$2"} "$TEST_DEV"
|
||||
fi
|
||||
run_check "$TOP/btrfs" check "$TEST_DEV"
|
||||
run_check "$TOP/btrfs" inspect-internal dump-super -Ffa "$TEST_DEV"
|
||||
unset BTRFS_PROGS_DEBUG_STRICT_CHUNK_ALIGNMENT
|
||||
@ -278,7 +284,7 @@ convert_test() {
|
||||
|
||||
run_check_umount_test_dev
|
||||
|
||||
convert_test_do_convert "$features" "$nodesize"
|
||||
convert_test_do_convert "$features" "$nodesize" "$fstype"
|
||||
convert_test_post_checks_all "$CHECKSUMTMP" "$EXT_PERMTMP" "$EXT_ACLTMP"
|
||||
rm -- "$CHECKSUMTMP"
|
||||
rm -- "$EXT_PERMTMP"
|
||||
|
Loading…
Reference in New Issue
Block a user