From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-block@nongnu.org, hreitz@redhat.com, stefanha@redhat.com,
pkrempa@redhat.com, peterx@redhat.com, farosas@suse.de,
qemu-devel@nongnu.org
Subject: Re: [PATCH v2 15/15] iotests: Add (NBD-based) tests for inactive nodes
Date: Tue, 4 Feb 2025 17:30:35 +0100 [thread overview]
Message-ID: <Z6JAq17ph8Sih3IB@redhat.com> (raw)
In-Reply-To: <ifdiezfz5vp54mrpvawgo6dyp24azxajyfyclnidqhfckx3nbd@ol5ql25i7c7w>
Am 03.02.2025 um 20:49 hat Eric Blake geschrieben:
> On Fri, Jan 31, 2025 at 10:50:51AM +0100, Kevin Wolf wrote:
> > This tests different types of operations on inactive block nodes
> > (including graph changes, block jobs and NBD exports) to make sure that
> > users manually activating and inactivating nodes doesn't break things.
> >
> > Support for inactive nodes in other export types will have to come with
> > separate test cases because they have different dependencies like blkio
> > or root permissions and we don't want to disable this basic test when
> > they are not fulfilled.
> >
> > Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> > ---
> > tests/qemu-iotests/iotests.py | 4 +
> > tests/qemu-iotests/tests/inactive-node-nbd | 303 ++++++++++++++++++
> > .../qemu-iotests/tests/inactive-node-nbd.out | 239 ++++++++++++++
> > 3 files changed, 546 insertions(+)
> > create mode 100755 tests/qemu-iotests/tests/inactive-node-nbd
> > create mode 100644 tests/qemu-iotests/tests/inactive-node-nbd.out
> >
>
> > + iotests.log('\nMirror from active source to inactive target')
> > +
> > + iotests.log('disk-fmt active: %s' % node_is_active(vm, 'disk-fmt'))
> > + iotests.log('snap-fmt active: %s' % node_is_active(vm, 'snap-fmt'))
> > + iotests.log('snap2-fmt active: %s' % node_is_active(vm, 'snap2-fmt'))
> > + iotests.log('target-fmt active: %s' % node_is_active(vm, 'target-fmt'))
> > +
> > + # Activating snap2-fmt recursively activates the whole backing chain
> > + vm.qmp_log('blockdev-set-active', node_name='snap2-fmt', active=True)
> > + vm.qmp_log('blockdev-set-active', node_name='target-fmt', active=False)
>
> Here, you have "Activating ... recursively activates"...
>
> > +
> > + iotests.log('disk-fmt active: %s' % node_is_active(vm, 'disk-fmt'))
> > + iotests.log('snap-fmt active: %s' % node_is_active(vm, 'snap-fmt'))
> > + iotests.log('snap2-fmt active: %s' % node_is_active(vm, 'snap2-fmt'))
> > + iotests.log('target-fmt active: %s' % node_is_active(vm, 'target-fmt'))
> > +
> > + vm.qmp_log('blockdev-mirror', job_id='job0', device='snap2-fmt',
> > + target='target-fmt', sync='full',
> > + filters=[iotests.filter_qmp_generated_node_ids])
> > +
> > + iotests.log('\nBackup from active source to inactive target')
> > +
> > + vm.qmp_log('blockdev-backup', job_id='job0', device='snap2-fmt',
> > + target='target-fmt', sync='full',
> > + filters=[iotests.filter_qmp_generated_node_ids])
> > +
> > + iotests.log('\nBackup from inactive source to active target')
> > +
> > + # Activating snap2-fmt recursively inactivates the whole backing chain
> > + vm.qmp_log('blockdev-set-active', node_name='snap2-fmt', active=False)
> > + vm.qmp_log('blockdev-set-active', node_name='target-fmt', active=True)
>
> ...but here, "Activating ... recursively inactivates". Is one of
> these statements wrong?
Yes, looks like I updated only half of the comment after copying it. As
you can see in the line after the comment, it sets active=False for
snap2-fmt, so the comment should say "Inactivating ... recursively
inactivates".
Kevin
> Overall a nice barrage of tests, and I can see how adding this many
> tests caused your v2 to fix some bugs that it discovered in v1.
>
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.
> Virtualization: qemu.org | libguestfs.org
>
next prev parent reply other threads:[~2025-02-04 16:31 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-30 17:12 [PATCH v2 00/15] block: Managing inactive nodes (QSD migration) Kevin Wolf
2025-01-30 17:12 ` [PATCH v2 01/15] block: Add 'active' field to BlockDeviceInfo Kevin Wolf
2025-01-30 19:30 ` Eric Blake
2025-02-03 18:47 ` Stefan Hajnoczi
2025-01-30 17:12 ` [PATCH v2 02/15] block: Inactivate external snapshot overlays when necessary Kevin Wolf
2025-01-30 19:46 ` Eric Blake
2025-02-03 18:48 ` Stefan Hajnoczi
2025-01-30 17:12 ` [PATCH v2 03/15] migration/block-active: Remove global active flag Kevin Wolf
2025-01-30 19:50 ` Eric Blake
2025-02-04 15:50 ` Kevin Wolf
2025-02-03 18:49 ` Stefan Hajnoczi
2025-01-30 17:12 ` [PATCH v2 04/15] block: Don't attach inactive child to active node Kevin Wolf
2025-01-30 20:08 ` Eric Blake
2025-02-03 18:50 ` Stefan Hajnoczi
2025-01-30 17:12 ` [PATCH v2 05/15] block: Allow inactivating already inactive nodes Kevin Wolf
2025-01-30 20:09 ` Eric Blake
2025-02-03 18:51 ` Stefan Hajnoczi
2025-01-30 17:12 ` [PATCH v2 06/15] block: Fix crash on block_resize on inactive node Kevin Wolf
2025-01-30 20:11 ` Eric Blake
2025-02-03 18:52 ` Stefan Hajnoczi
2025-01-30 17:12 ` [PATCH v2 07/15] block: Add option to create inactive nodes Kevin Wolf
2025-01-30 20:17 ` Eric Blake
2025-02-03 18:53 ` Stefan Hajnoczi
2025-01-30 17:12 ` [PATCH v2 08/15] block: Add blockdev-set-active QMP command Kevin Wolf
2025-01-30 20:22 ` Eric Blake
2025-02-03 18:54 ` Stefan Hajnoczi
2025-01-30 17:12 ` [PATCH v2 09/15] block: Support inactive nodes in blk_insert_bs() Kevin Wolf
2025-01-30 20:26 ` Eric Blake
2025-02-03 18:55 ` Stefan Hajnoczi
2025-01-31 9:50 ` [PATCH v2 10/15] block/export: Don't ignore image activation error in blk_exp_add() Kevin Wolf
2025-02-03 16:30 ` Eric Blake
2025-02-03 18:58 ` Stefan Hajnoczi
2025-02-04 15:54 ` Kevin Wolf
2025-01-31 9:50 ` [PATCH v2 11/15] block/export: Add option to allow export of inactive nodes Kevin Wolf
2025-01-31 13:41 ` Fabiano Rosas
2025-02-04 15:44 ` Kevin Wolf
2025-02-03 19:12 ` Eric Blake
2025-02-03 19:17 ` Stefan Hajnoczi
2025-01-31 9:50 ` [PATCH v2 12/15] nbd/server: Support " Kevin Wolf
2025-02-03 19:17 ` Eric Blake
2025-02-03 19:19 ` Stefan Hajnoczi
2025-02-04 17:10 ` Kevin Wolf
2025-01-31 9:50 ` [PATCH v2 13/15] iotests: Add filter_qtest() Kevin Wolf
2025-02-03 19:19 ` Eric Blake
2025-01-31 9:50 ` [PATCH v2 14/15] iotests: Add qsd-migrate case Kevin Wolf
2025-02-03 19:35 ` Eric Blake
2025-02-03 21:09 ` Kevin Wolf
2025-01-31 9:50 ` [PATCH v2 15/15] iotests: Add (NBD-based) tests for inactive nodes Kevin Wolf
2025-02-03 19:49 ` Eric Blake
2025-02-04 16:30 ` Kevin Wolf [this message]
2025-01-31 13:53 ` [PATCH v2 00/15] block: Managing inactive nodes (QSD migration) Fabiano Rosas
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=Z6JAq17ph8Sih3IB@redhat.com \
--to=kwolf@redhat.com \
--cc=eblake@redhat.com \
--cc=farosas@suse.de \
--cc=hreitz@redhat.com \
--cc=peterx@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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 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.