]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
qemu-iotests: Test streaming with missing job ID
authorKevin Wolf <kwolf@redhat.com>
Mon, 15 May 2017 12:36:23 +0000 (14:36 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 26 May 2017 14:48:21 +0000 (16:48 +0200)
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: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Kashyap Chamarthy <kchamart@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
tests/qemu-iotests/030
tests/qemu-iotests/030.out

index e00c11b80463b2ce1d7f06ea853d343edc230d46..feee86115dd3260c7457ecda98af09eb6f45bd73 100755 (executable)
@@ -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
index 84bfd63fba1b4a6743437fac26a3755ddffb3ecf..391c8573cae520f8fcf730ce2e853231d7507cfd 100644 (file)
@@ -1,5 +1,5 @@
-......................
+.......................
 ----------------------------------------------------------------------
-Ran 22 tests
+Ran 23 tests
 
 OK