iotests: Enable fuse for many tests

Many tests (that do not support generic protocols) can run just fine
with FUSE-exported images, so allow them to.  Note that this is no
attempt at being definitely complete.  There are some tests that might
be modified to run on FUSE, but this patch still skips them.  This patch
only tries to pick the rather low-hanging fruits.

Note that 221 and 250 only pass when .lseek is correctly implemented,
which is only possible with a libfuse that is 3.8 or newer.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20201027190600.192171-20-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Max Reitz 2020-10-27 20:05:59 +01:00 committed by Kevin Wolf
parent f96ac06bf0
commit 57284d2ada
75 changed files with 75 additions and 75 deletions

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.pattern
_supported_fmt raw qcow2 qed luks
_supported_proto file sheepdog rbd nfs
_supported_proto file sheepdog rbd nfs fuse
echo "=== Creating image"
echo

View File

@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# Currently only qcow2 supports rebasing
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_default_cache_mode writethrough
_supported_cache_modes writethrough none
# The refcount table tests expect a certain minimum width for refcount entries

View File

@ -46,7 +46,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# Any format supporting backing files except vmdk and qcow which do not support
# smaller backing files.
_supported_fmt qcow2 qed
_supported_proto file
_supported_proto file fuse
_supported_os Linux
# Choose a size that is not necessarily a cluster size multiple for image

View File

@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# This tests qcow2-specific low-level functionality
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
# We want to test compat=0.10, which does not support external data
# files or refcount widths other than 16
_unsupported_imgopts data_file 'refcount_bits=\([^1]\|.\([^6]\|$\)\)'

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow qcow2 vmdk qed
_supported_proto file
_supported_proto file fuse
_supported_os Linux
_unsupported_imgopts "subformat=monolithicFlat" \
"subformat=twoGbMaxExtentFlat" \

View File

@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# This tests qcow2-specific low-level functionality
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
# Only qcow2v3 and later supports feature bits;
# qcow2.py does not support external data files;
# this test requires a cluster size large enough for the feature table

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow qcow2 vmdk qed
_supported_proto file
_supported_proto file fuse
_unsupported_imgopts "subformat=monolithicFlat" \
"subformat=twoGbMaxExtentFlat" \
"subformat=twoGbMaxExtentSparse" \

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2 qed
_supported_proto file
_supported_proto file fuse
_supported_os Linux
CLUSTER_SIZE=2M

View File

@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
_default_cache_mode writethrough
_supported_cache_modes writethrough

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
# data_file does not support compressed clusters
_unsupported_imgopts data_file

View File

@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2 qed
_supported_proto file
_supported_proto file fuse
echo
echo "== Creating images =="

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
echo
echo "creating too large image (1 EB)"

View File

@ -46,7 +46,7 @@ _filter_io_error()
# This tests qcow2-specific low-level functionality
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
# These tests only work for compat=1.1 images without an external
# data file with refcount_bits=16

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_require_drivers blkdebug blkverify
# blkdebug can only inject errors on bs->file, not on the data_file,
# so thie test does not work with external data files

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file nfs
_supported_proto file nfs fuse
# Some containers (e.g. non-x86 on Travis) do not allow large files
_require_large_file 4G

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
# - Internal snapshots are (currently) impossible with refcount_bits=1,
# and generally impossible with external data files

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
# Because anything other than 16 would change the output of qemu_io -c info
_unsupported_imgopts 'refcount_bits=\([^1]\|.\([^6]\|$\)\)'

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file nfs
_supported_proto file nfs fuse
# External data files do not support compressed clusters
_unsupported_imgopts data_file

View File

@ -44,7 +44,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.qemu
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
_supported_cache_modes writethrough none writeback
_default_cache_mode none writeback

View File

@ -44,7 +44,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.qemu
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
size_smaller=5M
size_larger=100M

View File

@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# Any format supporting backing files and bdrv_make_empty
_supported_fmt qcow qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux

View File

@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.pattern
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
# The code path we want to test here only works for compat=1.1 images;
# blkdebug can only inject errors on bs->file, so external data files
# do not work with this test

View File

@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.qemu
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
IMG_SIZE=64K

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file nfs
_supported_proto file nfs fuse
# Internal snapshots are (currently) impossible with refcount_bits=1,
# and generally impossible with external data files
_unsupported_imgopts 'refcount_bits=1[^0-9]' data_file

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt raw
_supported_proto file
_supported_proto file fuse
_supported_os Linux
# in kB

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file nfs
_supported_proto file nfs fuse
IMG_SIZE=64K

View File

@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# This tests qcow2-specific low-level functionality
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
# This test directly modifies a refblock so it relies on refcount_bits being 16;
# and the low-level modification it performs are not tuned for external data

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qed qcow qcow2 vmdk
_supported_proto file
_supported_proto file fuse
_unsupported_imgopts "subformat=monolithicFlat" "subformat=twoGbMaxExtentFlat"
_make_test_img -b "$TEST_IMG.inexistent"

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# This tests qcow2-specific low-level functionality
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
# This test will set refcount_bits on its own which would conflict with the
# manual setting; compat will be overridden as well;
# and external data files do not work well with our refcount testing

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
# This test relies on refcounts being 64 bits wide (which does not work with
# compat=0.10)
_unsupported_imgopts 'refcount_bits=\([^6]\|.\([^4]\|$\)\)' 'compat=0.10'

View File

@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.qemu
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_make_test_img 64k

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt generic
_supported_proto file
_supported_proto file fuse
_unsupported_fmt luks
_require_drivers raw

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
# Refcount structures are used much differently with external data
# files

View File

@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.qemu
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_require_devices virtio-scsi scsi-hd

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
TEST_IMG="$TEST_IMG.base" _make_test_img 64M
_make_test_img -b "$TEST_IMG.base" -F $IMGFMT

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.qemu
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
# We are going to use lazy-refcounts
_unsupported_imgopts 'compat=0.10'

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# This tests qcow2-specific low-level functionality
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
# With an external data file, data clusters are not refcounted
# (so qemu-img check would not do much);

View File

@ -44,7 +44,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.qemu
_supported_fmt generic
_supported_proto file
_supported_proto file fuse
_supported_os Linux
_make_test_img 64k

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
CLUSTER_SIZE=4k

View File

@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# Any format implementing BlockDriver.bdrv_change_backing_file
_supported_fmt qcow2 qed
_supported_proto file
_supported_proto file fuse
_supported_os Linux
IMG_SIZE=1M

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt raw
_supported_proto file
_supported_proto file fuse
_supported_os Linux

View File

@ -71,7 +71,7 @@ EOF
. ./common.filter
_supported_fmt raw
_supported_proto file
_supported_proto file fuse
_supported_os Linux
_default_cache_mode none

View File

@ -45,7 +45,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# This test is specific to qcow2
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
# Persistent dirty bitmaps require compat=1.1;
# Internal snapshots forbid using an external data file

View File

@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# tests specific to compat=1.1.
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
CLUSTER_SIZE=1M
size=128M

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
# v2 images can't mark clusters as zero

View File

@ -44,7 +44,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_os Linux FreeBSD NetBSD
_supported_fmt qcow2 raw qed quorum
_supported_proto file
_supported_proto file fuse
size=64M
_make_test_img $size

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_require_drivers null-co
if [ "$QEMU_DEFAULT_MACHINE" != "pc" ]; then

View File

@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
size=64M
_make_test_img $size

View File

@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.qemu
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
# An external data file would change the query-named-block-nodes output
_unsupported_imgopts data_file

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
do_run_qemu()
{

View File

@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.qemu
_supported_fmt qcow2 qed
_supported_proto file
_supported_proto file fuse
BACKING_IMG="$TEST_IMG.base"

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
# This test assumes that discard leaves zero clusters; see test 177 for
# other tests that also work in older images
_unsupported_imgopts 'compat=0.10'

View File

@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
# Repairing the corrupted image requires qemu-img check to store a
# refcount up to 3, which requires at least two refcount bits.

View File

@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# This test is specific to qcow2
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
# This test needs clusters with at least a refcount of 2 so that
# OFLAG_COPIED is not set. refcount_bits=1 is therefore unsupported.

View File

@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.pattern
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
# To use a different refcount width but 16 bits we need compat=1.1,
# and external data files do not support compressed clusters.

View File

@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt raw
_supported_proto file
_supported_proto file fuse
_supported_os Linux
_default_cache_mode writeback

View File

@ -44,7 +44,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# Needs backing file and backing format support
_supported_fmt qcow2 qed
_supported_proto file
_supported_proto file fuse
_supported_os Linux
# blkdebug can only inject errors on bs->file, so external data files
# do not work with this test

View File

@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# Requires backing files and .bdrv_change_backing_file support
_supported_fmt qcow2 qed
_supported_proto file
_supported_proto file fuse
size=128M

View File

@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# Any format implementing BlockDriver.bdrv_change_backing_file
_supported_fmt qcow2 qed
_supported_proto file
_supported_proto file fuse
_supported_os Linux
IMG_SIZE=1M

View File

@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
# This test does not make much sense with external data files
_unsupported_imgopts data_file

View File

@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# zero cluster support
_supported_fmt qcow2
_unsupported_imgopts 'compat=0.10'
_supported_proto file
_supported_proto file fuse
_supported_os Linux
CLUSTER_SIZE=65536

View File

@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# qcow2-specific test
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
echo '--- Writing to the image ---'

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
echo
echo "== Required alignment larger than cluster size =="

View File

@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# This is a qcow2 regression test
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
# External data files do not support compression;
# We need an exact cluster size (2M) and refcount width (2) so we can

View File

@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# This is a qcow2 regression test
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
# External data files would add nodes to the block graph, so it would
# not match the reference output

View File

@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# Backing files are required...
_supported_fmt qcow qcow2 vmdk qed
_supported_proto file
_supported_proto file fuse
_supported_os Linux
_unsupported_imgopts "subformat=monolithicFlat" \
"subformat=twoGbMaxExtentFlat" \

View File

@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.qemu
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
# Internal snapshots are (currently) impossible with refcount_bits=1,
# and generally impossible with external data files
_unsupported_imgopts 'refcount_bits=1[^0-9]' data_file

View File

@ -32,7 +32,7 @@ status=1 # failure is the default!
# This tests qocw2-specific low-level functionality
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
_unsupported_imgopts 'compat=0.10' data_file

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.pattern
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
# This is a v3-exclusive test;
# As for data_file, error paths often very much depend on whether
# there is an external data file or not; so we create one exactly when

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
_unsupported_imgopts 'compat=0.10' refcount_bits data_file

View File

@ -36,7 +36,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.nbd
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
_require_command QEMU_NBD
# compat=0.10 does not support bitmaps

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
# We need qemu-img map to show the file where the data is allocated,
# but with an external data file, it will show that instead of the

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2 luks
_supported_proto file #TODO
_supported_proto file fuse #TODO
_require_working_luks
QEMU_IO_OPTIONS=$QEMU_IO_OPTIONS_NO_FMT

View File

@ -34,7 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt luks
_supported_proto file #TODO
_supported_proto file fuse #TODO
QEMU_IO_OPTIONS=$QEMU_IO_OPTIONS_NO_FMT

View File

@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common.filter
_supported_fmt qcow2
_supported_proto file
_supported_proto file fuse
_supported_os Linux
_unsupported_imgopts cluster_size refcount_bits extended_l2 compat=0.10 data_file