mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-16 08:44:31 +08:00
btrfs-progs: tests: add 007-mix-nodesize-sectorsize
Test combinations of sectorsize and nodesize on a single device. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
bf1ac8305a
commit
b7a69afe69
35
tests/mkfs-tests/007-mix-nodesize-sectorsize/test.sh
Executable file
35
tests/mkfs-tests/007-mix-nodesize-sectorsize/test.sh
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# iterate over nodesize and sectorsize combinations
|
||||||
|
|
||||||
|
source $TOP/tests/common
|
||||||
|
|
||||||
|
check_prereq btrfs-show-super
|
||||||
|
check_prereq mkfs.btrfs
|
||||||
|
check_prereq btrfs
|
||||||
|
setup_root_helper
|
||||||
|
prepare_test_dev
|
||||||
|
|
||||||
|
test_mkfs_single()
|
||||||
|
{
|
||||||
|
run_check $SUDO_HELPER $TOP/mkfs.btrfs -f "$@" $TEST_DEV
|
||||||
|
run_check $TOP/btrfs-show-super $TEST_DEV
|
||||||
|
run_check $SUDO_HELPER $TOP/btrfs check $TEST_DEV
|
||||||
|
}
|
||||||
|
|
||||||
|
# default
|
||||||
|
test_mkfs_single
|
||||||
|
|
||||||
|
# nodesize >= sectorsize
|
||||||
|
for nodesize in 4096 8192 16384 32768 65536; do
|
||||||
|
for sectorsize in 4096 8192 16384 32768 65536; do
|
||||||
|
[ $nodesize -lt $sectorsize ] && continue
|
||||||
|
test_mkfs_single -n $nodesize -s $sectorsize -d single -m single
|
||||||
|
test_mkfs_single -n $nodesize -s $sectorsize -d single -m dup
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
# nodesize, mixed mode
|
||||||
|
for nodesize in 4k 8k 16k 32k 64k; do
|
||||||
|
test_mkfs_single -n $nodesize -s $nodesize -d single -m single --mixed
|
||||||
|
test_mkfs_single -n $nodesize -s $nodesize -d dup -m dup --mixed
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user