From: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, hreitz@redhat.com,
den@virtuozzo.com
Subject: Re: [PATCH] iotests: don't run tests requiring cached writes in '-nocache' mode
Date: Thu, 11 Jan 2024 14:53:11 +0200 [thread overview]
Message-ID: <cfe9a043-43c1-4054-bc99-5576cd0c34e7@virtuozzo.com> (raw)
In-Reply-To: <20231211133223.695048-1-andrey.drobyshev@virtuozzo.com>
On 12/11/23 15:32, Andrey Drobyshev wrote:
> There're tests whose logic implies running without O_DIRECT set,
> otherwise they fail when running iotests in '-nocache' mode. For these
> tests let's add _require_no_o_direct() helper which can be put in the
> preabmle and which makes sure '-nocache' isn't set. Use it to skip
> running the following tests:
>
> * 271: creates files with unaligned sizes, thus producing multiple
> errors like:
>
> qemu-io: can't open device /path/to/t.qcow2.raw: Cannot get 'write'
> permission without 'resize': Image size is not a multiple of request alignment
>
> * 308, file-io-error: use fuse exports. Though fuse does have
> 'direct-io' mode (see https://docs.kernel.org/filesystems/fuse-io.html)
> we aren't using it yet, thus getting errors like:
>
> qemu-io: can't open device /path/to/t.qcow2.fuse: Could not open
> '/path/to/t.qcow2.fuse': filesystem does not support O_DIRECT
>
> Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
> ---
> tests/qemu-iotests/271 | 1 +
> tests/qemu-iotests/308 | 2 ++
> tests/qemu-iotests/common.rc | 7 +++++++
> tests/qemu-iotests/tests/file-io-error | 1 +
> 4 files changed, 11 insertions(+)
>
> diff --git a/tests/qemu-iotests/271 b/tests/qemu-iotests/271
> index 59a6fafa2f..1424b6954d 100755
> --- a/tests/qemu-iotests/271
> +++ b/tests/qemu-iotests/271
> @@ -44,6 +44,7 @@ _supported_fmt qcow2
> _supported_proto file nfs
> _supported_os Linux
> _unsupported_imgopts extended_l2 compat=0.10 cluster_size data_file refcount_bits=1[^0-9]
> +_require_no_o_direct
>
> l2_offset=$((0x40000))
>
> diff --git a/tests/qemu-iotests/308 b/tests/qemu-iotests/308
> index de12b2b1b9..535455e5b1 100755
> --- a/tests/qemu-iotests/308
> +++ b/tests/qemu-iotests/308
> @@ -52,6 +52,8 @@ _unsupported_fmt vpc
> _supported_proto file # We create the FUSE export manually
> _supported_os Linux # We need /dev/urandom
>
> +_require_no_o_direct
> +
> # $1: Export ID
> # $2: Options (beyond the node-name and ID)
> # $3: Expected return value (defaults to 'return')
> diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
> index 95c12577dd..f61eae73b4 100644
> --- a/tests/qemu-iotests/common.rc
> +++ b/tests/qemu-iotests/common.rc
> @@ -857,6 +857,13 @@ _check_o_direct()
> [[ "$out" != *"O_DIRECT"* ]]
> }
>
> +_require_no_o_direct()
> +{
> + if [ $CACHEMODE == "none" ] || [ $CACHEMODE == "directsync" ]; then
> + _notrun "not suitable for cache mode: $CACHEMODE (implies O_DIRECT)"
> + fi
> +}
> +
> _require_o_direct()
> {
> if ! _check_o_direct; then
> diff --git a/tests/qemu-iotests/tests/file-io-error b/tests/qemu-iotests/tests/file-io-error
> index 88ee5f670c..2b8dc7f009 100755
> --- a/tests/qemu-iotests/tests/file-io-error
> +++ b/tests/qemu-iotests/tests/file-io-error
> @@ -40,6 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
> # Format-agnostic (we do not use any), but we do test the file protocol
> _supported_proto file
> _require_drivers blkdebug null-co
> +_require_no_o_direct
>
> if [ "$IMGOPTSSYNTAX" = "true" ]; then
> # We need `$QEMU_IO -f file` to work; IMGOPTSSYNTAX uses --image-opts,
Ping
next prev parent reply other threads:[~2024-01-11 12:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-11 13:32 [PATCH] iotests: don't run tests requiring cached writes in '-nocache' mode Andrey Drobyshev
2024-01-11 12:53 ` Andrey Drobyshev [this message]
2024-01-25 16:34 ` Andrey Drobyshev
2024-01-25 20:43 ` Eric Blake
2024-01-26 10:24 ` Kevin Wolf
2024-01-26 11:04 ` Andrey Drobyshev
2024-01-26 11:26 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cfe9a043-43c1-4054-bc99-5576cd0c34e7@virtuozzo.com \
--to=andrey.drobyshev@virtuozzo.com \
--cc=den@virtuozzo.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).