qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org
Cc: fam@euphon.net, kwolf@redhat.com, qemu-devel@nongnu.org,
	armbru@redhat.com, stefanha@redhat.com, den@openvz.org
Subject: Re: [PATCH v6 11/15] iotests: add 298 to test new preallocate filter driver
Date: Thu, 1 Oct 2020 09:40:22 +0200	[thread overview]
Message-ID: <2efb10c1-8863-b3e5-3f6e-d57644fc2d2a@redhat.com> (raw)
In-Reply-To: <09045b49-f4e8-8989-09b5-aa3538b507fc@virtuozzo.com>


[-- Attachment #1.1: Type: text/plain, Size: 6553 bytes --]

On 25.09.20 17:32, Vladimir Sementsov-Ogievskiy wrote:
> 25.09.2020 18:11, Vladimir Sementsov-Ogievskiy wrote:
>> 25.09.2020 12:11, Max Reitz wrote:
>>> On 25.09.20 10:49, Vladimir Sementsov-Ogievskiy wrote:
>>>> 25.09.2020 11:26, Max Reitz wrote:
>>>>> On 18.09.20 20:19, Vladimir Sementsov-Ogievskiy wrote:
>>>>>> Signed-off-by: Vladimir Sementsov-Ogievskiy
>>>>>> <vsementsov@virtuozzo.com>
>>>>>> ---
>>>>>>    tests/qemu-iotests/298     | 186
>>>>>> +++++++++++++++++++++++++++++++++++++
>>>>>>    tests/qemu-iotests/298.out |   5 +
>>>>>>    tests/qemu-iotests/group   |   1 +
>>>>>>    3 files changed, 192 insertions(+)
>>>>>>    create mode 100644 tests/qemu-iotests/298
>>>>>>    create mode 100644 tests/qemu-iotests/298.out
>>>
>>> [...]
>>>
>>>>>> +class TestTruncate(iotests.QMPTestCase):
>>>>>
>>>>> The same decorator could be placed here, although this class doesn’t
>>>>> start a VM, and so is unaffected by the allowlist.  Still may be
>>>>> relevant in case of block modules, I don’t know.
>>>>
>>>> Or just global test skip at file top
>>>
>>> Hm.  Like verify_quorum()?  Is there a generic function for that
>>> already?
>>>
>>> [...]
>>>
>>>>>> +        # Probably we'll want preallocate filter to keep align to
>>>>>> cluster when
>>>>>> +        # shrink preallocation, so, ignore small differece
>>>>>> +        self.assertLess(abs(stat.st_size - refstat.st_size), 64 *
>>>>>> 1024)
>>>>>> +
>>>>>> +        # Preallocate filter may leak some internal clusters (for
>>>>>> example, if
>>>>>> +        # guest write far over EOF, skipping some clusters - they
>>>>>> will remain
>>>>>> +        # fallocated, preallocate filter don't care about such
>>>>>> leaks, it drops
>>>>>> +        # only trailing preallocation.
>>>>>
>>>>> True, but that isn’t what’s happening here.  (We only write 10M at
>>>>> 0, so
>>>>> there are no gaps.)  Why do we need this 1M margin?
>>>>
>>>> We write 10M, but qcow2 also writes metadata as it wants
>>>
>>> Ah, yes, sure.  Shouldn’t result in 1M, but why not.
>>>
>>>>>> +        self.assertLess(abs(stat.st_blocks - refstat.st_blocks) *
>>>>>> 512,
>>>>>> +                        1024 * 1024)
>>>>>
>>>>> [...]
>>>>>
>>>>>> diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group
>>>>>> index ff59cfd2d4..15d5f9619b 100644
>>>>>> --- a/tests/qemu-iotests/group
>>>>>> +++ b/tests/qemu-iotests/group
>>>>>> @@ -307,6 +307,7 @@
>>>>>>    295 rw
>>>>>>    296 rw
>>>>>>    297 meta
>>>>>> +298 auto quick
>>>>>
>>>>> I wouldn’t mark it as quick, there is at least one preallocate=full of
>>>>> 140M, and one of 40M, plus multiple 10M data writes and falloc
>>>>> preallocations.
>>>>>
>>>>> Also, since you mark it as “auto”, have you run this test on all
>>>>> CI-relevant hosts?  (Among other things I can’t predict) I wonder how
>>>>> preallocation behaves on macOS.  Just because that one was always a
>>>>> bit
>>>>> weird about not-really-data areas.
>>>>>
>>>>
>>>> Ofcourse, I didn't run on all hosts. I'm a bit out of sync about this..
> 
> Sorry, I see now that it sounds rude.

I found it completely understandable, because I share the same
sentiment.  It’s the reason I’m so hesitant adding tests to auto.

>>> Well, someone has to do it.  The background story is that tests are
>>> added to auto all the time (because “why not”), and then they fail on
>>> BSD or macOS.  We have BSD docker test build targets at least, so they
>>> can be easily tested.  (Well, it takes like half an hour, but you know.)
>>>
>>> (We don’t have macOS builds, as far as I can tell, but I personally
>>> don’t even know why we run the iotests on macOS at all.  (Well, I also
>>> wonder about the BSDs, but given the test build targets, I shouldn’t
>>> complain, I suppose.))
>>>
>>> (Though macOS isn’t part of the gating CI, is it?  I seem to remember
>>> macOS errors are generally only reported to me half a week after the
>>> pull request is merged, which is even worse.)
>>>
>>> Anyway.  I just ran the test for OpenBSD
>>> (EXTRA_CONFIGURE_OPTS='--target-list=x86_64-softmmu' \
>>>     make vm-build-openbsd)
>>
>> Oh, I didn't know that it's so simple.

It kind of is simple, but it still takes so long that I don’t consider
it simple.

>> What another things you are
>> running before sending a PULL?

Actually, I’m not running any of the vm-build-* targets.  (If I did, I
wouldn’t have to ask you whether you did, because I’d just run them
anyway and then tell you about any potential failures.)

I compile everything on Fedora and Arch (x86-64), -m32 and -m64, clang
and gcc, and one time with mingw.  I run make check on everything but
mingw, and then run the following iotests on Fedora gcc-m64 and Arch
clang-m32 (on tmpfs):

-qcow2 -x auto, -qcow2 -o compat=0.10, -qcow2 -o refcount_bits=1,
-qcow2 -o data_file='$TEST_IMG.ext_data_file', -nbd, -raw, -luks, -vmdk,
-vhdx, -qcow, -vdi, -vpc, -qed, -cloop, -parallels, -bochs

And on non-tmpfs: -c none -qcow2 142 199

(At some point that meant that all iotests that don’t require root are
at least run once.  I should check whether that’s still the case, I
suppose...)

>>> and got some failures:
>>>
>>> --- /home/qemu/qemu-test.PGo2ls/src/tests/qemu-iotests/298.out  Fri Sep
>>> 25 07:10:31 2020
>>> +++ /home/qemu/qemu-test.PGo2ls/build/tests/qemu-iotests/298.out.bad
>>> Fri Sep 25 08:57:56 2020
>>> @@ -1,5 +1,67 @@
>>> -.............
>>> +qemu-io: Failed to resize underlying file: Unsupported preallocation
>>> mode: falloc
> 
> [..]
> 
>>> -OK
>>> +FAILED (failures=6)
>>>
>>>> If I don't put new test in "auto", is there any chance that test would
>>>> be automatically run somewhere?
>>>
>>> I run all tests before pull requests at least.
>>>
> 
> OK, so it doesn't work on BSD at all. I don't really want to
> investigate, but seems it's because of absence of fallocate. So let's
> drop "auto" group.

I’d be OK with that.

> Another thing: maybe, add auto-linux test group for running only in
> linux-build? So, new tests will be added to it because why not, and we
> will not bother with BSD and MacOS?

We have _supported_os in bash tests and supported_platforms in Python
tests, so if you want a test in auto but run it only on Linux, you can
specify that there.

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-10-01  7:41 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 18:19 [PATCH v6 00/15] preallocate filter Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 01/15] block: simplify comment to BDRV_REQ_SERIALISING Vladimir Sementsov-Ogievskiy
2020-09-28 15:34   ` Alberto Garcia
2020-09-18 18:19 ` [PATCH v6 02/15] block/io.c: drop assertion on double waiting for request serialisation Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 03/15] block/io: split out bdrv_find_conflicting_request Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 04/15] block/io: bdrv_wait_serialising_requests_locked: drop extra bs arg Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 05/15] block: bdrv_mark_request_serialising: split non-waiting function Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 06/15] block: introduce BDRV_REQ_NO_WAIT flag Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 07/15] block: bdrv_check_perm(): process children anyway Vladimir Sementsov-Ogievskiy
2020-09-24 14:25   ` Max Reitz
2020-09-24 14:55     ` Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 08/15] block: introduce preallocate filter Vladimir Sementsov-Ogievskiy
2020-09-24 16:50   ` Max Reitz
2020-09-24 17:36     ` Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 09/15] qemu-io: add preallocate mode parameter for truncate command Vladimir Sementsov-Ogievskiy
2020-09-24 17:08   ` Max Reitz
2020-09-18 18:19 ` [PATCH v6 10/15] iotests: qemu_io_silent: support --image-opts Vladimir Sementsov-Ogievskiy
2020-09-25  7:10   ` Max Reitz
2020-09-18 18:19 ` [PATCH v6 11/15] iotests: add 298 to test new preallocate filter driver Vladimir Sementsov-Ogievskiy
2020-09-25  8:26   ` Max Reitz
2020-09-25  8:49     ` Vladimir Sementsov-Ogievskiy
2020-09-25  9:11       ` Max Reitz
2020-09-25 15:11         ` Vladimir Sementsov-Ogievskiy
2020-09-25 15:32           ` Vladimir Sementsov-Ogievskiy
2020-10-01  7:40             ` Max Reitz [this message]
2020-10-01  8:41           ` Thomas Huth
2020-09-18 18:19 ` [PATCH v6 12/15] scripts/simplebench: support iops Vladimir Sementsov-Ogievskiy
2020-09-25  8:54   ` Max Reitz
2020-09-18 18:19 ` [PATCH v6 13/15] scripts/simplebench: improve view of ascii table Vladimir Sementsov-Ogievskiy
2020-09-25  9:31   ` Max Reitz
2020-09-25 16:58     ` Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 14/15] scripts/simplebench: improve ascii table: add difference line Vladimir Sementsov-Ogievskiy
2020-09-25 10:24   ` Max Reitz
2020-09-25 17:13     ` Vladimir Sementsov-Ogievskiy
2020-10-01  8:22       ` Max Reitz
2020-09-18 18:19 ` [PATCH v6 15/15] scripts/simplebench: add bench_prealloc.py Vladimir Sementsov-Ogievskiy
2020-09-25 11:25   ` Max Reitz

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=2efb10c1-8863-b3e5-3f6e-d57644fc2d2a@redhat.com \
    --to=mreitz@redhat.com \
    --cc=armbru@redhat.com \
    --cc=den@openvz.org \
    --cc=fam@euphon.net \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@virtuozzo.com \
    /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).