diff options
author | Eric Whitney <enwlinux@gmail.com> | 2022-11-11 18:01:01 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2022-11-24 22:19:28 -0500 |
commit | 7ccbe4af2e2c8f32e3c5c07f551829f4278be827 (patch) | |
tree | 6a1dc0d38d990ca038b6cb1fa5d3cd60dc4535a4 | |
parent | 882baa1037d8076444254b6ff9050d84b2bf634c (diff) | |
download | xfstests-bld-7ccbe4af2e2c8f32e3c5c07f551829f4278be827.tar.gz |
test-appliance: force 4 KB block size for bigalloc, bigalloc_inline
The cfg file for the bigalloc test configuration does not explicitly
define the file system block size as is done for the 4k configuration,
although the intent is to test a file system with 4 KB blocks and 64 KB
clusters. At least one test, shared/298, runs with a block size of
1 KB instead under bigalloc because it creates a file system image less
than 512 MB in size, a result of the mke2fs.conf block size rule
for small files.
shared/298 currently fails when run under bigalloc with 1 KB blocks.
When the block size is set to 4 KB for the test, it passes.
Explicitly defining the bigalloc block size will help avoid similar
surprises in current or future tests written to use small test files.
Make the same change to the bigalloc_inline config file while we're
at it.
v2: Modify the names of the bigalloc test configurations using 4 KB
block sizes to explicitly reflect the block size. Change the
documentation and supporting files to reflect this. Bring the
bigalloc_4k_inline.exclude file up to date (and propagate a change to
the other .exclude files). Add a new test configuration for bigalloc
with 64k blocks, but don't add this configuration to the default list
of all tests to be run for now.
The bigalloc_64k and huge_bigalloc_4k configurations are untested. The
huge_bigalloc_4k.exclude file will likely need further work if used.
Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
16 files changed, 119 insertions, 26 deletions
diff --git a/Documentation/android-xfstests.md b/Documentation/android-xfstests.md index 049f7b4d..a896b31e 100644 --- a/Documentation/android-xfstests.md +++ b/Documentation/android-xfstests.md @@ -26,7 +26,7 @@ devices. If you encounter a problem, please submit a fix! sufficient. This is the sum of three 5 GiB partitions, a shrunken 4 GiB userdata partition, and the various other partitions used by Android devices. For test configurations requiring large - partitions, like bigalloc, you'll need about 64 GiB instead. + partitions, like bigalloc_4k, you'll need about 64 GiB instead. - Ability to connect to the Android device with adb and fastboot. Usually this is done via a USB cable. diff --git a/Documentation/kvm-quickstart.md b/Documentation/kvm-quickstart.md index 1c4b0985..669faf8e 100644 --- a/Documentation/kvm-quickstart.md +++ b/Documentation/kvm-quickstart.md @@ -41,7 +41,7 @@ 6. Run "kvm-xfstests smoke" to do a quick test. Or "kvm-xfstests -g auto" to do a full test. You can also run specific tests on - specific configurations, i.e., "kvm-xfstests -c bigalloc + specific configurations, i.e., "kvm-xfstests -c bigalloc_4k generic/013 generic/127". To run a shell, use "kvm-xfstests shell" For more information, please see the full [kvm-xfstests diff --git a/Documentation/kvm-xfstests.md b/Documentation/kvm-xfstests.md index c0a53379..0b397d6c 100644 --- a/Documentation/kvm-xfstests.md +++ b/Documentation/kvm-xfstests.md @@ -100,7 +100,7 @@ appliance is: By default <cfg> defaults to all, which will run the following configurations: "4k", "1k", "ext3", "nojournal", "ext3conv", -"dioread_nolock, "data_journal", "inline", "bigalloc", and +"dioread_nolock, "data_journal", "inline", "bigalloc_4k", and "bigalloc_1k". You may specify a single configuration or a comma separated list if you want to run a subset of all possible file system configurations. diff --git a/Documentation/what-is-xfstests.md b/Documentation/what-is-xfstests.md index 8bdf7eab..8e21ca08 100644 --- a/Documentation/what-is-xfstests.md +++ b/Documentation/what-is-xfstests.md @@ -59,7 +59,7 @@ should be 5GB. Smaller, and some tests may not run correctly. Larger, and the tests will take a long time to run --- especially those tests that need to fill the file system to test ENOSPC handling. There are a few file system configurations for ext4 (most notable, -bigalloc) which require a 20GB test and scratch device. +bigalloc_4k) which require a 20GB test and scratch device. For this reason, kvm-xfstests uses five file system devices, /dev/vdb, /dev/vdc, /dev/vdd, /dev/vde, and /dev/vdf. (/dev/vda is used for the diff --git a/run-fstests/util/parse_cli b/run-fstests/util/parse_cli index 9218d7e7..861c3bc1 100644 --- a/run-fstests/util/parse_cli +++ b/run-fstests/util/parse_cli @@ -90,7 +90,7 @@ print_help () echo "" echo "Common file system configurations are:" echo " 4k 1k ext3 nojournal ext3conv metacsum dioread_nolock " - echo " data_journal bigalloc bigalloc_1k inline" + echo " data_journal bigalloc_4k bigalloc_1k inline" echo "" echo "xfstest names have the form: ext4/NNN generic/NNN shared/NNN" echo "" diff --git a/test-appliance/files/root/fs/ext4/cfg/all.list b/test-appliance/files/root/fs/ext4/cfg/all.list index 09faac02..75b26431 100644 --- a/test-appliance/files/root/fs/ext4/cfg/all.list +++ b/test-appliance/files/root/fs/ext4/cfg/all.list @@ -7,6 +7,6 @@ ext3conv adv dioread_nolock data_journal -bigalloc +bigalloc_4k bigalloc_1k dax diff --git a/test-appliance/files/root/fs/ext4/cfg/bigalloc b/test-appliance/files/root/fs/ext4/cfg/bigalloc_4k index 18b0a606..366bf380 100644 --- a/test-appliance/files/root/fs/ext4/cfg/bigalloc +++ b/test-appliance/files/root/fs/ext4/cfg/bigalloc_4k @@ -1,5 +1,5 @@ SIZE=large -export EXT_MKFS_OPTIONS="-O bigalloc" +export EXT_MKFS_OPTIONS="-b 4096 -O bigalloc" export EXT_MOUNT_OPTIONS="" # Until we can teach xfstests the difference between cluster size and diff --git a/test-appliance/files/root/fs/ext4/cfg/bigalloc.exclude b/test-appliance/files/root/fs/ext4/cfg/bigalloc_4k.exclude index 33c325a3..c81fbdd0 100644 --- a/test-appliance/files/root/fs/ext4/cfg/bigalloc.exclude +++ b/test-appliance/files/root/fs/ext4/cfg/bigalloc_4k.exclude @@ -1,4 +1,4 @@ -// exclude file for ext4/bigalloc +// exclude file for ext4/bigalloc_4k ext4/004 // dump/restore doesn't handle the bigalloc feature @@ -8,6 +8,12 @@ ext4/004 // dump/restore doesn't handle the bigalloc feature // don't need to test this for all file system configs, so just skip it here. ext4/033 +// ext4/044 tries to mkfs the test file system as ext3 explicitly. This +// initially fails because ext3 and the inline_data feature are incompatible. +// However, _scratch_do_mkfs() retries by stripping off the bigalloc and +// inline_data options, resulting in a successful but irrelevant test. +ext4/044 + // This takes a *long* time and doesn't add much value to run on all // configurations. So we're going to be selective where we run it. generic/027 diff --git a/test-appliance/files/root/fs/ext4/cfg/bigalloc_inline b/test-appliance/files/root/fs/ext4/cfg/bigalloc_4k_inline index 46af5360..12ad66e7 100644 --- a/test-appliance/files/root/fs/ext4/cfg/bigalloc_inline +++ b/test-appliance/files/root/fs/ext4/cfg/bigalloc_4k_inline @@ -1,5 +1,5 @@ SIZE=large -export EXT_MKFS_OPTIONS="-O bigalloc,inline_data" +export EXT_MKFS_OPTIONS="-b 4096 -O bigalloc,inline_data" export EXT_MOUNT_OPTIONS="" # Until we can teach xfstests the difference between cluster size and diff --git a/test-appliance/files/root/fs/ext4/cfg/bigalloc_4k_inline.exclude b/test-appliance/files/root/fs/ext4/cfg/bigalloc_4k_inline.exclude new file mode 100644 index 00000000..cc8fa5cc --- /dev/null +++ b/test-appliance/files/root/fs/ext4/cfg/bigalloc_4k_inline.exclude @@ -0,0 +1,38 @@ +// exclude file for ext4/bigalloc_4k_inline + +ext4/004 // dump/restore doesn't handle the bigalloc feature + +// ext4/033 creates a special file system using dmhugedisk to test for +// inode overflow when online resizing. With a bigalloc config, this takes +// too much space, so test VM will hang or abort the test run. We +// don't need to test this for all file system configs, so just skip it here. +ext4/033 + +// ext4/044 tries to mkfs the test file system as ext3 explicitly. This +// initially fails because ext3 and the inline_data feature are incompatible. +// However, _scratch_do_mkfs() retries by stripping off the bigalloc and +// inline_data options, resulting in a successful but irrelevant test. +ext4/044 + +// This takes a *long* time and doesn't add much value to run on all +// configurations. So we're going to be selective where we run it. +generic/027 + +// This test is a quota accounting test. For bigalloc, the cluster +// size of 64k is way too big to deal with the artificial fudge used +// in the test to deal with wrong block sizes. The test really needs +// to be rewritten to understand block/allocation sizes.... +generic/219 + +// This test uses the block size to figure out how many files to +// create; for bigalloc, we need to use the cluster size instead of the +// block size. +generic/273 + +// These tests assume that the directory will get expanded when +// additional entries are added. With bigalloc and with htree +// directories, this is not the case. Since no blocks are added, +// there is no attempted block allocation and so the expected +// EDQUOT failure didn't happen. +generic/681 +generic/682 diff --git a/test-appliance/files/root/fs/ext4/cfg/bigalloc_64k b/test-appliance/files/root/fs/ext4/cfg/bigalloc_64k new file mode 100644 index 00000000..79df2671 --- /dev/null +++ b/test-appliance/files/root/fs/ext4/cfg/bigalloc_64k @@ -0,0 +1,14 @@ +SIZE=large +export EXT_MKFS_OPTIONS="-b 65536 -O bigalloc" +export EXT_MOUNT_OPTIONS="" + +# Until we can teach xfstests the difference between cluster size and +# block size, avoid collapse_range and insert_range since these will +# fail due the fact that these operations require cluster-aligned +# ranges. +export FSX_AVOID="-C -I" +export FSSTRESS_AVOID="-f collapse=0 -f insert=0" +export XFS_IO_AVOID="fcollapse finsert" +TEST_SET_EXCLUDE="-x collapse,insert" + +TESTNAME="Ext4 64k block w/bigalloc" diff --git a/test-appliance/files/root/fs/ext4/cfg/bigalloc_64k.exclude b/test-appliance/files/root/fs/ext4/cfg/bigalloc_64k.exclude new file mode 100644 index 00000000..c9a90bf5 --- /dev/null +++ b/test-appliance/files/root/fs/ext4/cfg/bigalloc_64k.exclude @@ -0,0 +1,49 @@ +// exclude file for ext4/bigalloc_64k + +ext4/004 // dump/restore doesn't handle the bigalloc feature + +// ext4/033 creates a special file system using dmhugedisk to test for +// inode overflow when online resizing. With a bigalloc config, this takes +// too much space, so test VM will hang or abort the test run. We +// don't need to test this for all file system configs, so just skip it here. +ext4/033 + +// ext4/044 tries to mkfs the test file system as ext3 explicitly. This +// initially fails because ext3 and the inline_data feature are incompatible. +// However, _scratch_do_mkfs() retries by stripping off the bigalloc and +// inline_data options, resulting in a successful but irrelevant test. +ext4/044 + +// This takes a *long* time and doesn't add much value to run on all +// configurations. So we're going to be selective where we run it. +generic/027 + +// This test needs to know the inode size and block size for the file +// system; for bigalloc, we need to use the cluster size instead of the +// block size. +generic/204 + +// This test is a quota accounting test. For bigalloc, the cluster +// size of 64k is way too big to deal with the artificial fudge used +// in the test to deal with wrong block sizes. The test really needs +// to be rewritten to understand block/allocation sizes.... +generic/219 + +// This test uses the block size to figure out how many files to +// create; for bigalloc, we need to use the cluster size instead of the +// block size. +generic/273 + +// This test creates a very small file system on a dm-thin device. +// The file system is too small for bigalloc, so skip it. It was +// introduced to test a dm-thin bug combined with an XFS bug regression. +// If it's a problem for ext4, we'll catch it in other ext4 configs. +generic/500 + +// These tests assume that the directory will get expanded when +// additional entries are added. With bigalloc and with htree +// directories, this is not the case. Since no blocks are added, +// there is no attempted block allocation and so the expected +// EDQUOT failure didn't happen. +generic/681 +generic/682 diff --git a/test-appliance/files/root/fs/ext4/cfg/bigalloc_inline.exclude b/test-appliance/files/root/fs/ext4/cfg/bigalloc_inline.exclude deleted file mode 100644 index 356ddb5d..00000000 --- a/test-appliance/files/root/fs/ext4/cfg/bigalloc_inline.exclude +++ /dev/null @@ -1,13 +0,0 @@ -// exclude file for ext4/bigalloc_inline - -ext4/004 // dump/restore doesn't handle the bigalloc feature - -// ext4/033 creates a special file system using dmhugedisk to test for -// inode overflow when online resizing. With a bigalloc config, this takes -// too much space, so test VM will hang or abort the test run. We -// don't need to test this for all file system configs, so just skip it here. -ext4/033 - -// This takes a *long* time and doesn't add much value to run on all -// configurations. So we're going to be selective where we run it. -generic/027 diff --git a/test-appliance/files/root/fs/ext4/cfg/huge.list b/test-appliance/files/root/fs/ext4/cfg/huge.list index 6d4e9a50..9f3c7b66 100644 --- a/test-appliance/files/root/fs/ext4/cfg/huge.list +++ b/test-appliance/files/root/fs/ext4/cfg/huge.list @@ -1,4 +1,4 @@ huge_4k huge_1k -huge_bigalloc +huge_bigalloc_4k huge_encrypt diff --git a/test-appliance/files/root/fs/ext4/cfg/huge_bigalloc b/test-appliance/files/root/fs/ext4/cfg/huge_bigalloc_4k index 82effdad..de4a53dc 100644 --- a/test-appliance/files/root/fs/ext4/cfg/huge_bigalloc +++ b/test-appliance/files/root/fs/ext4/cfg/huge_bigalloc_4k @@ -1,5 +1,5 @@ SIZE=large -export EXT_MKFS_OPTIONS="-O bigalloc" +export EXT_MKFS_OPTIONS="-b 4096 -O bigalloc" export EXT_MOUNT_OPTIONS="huge=always" # Until we can teach xfstests the difference between cluster size and @@ -11,4 +11,3 @@ export FSSTRESS_AVOID="-f collapse=0 -f insert=0 -f zero=0" export XFS_IO_AVOID="fcollapse finsert zero" TESTNAME="Ext4 4k block w/bigalloc" - diff --git a/test-appliance/files/root/fs/ext4/cfg/huge_bigalloc.exclude b/test-appliance/files/root/fs/ext4/cfg/huge_bigalloc_4k.exclude index fe1a2f02..378e28d1 100644 --- a/test-appliance/files/root/fs/ext4/cfg/huge_bigalloc.exclude +++ b/test-appliance/files/root/fs/ext4/cfg/huge_bigalloc_4k.exclude @@ -1,4 +1,4 @@ -// exclude file for ext4/huge_bigalloc +// exclude file for ext4/huge_bigalloc_4k // bigalloc does not support on-line defrag ext4/301 |