Commit 171d6431 authored by Max Reitz's avatar Max Reitz Committed by Anthony Liguori
Browse files

qemu-iotests: Fix test 041



Performing multiple drive-mirror blockjobs on the same qemu instance
results in the image file used for the block device being replaced by
the newly mirrored file, which is not what we want.

Fix this by performing one dedicated test per sync mode.

Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Message-id: 1385407736-13941-3-git-send-email-mreitz@redhat.com
Signed-off-by: default avatarAnthony Liguori <aliguori@amazon.com>
parent 117e0c82
Loading
Loading
Loading
Loading
+24 −8
Original line number Diff line number Diff line
@@ -691,12 +691,28 @@ class TestUnbackedSource(ImageMirroringTestCase):
        os.remove(test_img)
        os.remove(target_img)

    def test_absolute_paths(self):
    def test_absolute_paths_full(self):
        self.assert_no_active_block_jobs()
        result = self.vm.qmp('drive-mirror', device='drive0',
                             sync='full', target=target_img,
                             mode='absolute-paths')
        self.assert_qmp(result, 'return', {})
        self.complete_and_wait()
        self.assert_no_active_block_jobs()

        for sync_mode in ['full', 'top', 'none']:
    def test_absolute_paths_top(self):
        self.assert_no_active_block_jobs()
        result = self.vm.qmp('drive-mirror', device='drive0',
                             sync='top', target=target_img,
                             mode='absolute-paths')
        self.assert_qmp(result, 'return', {})
        self.complete_and_wait()
        self.assert_no_active_block_jobs()

    def test_absolute_paths_none(self):
        self.assert_no_active_block_jobs()
        result = self.vm.qmp('drive-mirror', device='drive0',
                                 sync=sync_mode, target=target_img,
                             sync='none', target=target_img,
                             mode='absolute-paths')
        self.assert_qmp(result, 'return', {})
        self.complete_and_wait()
+2 −2
Original line number Diff line number Diff line
.........................
...........................
----------------------------------------------------------------------
Ran 25 tests
Ran 27 tests

OK