On 2015-02-20 at 05:02, Stefan Hajnoczi wrote:
On Fri, Feb 13, 2015 at 05:08:56PM -0500, John Snow wrote:
+    def check_incremental(self, target=None):
+        if target is None:
+            target = self.bitmaps[-1].last_target()
+        self.assertTrue(iotests.compare_images(self.test_img, target))
+        return True
+
+
+    def hmp_io_writes(self, drive, patterns):
+        for pattern in patterns:
+            self.vm.hmp_qemu_io(drive, 'write -P%s %s %s' % pattern)
+        self.vm.hmp_qemu_io(drive, 'flush')
Please don't read image files while the guest is still running.  Image
formats do not support concurrent readers and writers.

If I'm not mistaken, there is no guest. VMs started using iotests.py have -machine accel=qtest set.

Max


Three options:
1. Stop the guest before accessing self.test_img
2. Use drive-backup to make a full copy of self.test_img that can be
    accessed.
3. Test specific patterns in the backup file instead of using
    compare_images (qemu-io -c 'read -P 0xff 0 512' img)


Reply via email to