qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, mreitz@redhat.com,
	dgilbert@redhat.com, quintela@redhat.com, fam@euphon.net,
	stefanha@redhat.com, jsnow@redhat.com, vsementsov@virtuozzo.com,
	eblake@redhat.com
Subject: [PATCH 2/2] migrate-bitmaps-postcopy-test: check that we can't remove in-flight bitmaps
Date: Fri, 19 Mar 2021 23:41:24 +0300	[thread overview]
Message-ID: <20210319204124.364312-3-vsementsov@virtuozzo.com> (raw)
In-Reply-To: <20210319204124.364312-1-vsementsov@virtuozzo.com>

Check that we can't remove bitmaps being migrated on destination vm.
The new check proves that previous commit helps.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
 tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
index d046ebeb94..7265eea738 100755
--- a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
+++ b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test
@@ -224,6 +224,15 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
         self.start_postcopy()
 
         self.vm_b_events += self.vm_b.get_qmp_events()
+
+        # Check that we can't remove in-flight bitmaps.
+        for i in range(0, nb_bitmaps):
+            result = self.vm_b.qmp('block-dirty-bitmap-remove',
+                                   node='drive0', name='bitmap{}'.format(i))
+            self.assert_qmp(result, 'error/desc',
+                            ("Bitmap 'bitmap{}' is currently in use by "
+                             "another operation and cannot be used").format(i))
+
         self.vm_b.shutdown()
         # recreate vm_b, so there is no incoming option, which prevents
         # loading bitmaps from disk
-- 
2.29.2



  parent reply	other threads:[~2021-03-19 20:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19 20:41 [PATCH 0/2] Fix crash if try to remove bitmap on target during migration Vladimir Sementsov-Ogievskiy
2021-03-19 20:41 ` [PATCH 1/2] migration/block-dirty-bitmap: make incoming disabled bitmaps busy Vladimir Sementsov-Ogievskiy
2021-03-19 20:41 ` Vladimir Sementsov-Ogievskiy [this message]
2021-03-22 11:28 ` [PATCH 0/2] Fix crash if try to remove bitmap on target during migration Stefan Hajnoczi
2021-03-22 11:39   ` Vladimir Sementsov-Ogievskiy
  -- strict thread matches above, loose matches on Subject: below --
2021-03-22  9:49 [PATCH for-6.0 0/2] Fix use-after-free, if remove bitmap " Vladimir Sementsov-Ogievskiy
2021-03-22  9:49 ` [PATCH 2/2] migrate-bitmaps-postcopy-test: check that we can't remove in-flight bitmaps Vladimir Sementsov-Ogievskiy

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=20210319204124.364312-3-vsementsov@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=fam@euphon.net \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --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 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).