2016-07-14 23:25:12 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Check if block sizes smaller than 4k expectedly fail to convert
|
|
|
|
|
2018-02-08 06:34:19 +00:00
|
|
|
source "$TEST_TOP/common"
|
|
|
|
source "$TEST_TOP/common.convert"
|
2016-07-14 23:25:12 +00:00
|
|
|
|
|
|
|
setup_root_helper
|
2017-10-27 13:50:34 +00:00
|
|
|
prepare_test_dev
|
2016-07-14 23:25:12 +00:00
|
|
|
check_prereq btrfs-convert
|
2017-08-29 14:35:01 +00:00
|
|
|
check_global_prereq mke2fs
|
2016-07-14 23:25:12 +00:00
|
|
|
|
|
|
|
for bs in 1024 2048; do
|
|
|
|
default_mke2fs="mke2fs -t ext4 -b $bs"
|
|
|
|
convert_test_preamble '' "unsupported block size $bs" 16k "$default_mke2fs"
|
2017-07-20 15:53:56 +00:00
|
|
|
convert_test_prep_fs ext4 $default_mke2fs
|
2016-07-14 23:25:12 +00:00
|
|
|
|
2017-04-23 19:00:00 +00:00
|
|
|
run_check $SUDO_HELPER dd if=/dev/zero of="$TEST_MNT/file" bs=1M \
|
2016-07-14 23:25:12 +00:00
|
|
|
count=1 seek=1024 > /dev/null 2>&1
|
|
|
|
|
|
|
|
run_check_umount_test_dev
|
2017-04-23 19:00:00 +00:00
|
|
|
run_mustfail "$bs block converted" "$TOP/btrfs-convert" "$TEST_DEV"
|
2016-07-14 23:25:12 +00:00
|
|
|
done
|