Commit 0bb0aea4 authored by Kevin Wolf's avatar Kevin Wolf
Browse files

qemu-iotests: Test streaming with missing job ID



This adds a small test for the image streaming error path for failing
block_job_create(), which would have found the null pointer dereference
in commit a170a91f.

Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Reviewed-by: default avatarAlberto Garcia <berto@igalia.com>
Reviewed-by: default avatarKashyap Chamarthy <kchamart@redhat.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: default avatarJeff Cody <jcody@redhat.com>
parent 525989a5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -147,6 +147,10 @@ class TestSingleDrive(iotests.QMPTestCase):
        result = self.vm.qmp('block-stream', device='nonexistent')
        self.assert_qmp(result, 'error/class', 'GenericError')

    def test_job_id_missing(self):
        result = self.vm.qmp('block-stream', device='mid')
        self.assert_qmp(result, 'error/class', 'GenericError')


class TestParallelOps(iotests.QMPTestCase):
    num_ops = 4 # Number of parallel block-stream operations
+2 −2
Original line number Diff line number Diff line
......................
.......................
----------------------------------------------------------------------
Ran 22 tests
Ran 23 tests

OK