diff options
author | David Sterba <dsterba@suse.com> | 2017-11-27 23:58:23 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-01-03 17:09:59 +0100 |
commit | c12a6e4dca5e5b388124b81c3ea02e2835822924 (patch) | |
tree | a8899e447bd8c84e611048a97d3a7d7a51ef6512 /tests/mkfs-tests/008-sectorsize-nodesize-combination/test.sh | |
parent | e460ccd6d13bb2cc4939fb860b50964dfbd3c247 (diff) |
btrfs-progs: tests: fix typos in test names
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests/mkfs-tests/008-sectorsize-nodesize-combination/test.sh')
-rwxr-xr-x | tests/mkfs-tests/008-sectorsize-nodesize-combination/test.sh | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/mkfs-tests/008-sectorsize-nodesize-combination/test.sh b/tests/mkfs-tests/008-sectorsize-nodesize-combination/test.sh new file mode 100755 index 00000000..955cd2b1 --- /dev/null +++ b/tests/mkfs-tests/008-sectorsize-nodesize-combination/test.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# test various sectorsize and node size combinations +# including valid and invalid ones +# only do mkfs and fsck check, no mounting as +# sub/multi-pagesize is not supported yet + +source $TOP/tests/common + +check_prereq mkfs.btrfs +check_prereq btrfs + +prepare_test_dev + +# disable mixed bg to avoid sectorsize == nodesize check +features="^mixed-bg" + +# caller need to check whether the combination is valid +do_test() +{ + sectorsize=$1 + nodesize=$2 + run_mayfail $TOP/mkfs.btrfs -f -O $features -n $nodesize -s $sectorsize \ + $TEST_DEV + ret=$? + if [ $ret == 0 ]; then + run_check $TOP/btrfs check $TEST_DEV + fi + return $ret +} + +# Invalid: Unaligned sectorsize and nodesize +do_test 8191 8191 && _fail + +# Invalid: Aligned sectorsize with unaligned nodesize +do_test 4k 16385 && _fail + +# Invalid: Unaligned sectorsize with aligned nodesize +do_test 8191 16k && _fail + +# Valid: Aligned sectorsize and nodesize +do_test 4k 16k || _fail + +# Invalid: Sectorsize larger than nodesize +do_test 8k 4k && _fail + +# Invalid: too large nodesize +do_test 16k 128k && _fail + +# Valid: large sectorsize +do_test 64k 64k || _fail |