All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Hanna Reitz <hreitz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel <qemu-devel@nongnu.org>,
	Qemu-block <qemu-block@nongnu.org>
Subject: Re: [PATCH v2 05/17] iotests/040: Fix TestCommitWithFilters test
Date: Fri, 25 Mar 2022 11:06:09 -0400	[thread overview]
Message-ID: <CAFn=p-b_GmaT5Tx6ROU5tyFy7_yMATBUgF6EBsbiNugna=6OwA@mail.gmail.com> (raw)
In-Reply-To: <4682fc7e-bfe5-1ab3-bc0f-650fd981ea2f@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4588 bytes --]

On Fri, Mar 25, 2022, 9:40 AM Hanna Reitz <hreitz@redhat.com> wrote:

> On 24.03.22 19:30, John Snow wrote:
> > Without this change, asserting that qemu_io always returns 0 causes this
> > test to fail in a way we happened not to be catching previously:
> >
> >   qemu.utils.VerboseProcessError: Command
> >    '('/home/jsnow/src/qemu/bin/git/tests/qemu-iotests/../../qemu-io',
> >    '--cache', 'writeback', '--aio', 'threads', '-f', 'qcow2', '-c',
> >    'read -P 4 3M 1M',
> >    '/home/jsnow/src/qemu/bin/git/tests/qemu-iotests/scratch/3.img')'
> >    returned non-zero exit status 1.
> >    ┏━ output ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> >    ┃ qemu-io: can't open device
> >    ┃ /home/jsnow/src/qemu/bin/git/tests/qemu-iotests/scratch/3.img:
> >    ┃ Could not open backing file: Could not open backing file: Throttle
> >    ┃ group 'tg' does not exist
> >    ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> >
> > Explicitly provide the backing file so that opening the file outside of
> > QEMU (Where we will not have throttle groups) will succeed.
> >
> > [Patch entirely written by Hanna but I don't have her S-o-B]
>
> Er, well, not sure if this even meets the necessary threshold of
> originality, so a Proposed-by would’ve been fine.
>

I have a dogmatic devotion to crediting others. You diagnosed and fixed the
problem, not me!

(I realize it's a small thing, but still. I can't bring myself to put my
name on something that isn't mine, even if it's tiny.)


> Anyway, here you go:
>
> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
>
> > [My commit message is probably also garbage, sorry]
>
> I don’t find it too bad, but a paragraph describing the actual problem
> might improve it.  E.g. (below the exception output):
>
> The commit jobs changes the backing file string stored in the image file
> header belonging to the node above the commit’s top node to point to the
> commit target (the base node).  QEMU tries to be as accurate as
> possible, and so in these test cases will include the filter that is
> part of the block graph in that backing file string (by virtue of making
> it a json:{} description of the post-commit subgraph).  This makes
> little sense outside of QEMU, though: Specifically, the throttle node in
> that subgraph will dearly miss its supposedly associated throttle group
> object.
>
> When starting the commit job, we can specify a custom backing file
> string to write into said image file, so let’s use that feature to write
> the plain filename of the backing chain’s next actual image file there.
>

Thanks :3


> > [Feel free to suggest a better one]
> > [I hope your day is going well]
>
> Fridays tend to be on the better side of days.
>
> Hanna
>

Up there in my top three kinds of days.


> > Signed-off-by: John Snow <jsnow@redhat.com>
> >
> > Signed-off-by: John Snow <jsnow@redhat.com>
> > ---
> >   tests/qemu-iotests/040 | 6 ++++--
> >   1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040
> > index c4a90937dc..30eb97829e 100755
> > --- a/tests/qemu-iotests/040
> > +++ b/tests/qemu-iotests/040
> > @@ -836,7 +836,8 @@ class TestCommitWithFilters(iotests.QMPTestCase):
> >                                job_id='commit',
> >                                device='top-filter',
> >                                top_node='cow-2',
> > -                             base_node='cow-1')
> > +                             base_node='cow-1',
> > +                             backing_file=self.img1)
> >           self.assert_qmp(result, 'return', {})
> >           self.wait_until_completed(drive='commit')
> >
> > @@ -852,7 +853,8 @@ class TestCommitWithFilters(iotests.QMPTestCase):
> >                                job_id='commit',
> >                                device='top-filter',
> >                                top_node='cow-1',
> > -                             base_node='cow-0')
> > +                             base_node='cow-0',
> > +                             backing_file=self.img0)
> >           self.assert_qmp(result, 'return', {})
> >           self.wait_until_completed(drive='commit')
> >
>
>

[-- Attachment #2: Type: text/html, Size: 6676 bytes --]

  reply	other threads:[~2022-03-25 15:08 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 18:30 [PATCH v2 00/17] iotests: add enhanced debugging info to qemu-io failures John Snow
2022-03-24 18:30 ` [PATCH v2 01/17] iotests: replace calls to log(qemu_io(...)) with qemu_io_log() John Snow
2022-03-25 13:25   ` Hanna Reitz
2022-03-24 18:30 ` [PATCH v2 02/17] iotests/163: Fix broken qemu-io invocation John Snow
2022-03-24 18:30 ` [PATCH v2 03/17] iotests: Don't check qemu_io() output for specific error strings John Snow
2022-03-24 18:30 ` [PATCH v2 04/17] iotests/040: Don't check image pattern on zero-length image John Snow
2022-03-24 18:30 ` [PATCH v2 05/17] iotests/040: Fix TestCommitWithFilters test John Snow
2022-03-25  1:33   ` Eric Blake
2022-03-31 16:36     ` John Snow
2022-03-25 13:40   ` Hanna Reitz
2022-03-25 15:06     ` John Snow [this message]
2022-03-24 18:30 ` [PATCH v2 06/17] iotests: create generic qemu_tool() function John Snow
2022-03-24 18:30 ` [PATCH v2 07/17] iotests: rebase qemu_io() on top of qemu_tool() John Snow
2022-03-24 18:30 ` [PATCH v2 08/17] iotests/030: fixup John Snow
2022-03-24 18:30 ` [PATCH v2 09/17] iotests/149: fixup John Snow
2022-03-24 18:30 ` [PATCH v2 10/17] iotests/205: fixup John Snow
2022-03-24 18:30 ` [PATCH v2 11/17] iotests/245: fixup John Snow
2022-03-24 18:30 ` [PATCH v2 12/17] iotests/migration-permissions: fixup John Snow
2022-03-24 18:30 ` [PATCH v2 13/17] iotests/migration-permissions: use assertRaises() for qemu_io() negative test John Snow
2022-03-25  1:36   ` Eric Blake
2022-03-24 18:30 ` [PATCH v2 14/17] iotests/image-fleecing: switch to qemu_io() John Snow
2022-03-25  1:38   ` Eric Blake
2022-03-25 14:24   ` Hanna Reitz
2022-03-24 18:30 ` [PATCH v2 15/17] iotests: remove qemu_io_pipe_and_status() John Snow
2022-03-25  1:39   ` Eric Blake
2022-03-25 14:25   ` Hanna Reitz
2022-03-24 18:30 ` [PATCH v2 16/17] iotests: remove qemu_io_silent() and qemu_io_silent_check() John Snow
2022-03-24 18:30 ` [PATCH v2 17/17] iotests: make qemu_io_log() check return codes by default John Snow

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='CAFn=p-b_GmaT5Tx6ROU5tyFy7_yMATBUgF6EBsbiNugna=6OwA@mail.gmail.com' \
    --to=jsnow@redhat.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 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.