diff options
author | Kevin Wolf <kwolf@redhat.com> | 2017-05-15 14:36:23 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-05-26 16:48:21 +0200 |
commit | 0bb0aea4bac2332389a9b481f650a2a9df80ea0c (patch) | |
tree | b4054f5e41cd590673c72f1fc1156d9f80d2c536 | |
parent | 525989a50a70ea0ffa2b1cdf56279765bb2b7de0 (diff) |
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: 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>
-rwxr-xr-x | tests/qemu-iotests/030 | 4 | ||||
-rw-r--r-- | tests/qemu-iotests/030.out | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030 index e00c11b804..feee86115d 100755 --- a/tests/qemu-iotests/030 +++ b/tests/qemu-iotests/030 @@ -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 diff --git a/tests/qemu-iotests/030.out b/tests/qemu-iotests/030.out index 84bfd63fba..391c8573ca 100644 --- a/tests/qemu-iotests/030.out +++ b/tests/qemu-iotests/030.out @@ -1,5 +1,5 @@ -...................... +....................... ---------------------------------------------------------------------- -Ran 22 tests +Ran 23 tests OK |