All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, hreitz@redhat.com,
	den@virtuozzo.com, eblake@redhat.com
Subject: Re: [PATCH] iotests: don't run tests requiring cached writes in '-nocache' mode
Date: Fri, 26 Jan 2024 12:26:09 +0100	[thread overview]
Message-ID: <ZbOW0bDF2s9ndlGG@redhat.com> (raw)
In-Reply-To: <71305cf0-31e8-4d5e-beab-8854a0d1386a@virtuozzo.com>

Am 26.01.2024 um 12:04 hat Andrey Drobyshev geschrieben:
> On 1/26/24 12:24, Kevin Wolf wrote:
> > Am 11.12.2023 um 14:32 hat Andrey Drobyshev geschrieben:
> >> 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>
> > 
> > How are you running qemu-iotests to make these tests fail? I tried to
> > reproduce, but they just pass for me:
> > 
> > $ tests/qemu-iotests/check -qcow2 -nocache 271 308 file-io-error
> > [...]
> > 271             pass       [11:20:50] [11:21:11]   21.1s  (last: 20.4s) 
> > 308             pass       [11:21:11] [11:21:14]   3.3s   (last: 3.3s)  
> > file-io-error   pass       [11:21:14] [11:21:14]   0.3s   (last: 0.3s)  
> > Passed all 3 iotests
> > 
> > $ tests/qemu-iotests/check -raw -nocache 271 308 file-io-error
> > 271             not run    [11:21:20] [11:21:21]   ...                  not suitable for this image format: raw
> > 308             pass       [11:21:21] [11:21:24]   3.8s   (last: 2.8s)  
> > file-io-error   pass       [11:21:24] [11:21:25]   0.3s   (last: 0.3s)  
> > Not run: 271
> > Passed all 2 iotests
> > 
> > Kevin
> > 
> 
> As for the test 271, I imagine this might be caused by different request
> alignment.  The failure occurs in block.c, bdrv_node_refresh_perm().  If
> I print the alignment out explicitly, I get:
> 
> 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: 4096

Oh, do you have a 4k sector size? I think for me O_DIRECT only enforces
512 byte alignment. I can later try again on a 4k sector size loopback
device or something.

If so, I think that's worth mentioning in the commit message.

> For the record, I'm running tests on ext4.

I don't expect that this makes the difference, but xfs for me.

> I'm not sure about the fuse tests though.  Could it also have smth to do
> with the underlying fs?

Probably the same request alignment thing then.

Kevin



      reply	other threads:[~2024-01-26 11:26 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
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 [this message]

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=ZbOW0bDF2s9ndlGG@redhat.com \
    --to=kwolf@redhat.com \
    --cc=andrey.drobyshev@virtuozzo.com \
    --cc=den@virtuozzo.com \
    --cc=eblake@redhat.com \
    --cc=hreitz@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.